Just tested with 2.0.7 and your pom snippet and all works as expected:

With property 'something':

[EMAIL PROTECTED]:~/Develop/testproject$ mvn help:active-profiles -Dsomething
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - testgroup:testartifact:jar:0.1
[INFO]    task-segment: [help:active-profiles] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [help:active-profiles]
[INFO]
Active Profiles for Project 'testgroup:testartifact:jar:0.1':

The following profiles are active:

 - profile1 (source: pom)

[...]

Without property 'something':

[EMAIL PROTECTED]:~/Develop/testproject$ mvn help:active-profiles
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - testgroup:testartifact:jar:0.1
[INFO]    task-segment: [help:active-profiles] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [help:active-profiles]
[INFO]
Active Profiles for Project 'testgroup:testartifact:jar:0.1':

The following profiles are active:

 - profile2 (source: pom)

[...]

-Tim

Julien Stern schrieb:
On Fri, Jun 22, 2007 at 02:25:42PM +0200, Tim Kettler wrote:
Hi,

what version of maven are you using? There was a bug with default activation in maven 2.0 but that was fixed long ago in 2.0.1.

I'm using maven 2.0.7

And I have some more insight about the issue: if I have an OTHER
profile that uses negatvie property based activation, my activeByDefault
profile gets deactivated somehow.

Here is a POM that seem to trigger the bug:

  <profiles>
    <profile>
      <id>profile1</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>profile2</id>
      <activation>
        <property>
          <name>!something</name>
        </property>
      </activation>
    </profile>
  </profiles>

Should I file a bug in JIRA or am I missing the obvious?

--
Julien

-Tim

Julien Stern schrieb:
Hi list,

It seems that a profile marked "activeByDefault" is never active...
Is that a bug or have I missed something?

I haved defined a profile in a POM that is active by default, e.g:

<profiles>
 <profile>
   <id>some-profile</id>
   <activation>
     <activeByDefault>true</activeByDefault>
   </activation>
   ...
 </profile>
</profiles>

"mvn install" does not take the profile into account
"mvn -Psome-profile install" takes the profile into account

Is there something else to do in order to activate a profile
by default?

Thanks,

--
Julien

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


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


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



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

Reply via email to