You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Richard Bair <rb...@yahoo.com> on 2004/12/14 02:16:48 UTC
Reactor & SubProject interdepencies
Hey Everyone,
I've read that Reactor will order sub-projects for
compilation based on those sub-projects dependancies.
So, if A depends on B which depends on C, then they
will be built C->B->A.
I assumed that to form these dependencies I would just
list a dependency for A like so in my project.xml for
A:
<dependencies>
<dependency>
<groupId>mygroup</groupId>
<artifactId>B</artifactId>
<version>0.6</version>
</dependency>
</dependencies>
I also have the groupId for all of my subprojects set
to the same value (in this case, mygroup).
I also put the following into my main project's
maven.xml file:
<goal name="mygroup-build">
<maven:reactor
basedir="${basedir}/.."
includes="*/project.xml"
excludes="mygroup-build/project.xml"
goals="clean,jar:install"
banner="Building"
ignoreFailures="false"
postProcessing="true"
/>
</goal>
Finally, the project structure is set up like so:
/workspace
mygroup-build/
A/
B/
C/
How do I go about setting up these interproject
dependancies? Is it correct as I have detailed here,
and I just have a bug in one of my project.xml files?
Thanks,
Richard
__________________________________
Do you Yahoo!?
Send a seasonal email greeting and help others. Do good.
http://celebrity.mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Reactor & SubProject interdepencies
Posted by Richard Bair <rb...@yahoo.com>.
Wow, David Jencks of firebirdsql fame! Didn't expect
to run into you here.
> I strongly recommend you try out multiproject which
> does most of this
> heavy lifting for you, i.e. you don't need any
> reactor targets.
So, is multiproject a wrapper around reactor?
[aside]
Well, I was going to use multiproject, but honestly I
can't figure out what is the "best practices" way of
doing things, and what isn't. From a noobs
perspective, Maven looks really powerful but I have
almost *no* idea what the preferred way of doing
anything is. Aside from having to learn how to script
in jelly, what goes into
build.properties/project.properties/project.xml/maven.xml
or what some obscure error means (the current one is
[echo] Generating xdocs from POM ...
ASTIdentifier :
java.lang.reflect.InvocationTargetException), there
are a pile of plugins with varying degrees of
documentation, but hardly any of which contain any
birds-eye overview. So, I ended up copying the Jakarta
Commons project, which uses reactor :).
[/aside]
Thanks David
Rich
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Reactor & SubProject interdepencies
Posted by David Jencks <dj...@gluecode.com>.
I strongly recommend you try out multiproject which does most of this
heavy lifting for you, i.e. you don't need any reactor targets.
david jencks
On Dec 13, 2004, at 5:27 PM, Richard Bair wrote:
> Nevermind, indeed it does work the way I was
> expecting, and I did have a bug in my project.xml
> files. Incidently, the problem was a missing <extend>
> tag at the beginning of each project.xml file.
>
> Richard
>
>
> --- Richard Bair <rb...@yahoo.com> wrote:
>
>> Hey Everyone,
>>
>> I've read that Reactor will order sub-projects for
>> compilation based on those sub-projects
>> dependancies.
>> So, if A depends on B which depends on C, then they
>> will be built C->B->A.
>>
>> I assumed that to form these dependencies I would
>> just
>> list a dependency for A like so in my project.xml
>> for
>> A:
>>
>> <dependencies>
>> <dependency>
>> <groupId>mygroup</groupId>
>> <artifactId>B</artifactId>
>> <version>0.6</version>
>> </dependency>
>> </dependencies>
>>
>> I also have the groupId for all of my subprojects
>> set
>> to the same value (in this case, mygroup).
>>
>> I also put the following into my main project's
>> maven.xml file:
>>
>> <goal name="mygroup-build">
>> <maven:reactor
>> basedir="${basedir}/.."
>> includes="*/project.xml"
>> excludes="mygroup-build/project.xml"
>> goals="clean,jar:install"
>> banner="Building"
>> ignoreFailures="false"
>> postProcessing="true"
>> />
>> </goal>
>>
>> Finally, the project structure is set up like so:
>>
>> /workspace
>> mygroup-build/
>> A/
>> B/
>> C/
>>
>> How do I go about setting up these interproject
>> dependancies? Is it correct as I have detailed here,
>> and I just have a bug in one of my project.xml
>> files?
>>
>> Thanks,
>> Richard
>>
>>
>>
>> __________________________________
>> Do you Yahoo!?
>> Send a seasonal email greeting and help others. Do
>> good.
>> http://celebrity.mail.yahoo.com
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe@maven.apache.org
>> For additional commands, e-mail:
>> users-help@maven.apache.org
>>
>>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Send holiday email and support a worthy cause. Do good.
> http://celebrity.mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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: Reactor & SubProject interdepencies
Posted by Richard Bair <rb...@yahoo.com>.
Nevermind, indeed it does work the way I was
expecting, and I did have a bug in my project.xml
files. Incidently, the problem was a missing <extend>
tag at the beginning of each project.xml file.
Richard
--- Richard Bair <rb...@yahoo.com> wrote:
> Hey Everyone,
>
> I've read that Reactor will order sub-projects for
> compilation based on those sub-projects
> dependancies.
> So, if A depends on B which depends on C, then they
> will be built C->B->A.
>
> I assumed that to form these dependencies I would
> just
> list a dependency for A like so in my project.xml
> for
> A:
>
> <dependencies>
> <dependency>
> <groupId>mygroup</groupId>
> <artifactId>B</artifactId>
> <version>0.6</version>
> </dependency>
> </dependencies>
>
> I also have the groupId for all of my subprojects
> set
> to the same value (in this case, mygroup).
>
> I also put the following into my main project's
> maven.xml file:
>
> <goal name="mygroup-build">
> <maven:reactor
> basedir="${basedir}/.."
> includes="*/project.xml"
> excludes="mygroup-build/project.xml"
> goals="clean,jar:install"
> banner="Building"
> ignoreFailures="false"
> postProcessing="true"
> />
> </goal>
>
> Finally, the project structure is set up like so:
>
> /workspace
> mygroup-build/
> A/
> B/
> C/
>
> How do I go about setting up these interproject
> dependancies? Is it correct as I have detailed here,
> and I just have a bug in one of my project.xml
> files?
>
> Thanks,
> Richard
>
>
>
> __________________________________
> Do you Yahoo!?
> Send a seasonal email greeting and help others. Do
> good.
> http://celebrity.mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> users-help@maven.apache.org
>
>
__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org