You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Sonar, Nishant" <ni...@wachovia.com> on 2007/10/04 19:23:41 UTC
RE: selective modules build
Thanks Brian
I think that this will work , I ddnt try it yet but will do shortly
I never knew <activeByDefault> thing
-Nishant
-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu]
Sent: Wednesday, September 26, 2007 1:16 AM
To: Maven Users List
Subject: RE: selective modules build
Put each module in a profile and then you could do mvn -P1,2 or -P3. If
you put all of them in a profile with <activeByDefault> then this one
will go if nothing else is active but is deactivated if something else
is.
-----Original Message-----
From: Sonar, Nishant [mailto:nishant.sonar@wachovia.com]
Sent: Tuesday, September 25, 2007 5:15 PM
To: Maven Users List
Subject: RE: selective modules build
Thanks tim,
But for this I need to add <profiles> </profiles> for all kind of
combinations for modules.
e.g.
<profile>
<profile>
<id>1n2</id>
<modules>
<module>
Ch1
</module>
<module>
Ch2
</module>
</modules>
</profile>
<profile>
<id>3Only</id>
<modules>
<module>
Ch3
</module>
</modules>
</profile>
<profiles>
And the command as
mvn clean -P3Only
mvn clean -P1n2
this is tedious, also when I need to do all the
mvn clean -P3Only,1n2,somemore
Is there any workaround?
Thanks
Nishant
-----Original Message-----
From: Tim Kettler [mailto:tim.kettler@udo.edu]
Sent: Tuesday, September 25, 2007 3:09 AM
To: Maven Users List
Subject: Re: selective modules build
Hi,
$ mvn --help
usage: mvn [options] [<goal(s)>] [<phase(s)>]
Options:
[...]
-P,--activate-profiles Comma-delimited list of profiles to
activate
-Tim
Sonar, Nishant schrieb:
> Hi,
>
>
>
> I want to run a selective modules when I am building, my pom hierarchy
> is like
>
>
>
> * Super- parent
>
> * Parent1
>
> * Ch1
> * Ch2
>
> * Parent 2
>
> * Ch1
> * Ch2
>
> * Parent 3
>
> * Ch1
> * Ch2
> * Ch3
>
> I am running pom for super-parent as these are necessary tasks and
want
> to custom run modules like parent 1 only, parent 1&@ only, parent 3
> only, in super-parent.pom I defined profiles as
>
> <profile>
>
> <id>1</id>
>
> <modules>
>
> <module>parent1</module>
>
> </profile>
>
> <profile>
>
> <id>12</id>
>
> <modules>
>
> <module>parent1</module>
>
> <module>parent2</module>
>
> </profile>
>
> <profile>
>
> <id>3</id>
>
> <modules>
>
> <module>parent3</module>
>
> </profile>
>
> <profile>
>
> <id>all</id>
>
> <modules>
>
> <module>parent1</module>
>
> <module>parent2</module>
>
> <module>parent3</module>
>
> </profile>
>
>
>
> My intension is to control this selective module build from command
line
> specifying which modules to build, is it possible?
>
>
>
> Regards,
>
> Nishant Sonar
>
>
>
>
---------------------------------------------------------------------
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