You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sumyoungguy <je...@lonelyplanet.com.au> on 2008/01/17 03:57:19 UTC

Disable profiles within sub-projects

Hi,

I did a quick search but didn't come up with a result, forgive me if this
has already been answered on the forum.

I've got a project in the following format

base project folder (pom)
    - Admin Project (pom)
    - Core Project (pom)
    - Public Project (pom)

If I want to build a release I'll typically run something like "mvn -Pprod
package" from the base project folder.

This has the desired effect of packaging the core project (as a jar) which
is used by the Admin and public projects (which are packaged as war files).

Occasionally I need to want to build a release which does not package the
core or admin projects, so I run something like "mvn -Pprod_alt_config
package" form the Public projects folder.  

Ideally I would be able to run "mvn -Pprod_alt_config package" from the base
folder and have a way of tagging the "prod_alt_config" profiles within the
core and public projects as do not build.

Is there any way to do this?

cheers
Jerome
-- 
View this message in context: http://www.nabble.com/Disable-profiles-within-sub-projects-tp14906082s177p14906082.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Disable profiles within sub-projects

Posted by sumyoungguy <je...@lonelyplanet.com.au>.
Thank you that's exactly what I was after

:clap:
-- 
View this message in context: http://www.nabble.com/Disable-profiles-within-sub-projects-tp14906082s177p14908682.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Disable profiles within sub-projects

Posted by Wayne Fay <wa...@gmail.com>.
You can affect which modules build by putting the module declarations
inside your profiles. This does require that you remove the modules
tag from your parent pom.

So you'll need to make a profile for prod that declares all modules,
and one for prod_alt_config that only declares the public (or
whatever) modules you want.

Wayne

On 1/16/08, sumyoungguy <je...@lonelyplanet.com.au> wrote:
>
> Hi,
>
> I did a quick search but didn't come up with a result, forgive me if this
> has already been answered on the forum.
>
> I've got a project in the following format
>
> base project folder (pom)
>     - Admin Project (pom)
>     - Core Project (pom)
>     - Public Project (pom)
>
> If I want to build a release I'll typically run something like "mvn -Pprod
> package" from the base project folder.
>
> This has the desired effect of packaging the core project (as a jar) which
> is used by the Admin and public projects (which are packaged as war files).
>
> Occasionally I need to want to build a release which does not package the
> core or admin projects, so I run something like "mvn -Pprod_alt_config
> package" form the Public projects folder.
>
> Ideally I would be able to run "mvn -Pprod_alt_config package" from the base
> folder and have a way of tagging the "prod_alt_config" profiles within the
> core and public projects as do not build.
>
> Is there any way to do this?
>
> cheers
> Jerome
> --
> View this message in context:
> http://www.nabble.com/Disable-profiles-within-sub-projects-tp14906082s177p14906082.html
> Sent from the Maven - Users mailing list archive at Nabble.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