You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ashish Srivastava <as...@yahoo.com> on 2012/01/20 19:26:52 UTC

Removing some modules in a maven profile

Hi,
   I have say a few modules defiled in the parent pom.xml as:
<modules> 

   <module>a</module>
   <module>b</module>
   <module>c</module>
</modules>

I want the default profile builds the entire module list but create a new profile that say only builds a and b but not c. I have seen a thread where adding a module is suggested in a profile instead of removing (excluding) one. I tried to give module a and b in the profile and still mvn built everything, I guess because it builds the parent list first (?). Is there a way to accomplish this? 


Thanks for your help,
-Ashish

RE: Removing some modules in a maven profile

Posted by "Lyons, Roy" <Ro...@cmegroup.com>.
I have seen this accomplished through the use of profiles and defining the modules within the profile.

-----Original Message-----
From: Ashish Srivastava [mailto:ashish7s@yahoo.com] 
Sent: Friday, January 20, 2012 12:27 PM
To: users@maven.apache.org
Subject: Removing some modules in a maven profile

Hi,
   I have say a few modules defiled in the parent pom.xml as:
<modules> 

   <module>a</module>
   <module>b</module>
   <module>c</module>
</modules>

I want the default profile builds the entire module list but create a new profile that say only builds a and b but not c. I have seen a thread where adding a module is suggested in a profile instead of removing (excluding) one. I tried to give module a and b in the profile and still mvn built everything, I guess because it builds the parent list first (?). Is there a way to accomplish this? 


Thanks for your help,
-Ashish

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Removing some modules in a maven profile

Posted by Wayne Fay <wa...@gmail.com>.
> I want the default profile builds the entire module list but create a new
> profile that say only builds a and b but not c. I have seen a thread where
> adding a module is suggested in a profile instead of removing (excluding)
> one. I tried to give module a and b in the profile and still mvn built
> everything, I guess because it builds the parent list first (?). Is there a
> way to accomplish this?

You can do this if you merely think in opposite terms. Your parent
should only include A and B. Your profile should include C.

Then you build "normal" when you want to only build A and B, and
activate the profile to include C.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org