You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rk...@cisco.com on 2005/09/15 14:14:49 UTC
Multiproject: dependency not triggered
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: [org.apache.maven.repository.GenericArtifact@174d93a]
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m102]: Suppresing download progress etc.
Posted by rk...@cisco.com.
Thanks, that did it.
Rk
x77309
On Sat, 15 Oct 2005, Brett Porter wrote:
> Sorry about that. I remember what it was - set the property:
>
> maven.download.meter=bootstrap
>
>
> On 10/15/05, rks@cisco.com <rk...@cisco.com> wrote:
> > 'maven -q' makes it worse: it suppresses other useful info,
> > continues to display artifact download progress but without
> > listing the name of the artifact being downloaded:
> >
> > $ cd acceptance; /vob/enm_jdk/maven1.0.2/bin/maven -q
> > Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
> > 56/13877K
> > 60/13877K
> > //...
> > 13877/13877K downloaded
> > 10/47K
> > //...
> > Response content length is not known
> > //... rest of it
> >
> > Thanks,
> >
> > Rk
> > x77309
> >
> > On Sat, 15 Oct 2005, Brett Porter wrote:
> >
> > > I think maven -q will do this, though it does suppress much of the
> > > other output too.
> > >
> > > - Brett
> > >
> > > On 10/15/05, rks@cisco.com <rk...@cisco.com> wrote:
> > > > Is there anyway to suppress the artifact download progress messages
> > > > issued by Maven? This looks fine on a console; but in build reports,
> > > > takes up reams of space:
> > > >
> > > > $ maven
> > > > __ __
> > > > | \/ |__ _Apache__ ___
> > > > | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
> > > > |_| |_\__,_|\_/\___|_||_| v. 1.0.2
> > > >
> > > > Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
> > > > Attempting to download my-component-1.0.jar.
> > > > 56/13877K
> > > > 60/13877K
> > > > 61/13877K
> > > > 63/13877K
> > > > 64/13877K
> > > > 65/13877K
> > > > 66/13877K
> > > > //... zillion more lines
> > > >
> > > > Thanks,
> > > >
> > > > Rk
> > > > x77309
> > > >
> > > > On Wed, 12 Oct 2005 rks@cisco.com 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)
> > > > > (cs)
> > > > > (dal)
> > > > > )
> > > > >
> > > > > where both cs and dal extend ${basedir}common/project.xml.
> > > > >
> > > > > Problem:
> > > > > ========
> > > > > (0) How do I suppress the download progress messages printed by Maven?
> > > > > While this looks fine in "real-time", in batched reports, these
> > > > > incremental progress updates are listed on separate lines (probably
> > > > > becuase CR/LF is used instead of just CR), building up a huge
> > > > > preface to the build of a project.
> > > > >
> > > > > So how do I tell Maven not to print these messages?
> > > > >
> > > > >
> > > > > (1) When triggering the build of dal (either locally or
> > > > > thru the multi-project plugin), cs-1.0.jar is built
> > > > > deposited into the repository but the build of
> > > > > dal fails with the message that cs-SNAPSHOT.jar could not
> > > > > be located.
> > > > >
> > > > > The dependency specs in dal POM identifies cs-${pomVersion}.jar
> > > > > as shown below; why is this lookinh for the SNAPSHOT version?
> > > > >
> > > > > <dependencies>
> > > > > <dependency>
> > > > > <groupId>dcm</groupId>
> > > > > <artifactId>cs</artifactId>
> > > > > <version>${pom.currentVersion}</version>
> > > > > <type>jar</type>
> > > > > </dependency>
> > > > > </dependencies>
> > > > >
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Rk
> > > > > x77309
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m102]: Suppresing download progress etc.
Posted by Brett Porter <br...@gmail.com>.
Sorry about that. I remember what it was - set the property:
maven.download.meter=bootstrap
On 10/15/05, rks@cisco.com <rk...@cisco.com> wrote:
> 'maven -q' makes it worse: it suppresses other useful info,
> continues to display artifact download progress but without
> listing the name of the artifact being downloaded:
>
> $ cd acceptance; /vob/enm_jdk/maven1.0.2/bin/maven -q
> Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
> 56/13877K
> 60/13877K
> //...
> 13877/13877K downloaded
> 10/47K
> //...
> Response content length is not known
> //... rest of it
>
> Thanks,
>
> Rk
> x77309
>
> On Sat, 15 Oct 2005, Brett Porter wrote:
>
> > I think maven -q will do this, though it does suppress much of the
> > other output too.
> >
> > - Brett
> >
> > On 10/15/05, rks@cisco.com <rk...@cisco.com> wrote:
> > > Is there anyway to suppress the artifact download progress messages
> > > issued by Maven? This looks fine on a console; but in build reports,
> > > takes up reams of space:
> > >
> > > $ maven
> > > __ __
> > > | \/ |__ _Apache__ ___
> > > | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
> > > |_| |_\__,_|\_/\___|_||_| v. 1.0.2
> > >
> > > Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
> > > Attempting to download my-component-1.0.jar.
> > > 56/13877K
> > > 60/13877K
> > > 61/13877K
> > > 63/13877K
> > > 64/13877K
> > > 65/13877K
> > > 66/13877K
> > > //... zillion more lines
> > >
> > > Thanks,
> > >
> > > Rk
> > > x77309
> > >
> > > On Wed, 12 Oct 2005 rks@cisco.com 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)
> > > > (cs)
> > > > (dal)
> > > > )
> > > >
> > > > where both cs and dal extend ${basedir}common/project.xml.
> > > >
> > > > Problem:
> > > > ========
> > > > (0) How do I suppress the download progress messages printed by Maven?
> > > > While this looks fine in "real-time", in batched reports, these
> > > > incremental progress updates are listed on separate lines (probably
> > > > becuase CR/LF is used instead of just CR), building up a huge
> > > > preface to the build of a project.
> > > >
> > > > So how do I tell Maven not to print these messages?
> > > >
> > > >
> > > > (1) When triggering the build of dal (either locally or
> > > > thru the multi-project plugin), cs-1.0.jar is built
> > > > deposited into the repository but the build of
> > > > dal fails with the message that cs-SNAPSHOT.jar could not
> > > > be located.
> > > >
> > > > The dependency specs in dal POM identifies cs-${pomVersion}.jar
> > > > as shown below; why is this lookinh for the SNAPSHOT version?
> > > >
> > > > <dependencies>
> > > > <dependency>
> > > > <groupId>dcm</groupId>
> > > > <artifactId>cs</artifactId>
> > > > <version>${pom.currentVersion}</version>
> > > > <type>jar</type>
> > > > </dependency>
> > > > </dependencies>
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Rk
> > > > x77309
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m102]: Suppresing download progress etc.
Posted by rk...@cisco.com.
'maven -q' makes it worse: it suppresses other useful info,
continues to display artifact download progress but without
listing the name of the artifact being downloaded:
$ cd acceptance; /vob/enm_jdk/maven1.0.2/bin/maven -q
Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
56/13877K
60/13877K
//...
13877/13877K downloaded
10/47K
//...
Response content length is not known
//... rest of it
Thanks,
Rk
x77309
On Sat, 15 Oct 2005, Brett Porter wrote:
> I think maven -q will do this, though it does suppress much of the
> other output too.
>
> - Brett
>
> On 10/15/05, rks@cisco.com <rk...@cisco.com> wrote:
> > Is there anyway to suppress the artifact download progress messages
> > issued by Maven? This looks fine on a console; but in build reports,
> > takes up reams of space:
> >
> > $ maven
> > __ __
> > | \/ |__ _Apache__ ___
> > | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
> > |_| |_\__,_|\_/\___|_||_| v. 1.0.2
> >
> > Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
> > Attempting to download my-component-1.0.jar.
> > 56/13877K
> > 60/13877K
> > 61/13877K
> > 63/13877K
> > 64/13877K
> > 65/13877K
> > 66/13877K
> > //... zillion more lines
> >
> > Thanks,
> >
> > Rk
> > x77309
> >
> > On Wed, 12 Oct 2005 rks@cisco.com 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)
> > > (cs)
> > > (dal)
> > > )
> > >
> > > where both cs and dal extend ${basedir}common/project.xml.
> > >
> > > Problem:
> > > ========
> > > (0) How do I suppress the download progress messages printed by Maven?
> > > While this looks fine in "real-time", in batched reports, these
> > > incremental progress updates are listed on separate lines (probably
> > > becuase CR/LF is used instead of just CR), building up a huge
> > > preface to the build of a project.
> > >
> > > So how do I tell Maven not to print these messages?
> > >
> > >
> > > (1) When triggering the build of dal (either locally or
> > > thru the multi-project plugin), cs-1.0.jar is built
> > > deposited into the repository but the build of
> > > dal fails with the message that cs-SNAPSHOT.jar could not
> > > be located.
> > >
> > > The dependency specs in dal POM identifies cs-${pomVersion}.jar
> > > as shown below; why is this lookinh for the SNAPSHOT version?
> > >
> > > <dependencies>
> > > <dependency>
> > > <groupId>dcm</groupId>
> > > <artifactId>cs</artifactId>
> > > <version>${pom.currentVersion}</version>
> > > <type>jar</type>
> > > </dependency>
> > > </dependencies>
> > >
> > >
> > > Thanks,
> > >
> > > Rk
> > > x77309
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m102]: Suppresing download progress etc.
Posted by Brett Porter <br...@gmail.com>.
I think maven -q will do this, though it does suppress much of the
other output too.
- Brett
On 10/15/05, rks@cisco.com <rk...@cisco.com> wrote:
> Is there anyway to suppress the artifact download progress messages
> issued by Maven? This looks fine on a console; but in build reports,
> takes up reams of space:
>
> $ maven
> __ __
> | \/ |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
> |_| |_\__,_|\_/\___|_||_| v. 1.0.2
>
> Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
> Attempting to download my-component-1.0.jar.
> 56/13877K
> 60/13877K
> 61/13877K
> 63/13877K
> 64/13877K
> 65/13877K
> 66/13877K
> //... zillion more lines
>
> Thanks,
>
> Rk
> x77309
>
> On Wed, 12 Oct 2005 rks@cisco.com 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)
> > (cs)
> > (dal)
> > )
> >
> > where both cs and dal extend ${basedir}common/project.xml.
> >
> > Problem:
> > ========
> > (0) How do I suppress the download progress messages printed by Maven?
> > While this looks fine in "real-time", in batched reports, these
> > incremental progress updates are listed on separate lines (probably
> > becuase CR/LF is used instead of just CR), building up a huge
> > preface to the build of a project.
> >
> > So how do I tell Maven not to print these messages?
> >
> >
> > (1) When triggering the build of dal (either locally or
> > thru the multi-project plugin), cs-1.0.jar is built
> > deposited into the repository but the build of
> > dal fails with the message that cs-SNAPSHOT.jar could not
> > be located.
> >
> > The dependency specs in dal POM identifies cs-${pomVersion}.jar
> > as shown below; why is this lookinh for the SNAPSHOT version?
> >
> > <dependencies>
> > <dependency>
> > <groupId>dcm</groupId>
> > <artifactId>cs</artifactId>
> > <version>${pom.currentVersion}</version>
> > <type>jar</type>
> > </dependency>
> > </dependencies>
> >
> >
> > Thanks,
> >
> > Rk
> > x77309
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m102]: Suppresing download progress etc.
Posted by rk...@cisco.com.
Is there anyway to suppress the artifact download progress messages
issued by Maven? This looks fine on a console; but in build reports,
takes up reams of space:
$ maven
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
Directory /vob/nm_dcm/acceptance/../maven/repository does not exist. Attempting to create.
Attempting to download my-component-1.0.jar.
56/13877K
60/13877K
61/13877K
63/13877K
64/13877K
65/13877K
66/13877K
//... zillion more lines
Thanks,
Rk
x77309
On Wed, 12 Oct 2005 rks@cisco.com 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)
> (cs)
> (dal)
> )
>
> where both cs and dal extend ${basedir}common/project.xml.
>
> Problem:
> ========
> (0) How do I suppress the download progress messages printed by Maven?
> While this looks fine in "real-time", in batched reports, these
> incremental progress updates are listed on separate lines (probably
> becuase CR/LF is used instead of just CR), building up a huge
> preface to the build of a project.
>
> So how do I tell Maven not to print these messages?
>
>
> (1) When triggering the build of dal (either locally or
> thru the multi-project plugin), cs-1.0.jar is built
> deposited into the repository but the build of
> dal fails with the message that cs-SNAPSHOT.jar could not
> be located.
>
> The dependency specs in dal POM identifies cs-${pomVersion}.jar
> as shown below; why is this lookinh for the SNAPSHOT version?
>
> <dependencies>
> <dependency>
> <groupId>dcm</groupId>
> <artifactId>cs</artifactId>
> <version>${pom.currentVersion}</version>
> <type>jar</type>
> </dependency>
> </dependencies>
>
>
> Thanks,
>
> Rk
> x77309
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
[m102]: Suppresing download progress etc.
Posted by rk...@cisco.com.
Env:
====
JDK 5.0
Maven 1.0.2
Multiproject plugin: 1.3.1
Context:
========
I have setup a multiproject dependency as follows:
(rh
(common)
(cs)
(dal)
)
where both cs and dal extend ${basedir}common/project.xml.
Problem:
========
(0) How do I suppress the download progress messages printed by Maven?
While this looks fine in "real-time", in batched reports, these
incremental progress updates are listed on separate lines (probably
becuase CR/LF is used instead of just CR), building up a huge
preface to the build of a project.
So how do I tell Maven not to print these messages?
(1) When triggering the build of dal (either locally or
thru the multi-project plugin), cs-1.0.jar is built
deposited into the repository but the build of
dal fails with the message that cs-SNAPSHOT.jar could not
be located.
The dependency specs in dal POM identifies cs-${pomVersion}.jar
as shown below; why is this lookinh for the SNAPSHOT version?
<dependencies>
<dependency>
<groupId>dcm</groupId>
<artifactId>cs</artifactId>
<version>${pom.currentVersion}</version>
<type>jar</type>
</dependency>
</dependencies>
Thanks,
Rk
x77309
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject: dependency not triggered
Posted by Davy Toch <Da...@belgacom.net>.
Hi,
Perhaps you misunderstood when I stated:
"... On the other hand it is also possible to build only comp1 by
calling the appropriate goals directly in the folder project/comp1. ..."
Doing :
$cd project/comp2; maven %artifact_creation_goal_name%
will NOT trigger the build of comp1. So make sure the artifact created
by project/comp1 is already available in the local/central repository!.
In order to build all components, you should do:
$cd project/master; maven %multiproject_goal_name%
Regards,
Davy Toch
IT-Consultant
Steria SA/NV
rks@cisco.com wrote:
> I am missing something fundmental. Even with this layout,
> the goals in comp1/ do not trigger the attainment of
> goals in comp1/:
>
> $ cd comp1; maven
> __ __
> | \/ |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
> |_| |_\__,_|\_/\___|_||_| v. 1.0.2
>
> build:start:
>
> java:prepare-filesystem:
>
> java:compile:
> [echo] Compiling to /vob/nm_dcm/cs/target/classes
> [echo]
>
> ^C (abort maven)
> $
> $ cd ../comp2; maven
> __ __
> | \/ |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
> |_| |_\__,_|\_/\___|_||_| v. 1.0.2
>
> Attempting to download dcm-cs-1.0-SNAPSHOT.jar.
> Response content length is not known
> Error retrieving artifact from
> [http://maven-plugins.sf.net/maven/dcm/jars/dcm-cs-1.0-SNAPSHOT.jar]:
> java.io.IOException: Unknown error downloading; status code was: 302
> WARNING: Failed to download dcm-cs-1.0-SNAPSHOT.jar.
> The build cannot continue because of the following unsatisfied
> dependency:
>
> dcm-cs-1.0-SNAPSHOT.jar
>
> Total time: 14 seconds
> Finished at: Thu Sep 15 11:49:31 PDT 2005
>
> $
>
> Why is the build in comp2/ not triggering the build in comp1?
> I will understand if you want to give up on this thread.
>
> Thanks,
>
> Rk
> x77309
>
> On Thu, 15 Sep 2005, Davy Toch wrote:
>
>> Hi,
>>
>> Apparently the indentation of the proposed project structure wasn't
>> kept so will pad with '...'.
>>
>> project/
>> ...master/
>> ......project.xml :
>> ......... * just a POM to extend from
>> ......... * can contain dependencies like log4j, commons-logging
>> (already available on ibiblio)
>> ...... maven.xml : contains multiproject goals to be executed on
>> comp1/, comp2/, ...
>> ...... project.properties : contains maven.multiproject.includes, ...
>> ... comp1/
>> ...... project.xml :
>> ......... * extend from ../master/project.xml
>> ... comp2/
>> ...... project.xml :
>> ......... * extend from ../master/project.xml
>> ......... * depends on artifact generated by comp1
>> ... app/
>> ...... project.xml:
>> ......... * extend from ../master/project.xml
>> ......... * depends on artifacts generated by comp1 and comp2
>>
>> This way the whole application can be built by calling the
>> appropriate multiproject goals in the directory project/master. On
>> the other hand it is also possible to build only comp1 by calling the
>> appropriate goals directly in the folder project/comp1. This
>> structure also avoids problems when working with the Eclipse IDE.
>>
>>>
>>>
>>>
>>> rks@cisco.com 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
>>> > > > > rks@cisco.com 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, rks@cisco.com 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:
>>> > > > > [org.apache.maven.repository.GenericArtifact@174d93a]
>>> > > > > 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: users-unsubscribe@maven.apache.org
>>> > > > > For additional commands, e-mail: users-help@maven.apache.org
>>> > > > > > > > >
>>> ---------------------------------------------------------------------
>>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > > > For additional commands, e-mail: users-help@maven.apache.org
>>> > > > > > > > > > > > > > > >
>>> ---------------------------------------------------------------------
>>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > > For additional commands, e-mail: users-help@maven.apache.org
>>> > > > >
>>> ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail: users-help@maven.apache.org
>>> > > >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject: dependency not triggered
Posted by rk...@cisco.com.
I am missing something fundmental. Even with this layout,
the goals in comp1/ do not trigger the attainment of
goals in comp1/:
$ cd comp1; maven
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
java:prepare-filesystem:
java:compile:
[echo] Compiling to /vob/nm_dcm/cs/target/classes
[echo]
^C (abort maven)
$
$ cd ../comp2; maven
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
Attempting to download dcm-cs-1.0-SNAPSHOT.jar.
Response content length is not known
Error retrieving artifact from [http://maven-plugins.sf.net/maven/dcm/jars/dcm-cs-1.0-SNAPSHOT.jar]: java.io.IOException: Unknown error downloading; status code was: 302
WARNING: Failed to download dcm-cs-1.0-SNAPSHOT.jar.
The build cannot continue because of the following unsatisfied dependency:
dcm-cs-1.0-SNAPSHOT.jar
Total time: 14 seconds
Finished at: Thu Sep 15 11:49:31 PDT 2005
$
Why is the build in comp2/ not triggering the build in comp1?
I will understand if you want to give up on this thread.
Thanks,
Rk
x77309
On Thu, 15 Sep 2005, Davy Toch wrote:
> Hi,
>
> Apparently the indentation of the proposed project structure wasn't kept so
> will pad with '...'.
>
> project/
> ...master/
> ......project.xml :
> ......... * just a POM to extend from
> ......... * can contain dependencies like log4j, commons-logging (already
> available on ibiblio)
> ...... maven.xml : contains multiproject goals to be executed on comp1/,
> comp2/, ...
> ...... project.properties : contains maven.multiproject.includes, ...
> ... comp1/
> ...... project.xml :
> ......... * extend from ../master/project.xml
> ... comp2/
> ...... project.xml :
> ......... * extend from ../master/project.xml
> ......... * depends on artifact generated by comp1
> ... app/
> ...... project.xml:
> ......... * extend from ../master/project.xml
> ......... * depends on artifacts generated by comp1 and comp2
>
> This way the whole application can be built by calling the appropriate
> multiproject goals in the directory project/master. On the other hand it is
> also possible to build only comp1 by calling the appropriate goals directly
> in the folder project/comp1. This structure also avoids problems when working
> with the Eclipse IDE.
>
>>
>>
>>
>> rks@cisco.com 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
>> > >
>> > > rks@cisco.com 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, rks@cisco.com 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:
>> > > > > [org.apache.maven.repository.GenericArtifact@174d93a]
>> > > > > 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: users-unsubscribe@maven.apache.org
>> > > > > For additional commands, e-mail: users-help@maven.apache.org
>> > > > > >
>> > > > ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > > For additional commands, e-mail: users-help@maven.apache.org
>> > > >
>> > > >
>> > > >
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject: dependency not triggered
Posted by Davy Toch <Da...@belgacom.net>.
Hi,
Apparently the indentation of the proposed project structure wasn't kept
so will pad with '...'.
project/
...master/
......project.xml :
......... * just a POM to extend from
......... * can contain dependencies like log4j, commons-logging
(already available on ibiblio)
...... maven.xml : contains multiproject goals to be executed on comp1/,
comp2/, ...
...... project.properties : contains maven.multiproject.includes, ...
... comp1/
...... project.xml :
......... * extend from ../master/project.xml
... comp2/
...... project.xml :
......... * extend from ../master/project.xml
......... * depends on artifact generated by comp1
... app/
...... project.xml:
......... * extend from ../master/project.xml
......... * depends on artifacts generated by comp1 and comp2
This way the whole application can be built by calling the appropriate
multiproject goals in the directory project/master. On the other hand it
is also possible to build only comp1 by calling the appropriate goals
directly in the folder project/comp1. This structure also avoids
problems when working with the Eclipse IDE.
>
>
>
> rks@cisco.com 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
>>>
>>> rks@cisco.com 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, rks@cisco.com 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:
>>>> > [org.apache.maven.repository.GenericArtifact@174d93a]
>>>> > 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: users-unsubscribe@maven.apache.org
>>>> > For additional commands, e-mail: users-help@maven.apache.org
>>>> > >
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject: dependency not triggered
Posted by Davy Toch <Da...@belgacom.net>.
Hi,
Actually you're correct that the multiproject behaviour in Maven 1 isn't
very intuitive (and was only added after the Maven 1 core architecture
was established). This has been improved in Maven 2.
My suggested project structure is e.g. (simple example):
project/
master/
project.xml :
* just a POM to extend from
* can contain dependencies like log4j, commons-logging (already
available on ibiblio)
maven.xml : contains multiproject goals to be executed on comp1/,
comp2/, ...
project.properties : contains maven.multiproject.includes, ...
comp1/
project.xml :
* extend from ../master/project.xml
comp2/
project.xml :
* extend from ../master/project.xml
* depends on artifact generated by comp1
app/
project.xml:
* extend from ../master/project.xml
* depends on artifacts generated by comp1 and comp2
This way the whole application can be built by calling the appropriate
multiproject goals in the directory project/master. On the other hand it
is also possible to build only comp1 by calling the appropriate goals
directly in the folder project/comp1. This structure also avoids
problems when working with the Eclipse IDE.
rks@cisco.com 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
>>
>> rks@cisco.com 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, rks@cisco.com 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:
>>> > [org.apache.maven.repository.GenericArtifact@174d93a]
>>> > 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: users-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail: users-help@maven.apache.org
>>> > >
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject: dependency not triggered
Posted by rk...@cisco.com.
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
>
> rks@cisco.com 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, rks@cisco.com 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:
>> > [org.apache.maven.repository.GenericArtifact@174d93a]
>> > 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: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject: dependency not triggered
Posted by Davy Toch <Da...@belgacom.net>.
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
rks@cisco.com 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, rks@cisco.com 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:
>> [org.apache.maven.repository.GenericArtifact@174d93a]
>> 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiproject: dependency not triggered
Posted by rk...@cisco.com.
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, rks@cisco.com 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:
> [org.apache.maven.repository.GenericArtifact@174d93a]
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org