[EMAIL PROTECTED] wrote:
> Hi,
> > Thanks for your clarification. One thing puzzles me:
> > > You should be aware that when you run a goal on a Maven
project, > one of
> > the first things that is done is resolving/retrieving the >
dependencies.
> > So running 'rh:build' in the folder 'rh' will first try to
resolve the
> > dependency 'dcm-cs', which will fail.
> > Isn't "resolving" a dependency identifying that the prerequisite
> artifact (dcm-cs.jar) does not exist and hence trigger the build
of the > prerequisite?
> > It seems to me that toplevel (rh) should orchestrate the build
of the > subprojects.
> If I move the project.xml and maven.xml out of toplevel, what
would be
> the behaviour of multiproject:install in rh/ folder? Or are you >
suggesting
> that toplevel build must commence from rh/apps?
> > Again, thanks!
> > Rk
> x77309
> > On Thu, 15 Sep 2005, Davy Toch wrote:
> > > Hi,
> > > > Your project structure has the following problems:
> > > > The parent folder 'rh' contains a maven.xml file that calls
the > > multiproject goal. I suppose you expect this multiproject
goal to call > > rh:build in the 'cs' folder first and then the
dependency dcm-cs in > > the project 'rh' would be resolved without
a problem. However this is > > not what happens. You should be aware
that when you run a goal on a > > Maven project, one of the first
things that is done is > > resolving/retrieving the dependencies. So
running 'rh:build' in the > > folder 'rh' will first try to resolve
the dependency 'dcm-cs', which > > will fail.
> > > > Another problem I noticed is an infinite loop problem. As a
test, you > > should put the dependency to dcm-cs in rh/project.xml
in comments and > > run maven rh:build in the 'rh' folder
afterwards. You'll see you're in > > an infinite loop because the
goal rh:build in rh/maven.xml folder will > > execute on **all**
projects except 'common' (so also on itself).
> > > > Solution for the above problems : move rh/project.xml to > >
rh/app/project.xml (this will also make the <extend> in the POMs
more > > consistent). Also copy rh/maven.xml to rh/app/maven.xml but
remove the > > multiproject part should be removed in the latter.
> > > > Also : http://jira.codehaus.org/browse/MPMULTIPROJECT-55 > >
(unfortunately I didn't get any feedback on this from the Maven
guru's > > :-( ).
> > > > Regards,
> > Davy Toch
> > IT-Consultant
> > Steria SA/NV
> > > > [EMAIL PROTECTED] wrote:
> > > > > A minor(?) correction: the directory of dcm-cs
> > > is named "cs", while its artifact is named dcm-cs.
> > > So the dir structure is as follows:
> > > > > > (rh
> > > (common)
> > > (cs) ;; produces dcm-cs.jar
> > > ) > > > Thanks,
> > > > > > Rk
> > > x77309
> > > > > > On Thu, 15 Sep 2005, [EMAIL PROTECTED] wrote:
> > > > > > > Env:
> > > > ====
> > > > JDK 5.0
> > > > Maven 1.0.2
> > > > Multiproject plugin: 1.3.1
> > > > > Context:
> > > > ========
> > > > I have setup a multiproject dependency as follows:
> > > > (rh
> > > > (common)
> > > > (dcm-cs)
> > > > ) > where both rh and dcm-cs extend
${basedir}common/project.xml
> > > > and rh depends on dcm-cs.
> > > > > I have also defined a custom goal rh:build in toplevel and in
> > > > dcm-cs as follows:
> > > > > // In rh/maven.xml ...
> > > > //
> > > > <goal name="rh:build">
> > > > <ant:echo>
> > > > Building RH toplevel...
> > > > </ant:echo>
> > > > <j:set var="goal" value="rh:build" />
> > > > <ant:mkdir dir="${maven.build.dir}" />
> > > > <attainGoal name="multiproject:goal"/>
> > > > </goal>
> > > > > // In cs/maven.xml ...
> > > > //
> > > > <goal name="rh:build" prereqs="jar:install">
> > > > <ant:echo>
> > > > Building RH Common Services...
> > > > </ant:echo>
> > > > </goal>
> > > > > > > > Problem:
> > > > ========
> > > > rh:build at the toplevel does not trigger rh:build in cs;
instead
> > > > it attempts to download dcm-cs-1.0.jar from the local
repository:
> > > > > > $ cd rh; maven -X
> > > > //...
> > > > Using default goal: rh:build
> > > > running script null
> > > > [available] [VERBOSE] Unable to find src/main/java to set
property
> > > > sourcesPresent
> > > > [available] [VERBOSE] Unable to find src/test/java to set
property
> > > > unitTestSourcesPresent
> > > > [DEBUG] Adding reference: maven-classpath ->
> > > > [DEBUG] Adding reference: maven.compile.src.set ->
> > > > Verifying dependencies for dcm:dcm
> > > > Getting failed dependencies:
> > > > [EMAIL PROTECTED]
> > > > Attempting to download dcm-cs-1.0.jar.
> > > > Getting URL:
> > > >
http://roundhouse-repository.cisco.com/maven/dcm/jars/dcm-cs-1.0.jar
> > > > Received status code: 404
> > > > File not found on one of the repos
> > > > java.io.FileNotFoundException:
> > > >
http://roundhouse-repository.cisco.com/maven/dcm/jars/dcm-cs-1.0.jar
> > > > at
> > > >
org.apache.maven.util.HttpUtils.retrieveArtifact(HttpUtils.java:590)
> > > > at org.apache.maven.util.HttpUtils.getFile(HttpUtils.java:395)
> > > > //...
> > > > > > Additional Info:
> > > > ================
> > > > > (a) Relevant excerpt from Parent project.xml > > >
(rh/common/project.xml):
> > > > > <project>
> > > > <pomVersion>3</pomVersion>
> > > > <groupId>dcm</groupId>
> > > > <name>elidedname>
> > > > > <!-- The version of the project under development, e.g.
> > > > <currentVersion>1.0</currentVersion>
> > > > //...
> > > > </project>
> > > > > > (b) Relevant excerpt from rh project.xml (rh/project.xml):
> > > > > <project>
> > > > <extend>${basedir}/common/project.xml</extend>
> > > > > <name>RH Project</name>
> > > > <artifactId>dcm</artifactId>
> > > > > <dependencies>
> > > > <dependency>
> > > > <groupId>dcm</groupId>
> > > > <artifactId>dcm-cs</artifactId>
> > > > <version>${pom.currentVersion}</version>
> > > > <type>jar</type>
> > > > </dependency>
> > > > //...
> > > > </project>
> > > > > > (c) Relevant excerpt from cs project.xml
(rh/cs/project.xml):
> > > > > <project>
> > > > <extend>${basedir}/common/project.xml</extend>
> > > > > <name>RH Common services</name>
> > > > <artifactId>dcm-cs</artifactId>
> > > > > <dependencies>
> > > > <dependency>
> > > > <groupId>mortbay</groupId>
> > > > <artifactId>org.mortbay.jetty</artifactId>
> > > > <version>1.0</version>
> > > > <type>jar</type>
> > > > </dependency>
> > > > </dependencies>
> > > > //...
> > > > </project>
> > > > > > (d) Relevant excerpt from rh/project.properties:
> > > > > maven.multiproject.basedir=${basedir}
> > > > maven.multiproject.includes=**/project.xml
> > > > maven.multiproject.excludes=common/project.xml
> > > > > > Any help greatly appreciated!
> > > > > Thanks,
> > > > > Rk
> > > > x77309
> > > > > > > >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > > > > > > > > > >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> > >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]