On Thu, Mar 17, 2011 at 10:04 AM, Deepesh Damodaran <[email protected]>wrote:

> Hi,
>
> I have a multi module project with two modules(mod1 and mod2). mod2 depends
> on mod1 so added this as a dependency to the mod2/pom.xml.
>
> I have a couple of plug-ins (maven-enforce-plugin) enabled in individual
> module's pom.xml. All of them are tied to ( generate-resources) lifecycle
> less than compile lifecycle.
>
> And when I am trying to run *mvn generate-resources* it fails saying that
> cannot resolve  com.test:mod1:jar:1.0-SNAPSHOT. I haven't ran any previous
> build so this jar was not available in either local repo or remote repo.
>
> This works fine if we ran any goals greater than or equal to compile since
> the compiled classes directory added to classpath.
>
> Is there any way that we can avoid dependency resolution before compile
> phase, so that we can execute pre-compile tasks independently?
>
> Any help or suggestions will be greatly appreciated.
>

Your mod2/pom.xml declares itself as requiring mod1.
Why are you trying to run any goal besides install?

Remember this isn't ant and running install will run the previous lifecycle
goals for you.

Reply via email to