You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Reinhard Nägele <re...@mgm-tp.com> on 2009/06/16 14:32:49 UTC
Re: How to apply the profile, defined in the profiles.xml in the
parent project directory, to sub-modules?
There is a Jira ticket for this problem, which I provided a patch for
quite a while ago.
http://jira.codehaus.org/browse/MRELEASE-415
It'd be nice if the issue could get some attention by the developers.
Reinhard
Eugeny N Dzhurinsky schrieb:
> Hello there!
>
> I am facing some strange problem with the profile definition. Looks like if
> there is the file profiles.xml, located in the same directory as the pom.xml
> for the parent project - specifying one of the profiles with -P switch does
> not affect child modules. At least
>
> mvn help:active-profiles -Puser
>
> does show the desired profile in the active profiles list, but it does not
> show the desired profile as the active profile for submodules:
>
> =====================================================================================
> [INFO] Scanning for projects...
> [INFO] Reactor build order:
> [INFO] profileIssue
> [INFO] module1
> [INFO] module2
> [INFO] Searching repository for plugin with prefix: 'help'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building profileIssue
> [INFO] task-segment: [help:active-profiles] (aggregator-style)
> [INFO] ------------------------------------------------------------------------
> [INFO] [help:active-profiles]
> [INFO]
> Active Profiles for Project 'test:profileIssue:pom:1.0-SNAPSHOT':
>
> The following profiles are active:
>
> - user (source: profiles.xml)
>
>
>
> Active Profiles for Project 'test:module1:jar:1.0-SNAPSHOT':
>
> There are no active profiles.
>
>
>
> Active Profiles for Project 'test:module2:jar:1.0-SNAPSHOT':
>
> There are no active profiles.
>
>
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Tue Jun 16 11:47:33 EEST 2009
> [INFO] Final Memory: 5M/11M
> [INFO] ------------------------------------------------------------------------
> =====================================================================================
>
> the effective pom does not contain properties, defined in the profiles.xml,
> for the sub-modules as well.
>
> So looks like it is not possible to configure the set of shared properties to
> be used by all modules in the multi-module project? Or may be there is some
> another way of doing this?
>
> Thank you in advance!
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to apply the profile, defined in the profiles.xml in the
parent project directory, to sub-modules?
Posted by Eugeny N Dzhurinsky <bo...@redwerk.com>.
On Tue, Jun 16, 2009 at 02:32:49PM +0200, Reinhard Nägele wrote:
> There is a Jira ticket for this problem, which I provided a patch for
> quite a while ago.
>
> http://jira.codehaus.org/browse/MRELEASE-415
>
> It'd be nice if the issue could get some attention by the developers.
Okay, thank you for the information. I voted for it ;)
--
Eugene N Dzhurinsky
Re: How to apply the profile, defined in the profiles.xml in the
parent project directory, to sub-modules?
Posted by Reinhard Nägele <re...@mgm-tp.com>.
Just looking at this again. I think your problem might be different to
the one I mentioned. I was facing the problem only with the release
plugin. Sub-module profiles were correctly activated in a normal reactor
build, but the release plugin failed to correctly pass them to the
forked Maven process. So, your problem might be specific to the
profiles.xml which I have never used.
Reinhard
Reinhard Nägele schrieb:
> There is a Jira ticket for this problem, which I provided a patch for
> quite a while ago.
>
> http://jira.codehaus.org/browse/MRELEASE-415
>
> It'd be nice if the issue could get some attention by the developers.
>
> Reinhard
>
>
> Eugeny N Dzhurinsky schrieb:
>> Hello there!
>>
>> I am facing some strange problem with the profile definition. Looks
>> like if
>> there is the file profiles.xml, located in the same directory as the
>> pom.xml
>> for the parent project - specifying one of the profiles with -P
>> switch does
>> not affect child modules. At least
>>
>> mvn help:active-profiles -Puser
>>
>> does show the desired profile in the active profiles list, but it
>> does not
>> show the desired profile as the active profile for submodules:
>>
>> =====================================================================================
>>
>> [INFO] Scanning for projects...
>> [INFO] Reactor build order: [INFO] profileIssue
>> [INFO] module1
>> [INFO] module2
>> [INFO] Searching repository for plugin with prefix: 'help'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building profileIssue
>> [INFO] task-segment: [help:active-profiles] (aggregator-style)
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [help:active-profiles]
>> [INFO] Active Profiles for Project 'test:profileIssue:pom:1.0-SNAPSHOT':
>> The following profiles are active:
>>
>> - user (source: profiles.xml)
>>
>>
>>
>> Active Profiles for Project 'test:module1:jar:1.0-SNAPSHOT':
>> There are no active profiles.
>>
>>
>>
>> Active Profiles for Project 'test:module2:jar:1.0-SNAPSHOT':
>> There are no active profiles.
>>
>>
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 2 seconds
>> [INFO] Finished at: Tue Jun 16 11:47:33 EEST 2009
>> [INFO] Final Memory: 5M/11M
>> [INFO]
>> ------------------------------------------------------------------------
>> =====================================================================================
>>
>>
>> the effective pom does not contain properties, defined in the
>> profiles.xml,
>> for the sub-modules as well.
>>
>> So looks like it is not possible to configure the set of shared
>> properties to
>> be used by all modules in the multi-module project? Or may be there
>> is some
>> another way of doing this?
>>
>> Thank you in advance!
>>
>>
>
>
> ---------------------------------------------------------------------
> 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