You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Jackman <Da...@fastsearch.com> on 2007/03/05 19:53:07 UTC

Dependencies for aggregated projects

I thought I'd read somewhere that when compiling an aggregated group of
projects (using the <modules> element in the aggregator project), Maven
will use the target directories of the previously compiled projects when
looking for dependencies.
 
For example, say I have a project that aggregates projects A and B,
where B depends on A.  If neither of these artifacts exists in any
repository, doing a mvn package is supposed to work despite the fact
that project A isn't getting installed to the local repository--Maven
will know to find it in project A's target directory.
 
Anyway, I say I thought I'd read this, but now I can't find anything
that says this.  So I ask you:  is Maven supposed to work this way?  It
currently doesn't, and I'm not sure if I should write a bug or not.
 
..David..
 

Re: Dependencies for aggregated projects

Posted by klimane <El...@fcc-fac.ca>.
I realize that this post is quite old, but I am looking for similar
information.  What we've experienced is that the aggregator pom does depend
on the target build directory and not the local repository.  Is there a way
to reverse this?  In our case, we are using a non-standard code structure
(which we cannot modify at this point):

ProjectA
   src
      java (contains source code)
      build (target build directory for source code)
   test
      java (contains test code)
      build (target build directory for test code)

What happens is when we run a bunch of projects together in an aggregator,
some of the target build directories come out incorrect.  This means that in
some cases where we actually depend on the test code, it is referring to the
src/build target directory instead of the test/build directory, which is the
one we need.  We've found that the only way for us to work around this
problem is to remove the problem project from the aggregator and simply
ensure it is built ahead of time.  However, this solution is less than ideal
and we would like to know if there is a possibility to get this behaviour
fixed (if anyone else has seen this problem as well) or to specify that the
aggregator should look in the local repository instead of the target build
directories.

Thanks.

Elizabeth

-- 
View this message in context: http://www.nabble.com/Dependencies-for-aggregated-projects-tp9317930p22814635.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org