That is not correct,
if I have a project structure like this:

A
    |    pom.xml
     --- B
          | pom.xml


And I define the profile "profile1" in A/pom.xml when running :

B myuser$ mvn help:active-profiles -Pprofile1

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Project B
[INFO]    task-segment: [help:active-profiles] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [help:active-profiles]
[INFO]
Active Profiles for Project 'com.mycompany:b:jar:0.9.0-SNAPSHOT':

The following profiles are active:

 - profile1 (source: pom)


For more info [1]  and [2] can also help.

HTH,
Gab


[1]
http://maven.apache.org/guides/introduction/introduction-to-profiles.html
[2]
http://mindthegab.com/2008/12/02/howto-give-your-multimodule-maven-build-subprojectenvironment-specific-behavior/

2009/3/11 Roman Kournjaev <kournj...@gmail.com>

> Hi All
>
> I have done a little search on the net , and understood from it that a
> profile defined in the parent pom cant be explicitly invoked from when
> running the child pom.
>
> It just sound so unbelivable to me! So I just wanted to hear it from you
> guys too.
>
> Thanks in Advance.
> Roman
>



-- 
Gabriele Columbro
Alfresco ECM Product Strategy Consultant
+31 627 565 103
Sourcesense - Making sense of open Source (http://www.sourcesense.com)

Reply via email to