You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ja...@axxessit.no on 2003/12/19 12:33:23 UTC

Regarding multiple projects and dependencies.

Continuing on the discussion driven by Nicolas;

I'm testing out Maven on three of our sub-components with the following 
dependencies:

axxbs -> mediator -> common

(where the notation "a -> " means "a depends on b").

The directory layout is:
 <root>
     +- common
     |   +- src
     |   +- src_test
     +- axxbs
     |   +...(as above)
     +- mediator

I've set up a common "maven.xml" which compiles the JARs without unit 
testing them and
installs the JARs into the local repository.
The maven.xml is copied into the each of the components directories.

The dependency sections for each component are:

common: 
        No dependency to inhouse components:

axxbs:
    <dependency>
            <groupId>axxcommon</groupId>
            <artifactId>common</artifactId>
            <jar>common.jar</jar>
            <url>the build</url>
    </dependency>

mediator
    <dependency>
            <groupId>axxcommon</groupId>
            <artifactId>common</artifactId>
            <jar>common.jar</jar>
            <url>Thou shalt built!</url>
    </dependency>

    <dependency>
            <groupId>axxtmn</groupId>
            <artifactId>axxbs</artifactId>
            <jar>common.jar</jar>
            <url>Thou shalt built!</url>
    </dependency>

 
Using the reactor (both explicit in a toplevel maven.xml  and through 
multiproject) yields
the following result (it seems to be the dependencies aren't evaluated at 
all - they seemed
processed in "filesystem order"):

D:\jhb_sn_bugfix_view\sw\java>mbuild.bat all_jar
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

Starting the reactor...
Our processing order:
axxbs
axxcommon
axxmediator
+----------------------------------------
| Building JAR: axxbs
| Memory: 2M/2M
+----------------------------------------
Fors°ker Õ laste ned common.jar.
ADVARSEL: Mislykket nedlasting av common.jar.

BUILD FAILED
File...... file:/D:/jhb_sn_bugfix_view/sw/java/
Element... maven:reactor
Line...... 14
Column.... 28
Byggeprosessen kan ikke fortsette pÕ grunn av f°lgende mislykkede 
avhengighet:

common.jar (try downloading from build)

Total time: 4 seconds
Finished at: Fri Dec 19 12:29:56 CET 2003

D:\jhb_sn_bugfix_view\sw\java>

The "all_jar" goal uses the reactor to invoke all projects going for a 
goal doing "jar:jar (without unit tests) and jar:install"


So finally to the question; is the reactor supposed solve these 
dependencies itself, or do I have to check the dep's myself?

Hints are appreciated

Re: Regarding multiple projects and dependencies.

Posted by Mikael Lundgren <mi...@leanon.se>.
Hi,

I just had that problem the other day ;-)

Maven is trying to find the dependencies in the repository and - unless 
you put something there - it won't find them.

You could try
maven multiproject:install

which installs your artifacts into the local repository thus making them 
available to other modules.

I use snapshot dependencies
maven multiproject:install-snapshot

and specify the snapshot as the desired version in my project.xml.

Hoppas det hjälper!

God Jul!

/Mikael

jan-helge.bergesen@axxessit.no wrote:

> Continuing on the discussion driven by Nicolas;
> 
> I'm testing out Maven on three of our sub-components with the following 
> dependencies:
> 
> axxbs -> mediator -> common
> 
> (where the notation "a -> " means "a depends on b").
> 
> The directory layout is:
>  <root>
>      +- common
>      |   +- src
>      |   +- src_test
>      +- axxbs
>      |   +...(as above)
>      +- mediator
> 
> I've set up a common "maven.xml" which compiles the JARs without unit 
> testing them and
> installs the JARs into the local repository.
> The maven.xml is copied into the each of the components directories.
> 
> The dependency sections for each component are:
> 
> common: 
>         No dependency to inhouse components:
> 
> axxbs:
>     <dependency>
>             <groupId>axxcommon</groupId>
>             <artifactId>common</artifactId>
>             <jar>common.jar</jar>
>             <url>the build</url>
>     </dependency>
> 
> mediator
>     <dependency>
>             <groupId>axxcommon</groupId>
>             <artifactId>common</artifactId>
>             <jar>common.jar</jar>
>             <url>Thou shalt built!</url>
>     </dependency>
> 
>     <dependency>
>             <groupId>axxtmn</groupId>
>             <artifactId>axxbs</artifactId>
>             <jar>common.jar</jar>
>             <url>Thou shalt built!</url>
>     </dependency>


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