Hi Rémy

mvn help:effective-settings

will help you determine the problem. Your dev profile would have to be activated by something - try renaming it.


Adam

Rémy Sanlaville wrote:
Hi,

I try to understand how profiles works.

If you create a simple profiles.xml like this :
<profilesXml>
   <profiles>
       <profile>
           <id>common</id>
           <properties>
               <profile.common.message>common
property</profile.common.message>
           </properties>
       </profile>
       <profile>
           <id>dev</id>
           <properties>
               <profile.dev.message>dev
property</profile.dev.message>
           </properties>
       </profile>
   </profiles>

   <activeProfiles>
       <activeProfile>common</activeProfile>
   </activeProfiles>
</profilesXml>

Then you run the command
mvn help:active-profiles

Normally the result should be (cf.
http://maven.apache.org/guides/introduction/introduction-to-profiles.html)
   The following profiles are active:

   - common (source: profiles.xml)

But I have :
   The following profiles are active:

    - dev (source: profiles.xml)
    - common (source: profiles.xml)

Is it normal ? Why the dev profile is also active ? Strange no ?

BTW, I will be happy to find a document that explains the profiles (or
help:active-profiles) algorithm.
In fact, what's happen if you have a same/different profiles with
same/different properties with differents values in the same time in
  - M2_HOME/conf/settings.xml
  - USER_HOME/.m2/settings.xml
  - Projet/pom.xml
  - Projet/profiles.xml
  - Projet/Module/pom.xml
  - Projet/Module/profiles.xml


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to