You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien Stern <ju...@cryptolog.com> on 2007/06/22 13:57:27 UTC

Question regarding profile activation

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Question regarding profile activation

Posted by Tim Kettler <ti...@udo.edu>.
Just tested with 2.0.7 and your pom snippet and all works as expected:

With property 'something':

tik@sylvester:~/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':

tik@sylvester:~/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: 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
>>
> 
> ---------------------------------------------------------------------
> 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: War directory structure

Posted by Tim Kettler <ti...@udo.edu>.
To add to that:

the two free books [1] are a good starting point to get familiar with 
maven. The 'Getting Started Guide' [2] on the maven homepage walks you 
through the basics too.

-Tim

[1] http://maven.apache.org/articles.html
[2] http://maven.apache.org/guides/getting-started/index.html

Antonio Petrelli schrieb:
> 2007/6/22, Choudhary, Jay <ch...@visa.com>:
>>
>> Dear All
>>
>> I am new to Maven user community, could any one tell me that what should
>> be the directory structure for WAR as per Maven Process
> 
> 
> 
> Ah... RTFM (F is for Fabulous :-) ):
> http://maven.apache.org/plugins/maven-war-plugin/usage.html
> 
> Antonio
> 


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


Re: War directory structure

Posted by Antonio Petrelli <an...@gmail.com>.
2007/6/22, Choudhary, Jay <ch...@visa.com>:
>
> Dear All
>
> I am new to Maven user community, could any one tell me that what should
> be the directory structure for WAR as per Maven Process



Ah... RTFM (F is for Fabulous :-) ):
http://maven.apache.org/plugins/maven-war-plugin/usage.html

Antonio

Re: Question regarding profile activation

Posted by Tim Kettler <ti...@udo.edu>.
Yep.

Thierry Lach schrieb:
> So "Active by default" actually means "Active unless something else is
> active".   Right?
> 
> On 6/22/07, Julien Stern <ju...@cryptolog.com> wrote:
>>
>> On Fri, Jun 22, 2007 at 02:55:48PM +0200, Tim Kettler wrote:
>> > That's the intended behaviour as far as I know. If you have something
>> > that is active all the time it should'nt be in a profile.
>>
>> All right, thanks for the explanation.
>>
>> -- 
>> Julien
>>
>> > -Tim
>> >
>> > Julien Stern schrieb:
>> > >I saw in the Maven source code that the following behavior
>> > >was taking place:
>> > >
>> > >a <activeByDefault> profile becomes inactive as soon as an
>> > >other profile from the same POM gets activated.
>> > >
>> > >Is that a bug or a feature?
>> > >If it is a bug, the patch is a one liner and I can file a JIRA
>> > >issue.
>> > >
>> > >--
>> > >Julien
>> > >
>> > >
>> > >On Fri, Jun 22, 2007 at 02:33:22PM +0200, Julien Stern wrote:
>> > >>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: 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
>> > >>>
>> > >>---------------------------------------------------------------------
>> > >>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
>> > >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > 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
>>
>>
> 


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


Re: Question regarding profile activation

Posted by Thierry Lach <th...@gmail.com>.
So "Active by default" actually means "Active unless something else is
active".   Right?

On 6/22/07, Julien Stern <ju...@cryptolog.com> wrote:
>
> On Fri, Jun 22, 2007 at 02:55:48PM +0200, Tim Kettler wrote:
> > That's the intended behaviour as far as I know. If you have something
> > that is active all the time it should'nt be in a profile.
>
> All right, thanks for the explanation.
>
> --
> Julien
>
> > -Tim
> >
> > Julien Stern schrieb:
> > >I saw in the Maven source code that the following behavior
> > >was taking place:
> > >
> > >a <activeByDefault> profile becomes inactive as soon as an
> > >other profile from the same POM gets activated.
> > >
> > >Is that a bug or a feature?
> > >If it is a bug, the patch is a one liner and I can file a JIRA
> > >issue.
> > >
> > >--
> > >Julien
> > >
> > >
> > >On Fri, Jun 22, 2007 at 02:33:22PM +0200, Julien Stern wrote:
> > >>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: 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
> > >>>
> > >>---------------------------------------------------------------------
> > >>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
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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: Question regarding profile activation

Posted by Julien Stern <ju...@cryptolog.com>.
On Fri, Jun 22, 2007 at 02:55:48PM +0200, Tim Kettler wrote:
> That's the intended behaviour as far as I know. If you have something 
> that is active all the time it should'nt be in a profile.

All right, thanks for the explanation.

--
Julien

> -Tim
> 
> Julien Stern schrieb:
> >I saw in the Maven source code that the following behavior
> >was taking place:
> >
> >a <activeByDefault> profile becomes inactive as soon as an
> >other profile from the same POM gets activated.
> >
> >Is that a bug or a feature?
> >If it is a bug, the patch is a one liner and I can file a JIRA
> >issue.
> >
> >--
> >Julien
> >
> >
> >On Fri, Jun 22, 2007 at 02:33:22PM +0200, Julien Stern wrote:
> >>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: 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
> >>>
> >>---------------------------------------------------------------------
> >>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
> >
> 
> 
> ---------------------------------------------------------------------
> 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


War directory structure

Posted by "Choudhary, Jay" <ch...@visa.com>.
Dear All

I am new to Maven user community, could any one tell me that what should
be the directory structure for WAR as per Maven Process

Regards
-Jay Deep Choudhary

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


Re: Question regarding profile activation

Posted by Tim Kettler <ti...@udo.edu>.
That's the intended behaviour as far as I know. If you have something 
that is active all the time it should'nt be in a profile.

-Tim

Julien Stern schrieb:
> I saw in the Maven source code that the following behavior
> was taking place:
> 
> a <activeByDefault> profile becomes inactive as soon as an
> other profile from the same POM gets activated.
> 
> Is that a bug or a feature?
> If it is a bug, the patch is a one liner and I can file a JIRA
> issue.
> 
> --
> Julien
> 
> 
> On Fri, Jun 22, 2007 at 02:33:22PM +0200, Julien Stern wrote:
>> 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: 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
>>>
>> ---------------------------------------------------------------------
>> 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
> 


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


Re: Question regarding profile activation

Posted by Julien Stern <ju...@cryptolog.com>.
I saw in the Maven source code that the following behavior
was taking place:

a <activeByDefault> profile becomes inactive as soon as an
other profile from the same POM gets activated.

Is that a bug or a feature?
If it is a bug, the patch is a one liner and I can file a JIRA
issue.

--
Julien


On Fri, Jun 22, 2007 at 02:33:22PM +0200, Julien Stern wrote:
> 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: 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
> > 
> 
> ---------------------------------------------------------------------
> 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: Question regarding profile activation

Posted by Julien Stern <ju...@cryptolog.com>.
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: 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
> 

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


Re: Question regarding profile activation

Posted by Tim Kettler <ti...@udo.edu>.
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.

-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: 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