You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sachin Bansal <sb...@adobe.com> on 2004/10/28 00:42:35 UTC

defining inter project dependencies, so maven builds the parent project in that order

Hello,

 

 

I have the following structure (my project is creating an eclipse plugin for
xml editor) :

 

myProject

  com.abc.def.A

  com.abc.def.B

  com.abc.def.C

  com.abc.def.D

  com.abc.def.E

  com.abc.def.F

 

There are interdependencies among the projects.

They all produce jar files.

 

A depends on B, C and D

B depends on E

 

consequently I would to first build E, then B, C and D. Finally I would like
Maven to build A

 

 

The depenedency as declared in the project file of project A is as

 

        <dependency>

            <groupId>myProject</groupId>

            <artifactId>com.abc.def.B</artifactId>

                <version>1.0</version>

        </dependency>

 

        <dependency>

            <groupId>myProject</groupId>

            <artifactId>com.abc.def.C</artifactId>

                <version>1.0</version>

        </dependency>

 

        <dependency>

            <groupId>myProject</groupId>

            <artifactId>com.abc.def.D</artifactId>

                <version>1.0</version>

        </dependency>

 

 

I DO NOT want maven to search for the com.abc.def.C-1.0.jar or
com.abc.def.B-1.0.jar in the maven

repository in order to build com.abc.def.A-1.0.jar.

 

I want maven to first build project E, then B and then build project C, D
and finally A.

I want maven to figure this out dynamically, figuring it out from dependency
file

that it should first build project B and for that it will have to first
build project E

(just as Ant does, using depends target, or the sequence of execution)

 

Adam Fisk suggested that calling multiproject:install does it automatically,
but it does not

work. Everytime it looks for the *.B-1.0.jar or *.C-1.0.jar to be there in
my repository and

complains when it does not find those jar files.

 

Please help.

 

Sachin

 

svbansal@yahoo.com