You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by emerson <ec...@gmail.com> on 2011/04/12 00:50:11 UTC

Reuse of configuration

All my CI configuration is done in a profile (build and report
plugins). This is so that I have the option to not generate the
reports when running an "on demand" CI, and to generate only during
nightly builds.

As all my projects will have the same number of reports and site
related build configuration, I wanted to keep it inside a profile.

I read somewhere that the profiles can't be inherited. If this is
correct, what is the approach recommended to not have to repeat this
same configuration in every single project?

thanks
Emeson

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


Re: Reuse of configuration

Posted by emerson <ec...@gmail.com>.
Great, thanks a lot!

On 12 April 2011 03:04, Tim Kettler <ti...@udo.edu> wrote:
> Am 12.04.2011 00:50, schrieb emerson:
>>
>> All my CI configuration is done in a profile (build and report
>> plugins). This is so that I have the option to not generate the
>> reports when running an "on demand" CI, and to generate only during
>> nightly builds.
>>
>> As all my projects will have the same number of reports and site
>> related build configuration, I wanted to keep it inside a profile.
>>
>> I read somewhere that the profiles can't be inherited. If this is
>> correct, what is the approach recommended to not have to repeat this
>> same configuration in every single project?
>
> You are right, profiles are not inherited per se. AFAIK, when maven
> calculates the effective pom for an execution it will parse the parent pom
> and if it includes a profile to be activated, apply it. This interpolated
> parent pom is the basis for what is inherited to the child.
>
> So you can just put your CI related config in a profile in a parent pom and
> activate it when building a child. This will work just like you would
> expect.
>
>> thanks
>> Emeson
>
> -Tim
>
> ---------------------------------------------------------------------
> 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: Reuse of configuration

Posted by Tim Kettler <ti...@udo.edu>.
Am 12.04.2011 00:50, schrieb emerson:
> All my CI configuration is done in a profile (build and report
> plugins). This is so that I have the option to not generate the
> reports when running an "on demand" CI, and to generate only during
> nightly builds.
>
> As all my projects will have the same number of reports and site
> related build configuration, I wanted to keep it inside a profile.
>
> I read somewhere that the profiles can't be inherited. If this is
> correct, what is the approach recommended to not have to repeat this
> same configuration in every single project?

You are right, profiles are not inherited per se. AFAIK, when maven 
calculates the effective pom for an execution it will parse the parent 
pom and if it includes a profile to be activated, apply it. This 
interpolated parent pom is the basis for what is inherited to the child.

So you can just put your CI related config in a profile in a parent pom 
and activate it when building a child. This will work just like you 
would expect.

> thanks
> Emeson

-Tim

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