You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Vincent Massol (JIRA)" <ji...@codehaus.org> on 2005/09/05 10:42:02 UTC
[jira] Created: (MNG-835) Default profile in pom.xml not activated
Default profile in pom.xml not activated
----------------------------------------
Key: MNG-835
URL: http://jira.codehaus.org/browse/MNG-835
Project: Maven 2
Type: Bug
Components: maven-core
Versions: 2.0-alpha-3
Reporter: Vincent Massol
Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
---
Hi,
I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
Thus I have defined the following in my project's pom.xml:
[...]
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties combine.children="append">
<property>
<name>cargo.containers</name>
<value>${cargo.containers}</value>
</property>
[...]
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>default</id>
<properties>
<cargo.containers>jetty4xEmbedded</cargo.containers>
</properties>
</profile>
</profiles>
</project>
I want cargo build users to be able to create a settings.xml file with the following for example:
<settings>
<profiles>
<profile>
<id>user-vmassol</id>
<properties>
<cargo.containers>resin3x</cargo.containers>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>user-vmassol</activeProfile>
</activeProfiles>
</settings>
Is that the correct way to implement my use case?
So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
If not how can I activate a profile defined in pom.xml by default?
Thanks a lot
-Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: SPAM: Re: [jira] Closed: (MNG-835) Default profile in pom.xml not activated
Posted by Mark Hobson <ma...@gmail.com>.
On 13/09/05, Emmanuel Venisse <em...@venisse.net> wrote:
> Mark,
>
> it's <activeByDefault> and not <activatedByDefault>
You're right - thanks. I'll check the maven.mdo file myself next time ;)
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: SPAM: Re: [jira] Closed: (MNG-835) Default profile in pom.xml
not activated
Posted by Emmanuel Venisse <em...@venisse.net>.
Mark,
it's <activeByDefault> and not <activatedByDefault>
Emmanuel
Mark Hobson wrote:
> Just trying this on the latest m2 and get:
>
> Error: 'Unrecognised tag: 'activatedByDefault' (position: START_TAG
> seen ...<activation>\r\n\t\t\t\t<activatedByDefault>
> ... @60:25) '
>
> I have:
>
> <project>
> ...
> <profiles>
> <profile>
> <id>default</id>
> <activation>
> <activatedByDefault>true</activatedByDefault>
> </activation>
> ...
> </profile>
> </profiles>
> ...
> </project>
>
> Not sure what the parser validates against (XSD, model?) but does it
> need updating for this?
>
> Cheers,
>
> Mark
>
> On 13/09/05, John Casey (JIRA) <ji...@codehaus.org> wrote:
>
>> [ http://jira.codehaus.org/browse/MNG-835?page=all ]
>>
>>John Casey closed MNG-835:
>>--------------------------
>>
>> Resolution: Fixed
>> Fix Version: (was: 2.0-beta-2)
>> 2.0-beta-1
>>
>>
>>>Default profile in pom.xml not activated
>>>----------------------------------------
>>>
>>> Key: MNG-835
>>> URL: http://jira.codehaus.org/browse/MNG-835
>>> Project: Maven 2
>>> Type: Bug
>>> Components: maven-core
>>> Versions: 2.0-alpha-3
>>> Reporter: Vincent Massol
>>> Assignee: John Casey
>>> Fix For: 2.0-beta-1
>>
>>>Original Estimate: 3 hours
>>> Time Spent: 3 hours
>>> Remaining: 0 minutes
>>>
>>>Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
>>>---
>>>Hi,
>>>I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
>>>Thus I have defined the following in my project's pom.xml:
>>>[...]
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <artifactId>maven-surefire-plugin</artifactId>
>>> <configuration>
>>> <systemProperties combine.children="append">
>>> <property>
>>> <name>cargo.containers</name>
>>> <value>${cargo.containers}</value>
>>> </property>
>>>[...]
>>> </systemProperties>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>> <profiles>
>>> <profile>
>>> <id>default</id>
>>> <properties>
>>> <cargo.containers>jetty4xEmbedded</cargo.containers>
>>> </properties>
>>> </profile>
>>> </profiles>
>>></project>
>>>I want cargo build users to be able to create a settings.xml file with the following for example:
>>><settings>
>>> <profiles>
>>> <profile>
>>> <id>user-vmassol</id>
>>> <properties>
>>> <cargo.containers>resin3x</cargo.containers>
>>> </properties>
>>> </profile>
>>> </profiles>
>>> <activeProfiles>
>>> <activeProfile>user-vmassol</activeProfile>
>>> </activeProfiles>
>>></settings>
>>>Is that the correct way to implement my use case?
>>>So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
>>>If not how can I activate a profile defined in pom.xml by default?
>>>Thanks a lot
>>>-Vincent
>>
>>--
>>This message is automatically generated by JIRA.
>>-
>>If you think it was sent incorrectly contact one of the administrators:
>> http://jira.codehaus.org/secure/Administrators.jspa
>>-
>>For more information on JIRA, see:
>> http://www.atlassian.com/software/jira
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>For additional commands, e-mail: dev-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: [jira] Closed: (MNG-835) Default profile in pom.xml not activated
Posted by Mark Hobson <ma...@gmail.com>.
Just trying this on the latest m2 and get:
Error: 'Unrecognised tag: 'activatedByDefault' (position: START_TAG
seen ...<activation>\r\n\t\t\t\t<activatedByDefault>
... @60:25) '
I have:
<project>
...
<profiles>
<profile>
<id>default</id>
<activation>
<activatedByDefault>true</activatedByDefault>
</activation>
...
</profile>
</profiles>
...
</project>
Not sure what the parser validates against (XSD, model?) but does it
need updating for this?
Cheers,
Mark
On 13/09/05, John Casey (JIRA) <ji...@codehaus.org> wrote:
> [ http://jira.codehaus.org/browse/MNG-835?page=all ]
>
> John Casey closed MNG-835:
> --------------------------
>
> Resolution: Fixed
> Fix Version: (was: 2.0-beta-2)
> 2.0-beta-1
>
> > Default profile in pom.xml not activated
> > ----------------------------------------
> >
> > Key: MNG-835
> > URL: http://jira.codehaus.org/browse/MNG-835
> > Project: Maven 2
> > Type: Bug
> > Components: maven-core
> > Versions: 2.0-alpha-3
> > Reporter: Vincent Massol
> > Assignee: John Casey
> > Fix For: 2.0-beta-1
>
> >
> > Original Estimate: 3 hours
> > Time Spent: 3 hours
> > Remaining: 0 minutes
> >
> > Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> > ---
> > Hi,
> > I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> > Thus I have defined the following in my project's pom.xml:
> > [...]
> > <build>
> > <plugins>
> > <plugin>
> > <artifactId>maven-surefire-plugin</artifactId>
> > <configuration>
> > <systemProperties combine.children="append">
> > <property>
> > <name>cargo.containers</name>
> > <value>${cargo.containers}</value>
> > </property>
> > [...]
> > </systemProperties>
> > </configuration>
> > </plugin>
> > </plugins>
> > </build>
> > <profiles>
> > <profile>
> > <id>default</id>
> > <properties>
> > <cargo.containers>jetty4xEmbedded</cargo.containers>
> > </properties>
> > </profile>
> > </profiles>
> > </project>
> > I want cargo build users to be able to create a settings.xml file with the following for example:
> > <settings>
> > <profiles>
> > <profile>
> > <id>user-vmassol</id>
> > <properties>
> > <cargo.containers>resin3x</cargo.containers>
> > </properties>
> > </profile>
> > </profiles>
> > <activeProfiles>
> > <activeProfile>user-vmassol</activeProfile>
> > </activeProfiles>
> > </settings>
> > Is that the correct way to implement my use case?
> > So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> > If not how can I activate a profile defined in pom.xml by default?
> > Thanks a lot
> > -Vincent
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://jira.codehaus.org/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
[jira] Reopened: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=all ]
John Casey reopened MNG-835:
----------------------------
reopening to adjust time.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "Vincent Massol (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46158 ]
Vincent Massol commented on MNG-835:
------------------------------------
Another idea is to add a new <always/> activation policy, as a nested element inside <activation>.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Fix For: 2.0-beta-2
>
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Closed: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=all ]
John Casey closed MNG-835:
--------------------------
Resolution: Fixed
Added <activatedByDefault/> (boolean) to <activation/> section of a profile.
These will be activated when no others are...they should still be able to be activated by other mechanism, too. So:
<profile>
<id>test</id>
<activation>
<activatedByDefault>true</activatedByDefault>
</activation>
...
</profile>
I have included unit tests to check this behavior.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=all ]
John Casey updated MNG-835:
---------------------------
Complexity: Expert (was: Intermediate)
Remaining Estimate: 3 hours
Original Estimate: 10800
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46256 ]
Mark Hobson commented on MNG-835:
---------------------------------
Oops, apologies - there *were* tabs in there!
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Closed: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=all ]
John Casey closed MNG-835:
--------------------------
Resolution: Won't Fix
Added activeProfiles from profiles.xml to the mix as explicitly activated.
Use:
<project>
...
<properties>
<name>value</name>
</properties>
</project>
for defaults. These will be overridden by activated profiles and by child POMs.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Reopened: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=all ]
John Casey reopened MNG-835:
----------------------------
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-1
>
> Original Estimate: 3 hours
> Time Spent: 3 hours
> Remaining: 0 minutes
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-835) Default profile in pom.xml not activated
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=all ]
Brett Porter updated MNG-835:
-----------------------------
Fix Version: 2.0-beta-2
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Fix For: 2.0-beta-2
>
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46257 ]
John Casey commented on MNG-835:
--------------------------------
Fair point. I'll put it in.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46246 ]
Mark Hobson commented on MNG-835:
---------------------------------
Another use-case if it helps..
I currently require the concept of a default profile in my project to control database configuration files. I have a default profile that pulls in a development db config and a live profile that uses a live db config. Without one of these specified the build will break, but obviously they're mutually exclusive so a default profile makes sense here.
POM properties would suffice if they could be overridden at the command-line, but I think it'd be nicer to be able to activate a non-default profile - e.g. "m2 install" for default, "m2 -Plive install" to use the 'live' profile rather than the default.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46253 ]
John Casey commented on MNG-835:
--------------------------------
Replying to Mark above:
Not sure I understand...you're talking about a development property set, versus a profile-driven one for the 'live' scenario, correct? Then what would happen if you specified the development information within the properties section just under the project root element, then used a profile in-line to activate the 'live' overrides, as such:
<project>
...
<properties>
<db.url>jdbc:hsqldb://path/to/some/file</db.url>
</properties>
<profiles>
<profile>
<id>live</id>
<activation>
<property><name>live</name></property>
</activation>
<properties>
<db.url>jdbc:oracle:...</db.url>
</properties>
</profile>
</profiles>
</project>
Does this solve your issue? I'll await your answer before re-closing this issue.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46247 ]
John Casey commented on MNG-835:
--------------------------------
Actually, the profiles.xml also provides <activeProfiles/>. Checking that this is honored.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "Mark Hobson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46255 ]
Mark Hobson commented on MNG-835:
---------------------------------
I'm currently using profiles to augment the normal build resources and configure plugins for deployment, for example:
<project>
...
<profiles>
<profile>
<id>default</id>
<activation>
<property>
<name>profile</name>
<value>default</value>
</property>
</activation>
<build>
<resources>
<resource>
<directory>src/profiles/default/resources</directory>
</resource>
</resources>
<plugins>
...
</plugins>
</build>
</profile>
<profile>
<id>live</id>
<activation>
<property>
<name>profile</name>
<value>live</value>
</property>
</activation>
<build>
<finalName>ROOT</finalName>
<resources>
<resource>
<directory>src/profiles/live/resources</directory>
</resource>
</resources>
<plugins>
...
</plugins>
</build>
</profile>
</profiles>
...
</project>
Ideally I'd remove the activation block for both in preference to using the -P switch at buildtime. Although of course one profile needs to activated, hence the need to specify a default profile. Does this make sense or do you see a better way of achieving this?
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
> Original Estimate: 3 hours
> Remaining: 3 hours
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: [jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Your syntax on the project-level properties is correct. As it turns out,
profiles.xml supports <activeProfiles/> too (I'd forgotten). Will this
eliminate the need for <always/> and <default/> for this file? I'm not
sure I understand the use case where it might not...
Thanks,
john
Vincent Massol wrote:
| Hi John,
|
|
|>-----Original Message-----
|>From: John Casey (JIRA) [mailto:jira@codehaus.org]
|>Sent: lundi 12 septembre 2005 22:23
|>To: dev@maven.apache.org
|>Subject: [jira] Commented: (MNG-835) Default profile in pom.xml not
|>activated
|
|
| [snip]
|
|
|><always/> doesn't really have the same semantics, though...does it? When
|>you specify <always/> it would seem to indicate to me that this profile
|>will always be in effect to some measure. When you set a default profile,
|>it means that profile will be activated if no others are, doesn't it?
|>
|>What I really want to get at here is whether it makes sense to have a
|>default profile, particularly now that you can specify:
|>
|><project>
|> ...
|> <properties>
|> <someproperty>somevalue</someproperty>
|> </properties>
|></project>
|>
|>In the case of a default value for a property, this should suffice.
|
|
| Right. I wasn't sure how you specified what you called pom-level
properties.
| That should be enough indeed for default property values. So the following
| will work right?
|
| <build>
| <plugins>
| <plugin>
| <artifactId>maven-surefire-plugin</artifactId>
| <configuration>
| <systemProperties combine.children="append">
| <property>
| <name>cargo.containers</name>
| <value>${cargo.containers}</value>
| </property>
| </systemProperties>
| </configuration>
| </plugin>
| </plugins>
| </build>
| <properties>
| <cargo.containers>resin3x, orion2x,...</cargo.containers>
| </properties>
|
| And if the cargo.containers property is defined in a profile it will
| override the default value?
|
|
|>Beyond
|>that, having a default profile in settings.xml doesn't really make sense,
|>since you can activate a profile using <activeProfiles/> in the
|>settings.xml itself.
|
|
| true
|
|
|>If you're using a profiles.xml, there may be a time when you need
|><always/> or <default/> or somesuch...I'll investigate adding both.
|
|
| Yep that's the only remaining point I have.
|
| Thanks
| -Vincent
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
| For additional commands, e-mail: dev-help@maven.apache.org
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDJerNK3h2CZwO/4URAhAZAJ9HbAf3h5RK9YhqPHylqNg1wIdFLgCfcTcD
WhX48aiqyuqi26KazzA5qpc=
=Z66K
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: [jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by Vincent Massol <vm...@pivolis.com>.
Hi John,
> -----Original Message-----
> From: John Casey (JIRA) [mailto:jira@codehaus.org]
> Sent: lundi 12 septembre 2005 22:23
> To: dev@maven.apache.org
> Subject: [jira] Commented: (MNG-835) Default profile in pom.xml not
> activated
[snip]
> <always/> doesn't really have the same semantics, though...does it? When
> you specify <always/> it would seem to indicate to me that this profile
> will always be in effect to some measure. When you set a default profile,
> it means that profile will be activated if no others are, doesn't it?
>
> What I really want to get at here is whether it makes sense to have a
> default profile, particularly now that you can specify:
>
> <project>
> ...
> <properties>
> <someproperty>somevalue</someproperty>
> </properties>
> </project>
>
> In the case of a default value for a property, this should suffice.
Right. I wasn't sure how you specified what you called pom-level properties.
That should be enough indeed for default property values. So the following
will work right?
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties combine.children="append">
<property>
<name>cargo.containers</name>
<value>${cargo.containers}</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<cargo.containers>resin3x, orion2x,...</cargo.containers>
</properties>
And if the cargo.containers property is defined in a profile it will
override the default value?
> Beyond
> that, having a default profile in settings.xml doesn't really make sense,
> since you can activate a profile using <activeProfiles/> in the
> settings.xml itself.
true
> If you're using a profiles.xml, there may be a time when you need
> <always/> or <default/> or somesuch...I'll investigate adding both.
Yep that's the only remaining point I have.
Thanks
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=comments#action_46244 ]
John Casey commented on MNG-835:
--------------------------------
<always/> doesn't really have the same semantics, though...does it? When you specify <always/> it would seem to indicate to me that this profile will always be in effect to some measure. When you set a default profile, it means that profile will be activated if no others are, doesn't it?
What I really want to get at here is whether it makes sense to have a default profile, particularly now that you can specify:
<project>
...
<properties>
<someproperty>somevalue</someproperty>
</properties>
</project>
In the case of a default value for a property, this should suffice. Beyond that, having a default profile in settings.xml doesn't really make sense, since you can activate a profile using <activeProfiles/> in the settings.xml itself.
If you're using a profiles.xml, there may be a time when you need <always/> or <default/> or somesuch...I'll investigate adding both.
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-2
>
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Closed: (MNG-835) Default profile in pom.xml not activated
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-835?page=all ]
John Casey closed MNG-835:
--------------------------
Resolution: Fixed
Fix Version: (was: 2.0-beta-2)
2.0-beta-1
> Default profile in pom.xml not activated
> ----------------------------------------
>
> Key: MNG-835
> URL: http://jira.codehaus.org/browse/MNG-835
> Project: Maven 2
> Type: Bug
> Components: maven-core
> Versions: 2.0-alpha-3
> Reporter: Vincent Massol
> Assignee: John Casey
> Fix For: 2.0-beta-1
>
> Original Estimate: 3 hours
> Time Spent: 3 hours
> Remaining: 0 minutes
>
> Pasted email from mailing list explaining the problem. I've also ran "m2 projecthelp:active-profiles" and it doesn't show the profile as active.
> ---
> Hi,
> I want to allow cargo build users to override a plugin property. I have seen that using a <build> element is not allowed in a settings.xml file and Brett has suggested I use a <properties> element instead. However I also need to define a default value for the property that can be overridden.
> Thus I have defined the following in my project's pom.xml:
> [...]
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties combine.children="append">
> <property>
> <name>cargo.containers</name>
> <value>${cargo.containers}</value>
> </property>
> [...]
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <cargo.containers>jetty4xEmbedded</cargo.containers>
> </properties>
> </profile>
> </profiles>
> </project>
> I want cargo build users to be able to create a settings.xml file with the following for example:
> <settings>
> <profiles>
> <profile>
> <id>user-vmassol</id>
> <properties>
> <cargo.containers>resin3x</cargo.containers>
> </properties>
> </profile>
> </profiles>
> <activeProfiles>
> <activeProfile>user-vmassol</activeProfile>
> </activeProfiles>
> </settings>
> Is that the correct way to implement my use case?
> So far, the issue I've had is that the default profile created in pom.xml is not used when I issue a "m2 install" command. I've read on http://docs.codehaus.org/display/MAVEN/Build+Profiles that naming a profile "default" will automatically activate it. Isn't that so?
> If not how can I activate a profile defined in pom.xml by default?
> Thanks a lot
> -Vincent
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org