[GitHub] [maven-site] asfgit closed pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
asfgit closed pull request #225: URL: https://github.com/apache/maven-site/pull/225 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] asfgit closed pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
asfgit closed pull request #225: URL: https://github.com/apache/maven-site/pull/225 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] rfscholte commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
rfscholte commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554558015 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Stick to `!?` only please. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] pzygielo commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
pzygielo commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554014876 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: > Instead of ! you can also use the minus sign, by the way. Then you might be affected by something like MNG-7011. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] MartinKanters commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
MartinKanters commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554007128 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Instead of ! you can also use the minus sign, by the way. ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: In the current implementation there is an order in place: - !? is correct and means: "do not activate the profile, but do not fail if it does not exist" - ?! is not correct.. do you think we should support this as well? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] michael-o commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
michael-o commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553996067 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Correct the ! can be disabled in bash and is a bash problem, not ours. ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: How do I interprete `!?`? Is it the same as `?!`? ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Alright. Keep one consistent option. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] slawekjaranowski commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
slawekjaranowski commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553961399 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -100,9 +100,11 @@ Introduction to Build Profiles profile IDs to use. The profile(s) specified in the option are activated in addition to any profiles which are activated by their activation configuration or the <<<\>>> section in <<>>. + Maven will refuse to activate or deactivate a profile that cannot be resolved. + To prevent this, prefix the profile identifier with an <<>>, marking it as optional: Review comment: Does this behavior will be implemented in current version `3.6.x`? - if not, information which version will be impact will be useful ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: did you try from console ... I have : ``` $ mvn -N validate -P !profile-1,!profile-2 bash: !profile-1,!profile-2: event not found ``` ``` $ bash --version GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin19.6.0) ``` ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: did you try from console ... I have : ``` $ mvn -N validate -P !profile-1,!profile-2 bash: !profile-1,!profile-2: event not found ``` ``` $ bash --version GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin19.6.0) ``` ``` $ mvn --version Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] mthmulders commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
mthmulders commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553965389 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -100,9 +100,11 @@ Introduction to Build Profiles profile IDs to use. The profile(s) specified in the option are activated in addition to any profiles which are activated by their activation configuration or the <<<\>>> section in <<>>. + Maven will refuse to activate or deactivate a profile that cannot be resolved. + To prevent this, prefix the profile identifier with an <<>>, marking it as optional: Review comment: Makes sense, updated. ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Should be `mvn -N validate -P \!profile-1,\!profile-2`, but I think it depends on the shell you use. For now, I followed the existing guide... ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: > Then you might be affected by something like MNG-7011. Correct - although that is not something that is introduced by [MNG-7051](https://issues.apache.org/jira/browse/MNG-7051). This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] michael-o commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
michael-o commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554064780 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Alright. Keep one consistent option. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] MartinKanters commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
MartinKanters commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554058099 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: In the current implementation there is an order in place: - !? is correct and means: "do not activate the profile, but do not fail if it does not exist" - ?! is not correct.. do you think we should support this as well? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] michael-o commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
michael-o commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554041608 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: How do I interprete `!?`? Is it the same as `?!`? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] mthmulders commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
mthmulders commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554024978 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: > Then you might be affected by something like MNG-7011. Correct - although that is not something that is introduced by [MNG-7051](https://issues.apache.org/jira/browse/MNG-7051). This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] pzygielo commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
pzygielo commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554014876 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: > Instead of ! you can also use the minus sign, by the way. Then you might be affected by something like MNG-7011. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] MartinKanters commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
MartinKanters commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r554007128 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Instead of ! you can also use the minus sign, by the way. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] michael-o commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
michael-o commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553996067 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Correct the ! can be disabled in bash and is a bash problem, not ours. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] mthmulders commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
mthmulders commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553966399 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: Should be `mvn -N validate -P \!profile-1,\!profile-2`, but I think it depends on the shell you use. For now, I followed the existing guide... This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] mthmulders commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
mthmulders commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553965389 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -100,9 +100,11 @@ Introduction to Build Profiles profile IDs to use. The profile(s) specified in the option are activated in addition to any profiles which are activated by their activation configuration or the <<<\>>> section in <<>>. + Maven will refuse to activate or deactivate a profile that cannot be resolved. + To prevent this, prefix the profile identifier with an <<>>, marking it as optional: Review comment: Makes sense, updated. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] slawekjaranowski commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
slawekjaranowski commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553964597 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: did you try from console ... I have : ``` $ mvn -N validate -P !profile-1,!profile-2 bash: !profile-1,!profile-2: event not found ``` ``` $ bash --version GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin19.6.0) ``` ``` $ mvn --version Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] slawekjaranowski commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
slawekjaranowski commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553964597 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -307,7 +309,7 @@ mvn groupId:artifactId:goal -Denvironment=test identifier with either the character '!' or '-' as shown below: +---+ -mvn groupId:artifactId:goal -P !profile-1,!profile-2 +mvn groupId:artifactId:goal -P !profile-1,!profile-2,!?profile-3 Review comment: did you try from console ... I have : ``` $ mvn -N validate -P !profile-1,!profile-2 bash: !profile-1,!profile-2: event not found ``` ``` $ bash --version GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin19.6.0) ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] slawekjaranowski commented on a change in pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
slawekjaranowski commented on a change in pull request #225: URL: https://github.com/apache/maven-site/pull/225#discussion_r553961399 ## File path: content/apt/guides/introduction/introduction-to-profiles.apt ## @@ -100,9 +100,11 @@ Introduction to Build Profiles profile IDs to use. The profile(s) specified in the option are activated in addition to any profiles which are activated by their activation configuration or the <<<\>>> section in <<>>. + Maven will refuse to activate or deactivate a profile that cannot be resolved. + To prevent this, prefix the profile identifier with an <<>>, marking it as optional: Review comment: Does this behavior will be implemented in current version `3.6.x`? - if not, information which version will be impact will be useful This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] [maven-site] mthmulders opened a new pull request #225: [MNG-7051] Add examples of ? prefix in profile activation
mthmulders opened a new pull request #225: URL: https://github.com/apache/maven-site/pull/225 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Profile Activation
The behavior is AND. You can have multiple profiles for OR. Chas > On Aug 15, 2016, at 11:45 AM, Christopher <ctubb...@apache.org> wrote: > > If there could be "AND" and "OR" primitives for profile activation > conditions, you could do something like: > > > > !profilea > > > profilea > !true > > > > Sadly, this feature does not exist. > >> On Fri, Aug 12, 2016, 11:45 Karl Heinz Marbaise <khmarba...@gmx.de> wrote: >> >> Hi to all, >> >> I have the following profile: >> >> >> >> profile-not-value-true >> >> >> profilea >> !true >> >> >> >> >> >> com.soebes.maven.plugins >> echo-maven-plugin >> >> >> initialize >> >> echo >> >> >> >> >> >> profile not value true >> >> >> >> >> >> >> >> So the question is: What would you expect you need to do to activate >> this profile? >> >> Currently this profile is activated cause if I don't define the property >> "profilea" at all it seemed to that Maven is assuming this means "not >> value 'true'" ? >> >> I have assumed it should be activated if the property exists which means >> giving it on command line like this: >> >> mvn -Dprofilea >> >> >> >> WDYT ? >> >> Kind regards >> Karl Heinz Marbaise >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org >> For additional commands, e-mail: dev-h...@maven.apache.org >> >> - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Profile Activation
If there could be "AND" and "OR" primitives for profile activation conditions, you could do something like: !profilea profilea !true Sadly, this feature does not exist. On Fri, Aug 12, 2016, 11:45 Karl Heinz Marbaise <khmarba...@gmx.de> wrote: > Hi to all, > > I have the following profile: > > > >profile-not-value-true > > >profilea >!true > > > > > > com.soebes.maven.plugins > echo-maven-plugin > > > initialize > >echo > > > > > > profile not value true > > > > > > > > So the question is: What would you expect you need to do to activate > this profile? > > Currently this profile is activated cause if I don't define the property > "profilea" at all it seemed to that Maven is assuming this means "not > value 'true'" ? > > I have assumed it should be activated if the property exists which means > giving it on command line like this: > > mvn -Dprofilea > > > > WDYT ? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >
Re: Profile Activation
Hi, I could also reverse the question: how can I have an active profile by default, which should not be activated when skipITs is set to true. I don't think there's another solution than the current one. The fact that skipITs is treated as a boolean makes this example always work and there's no discussion. Confusion starts because the property can have more than 2 values. It all depends on the definition. For me it makes perfectly sense that 'mvn package -Denvironment=prod' and 'mvn package', since it fits with "always active unless environment is production". AFAIK the current logic has been there since the early versions of Maven, so I consider it as "works as designed". The funny thing is that we say you cannot program within the pom, but this not-expression is the only with some logic and not it seems it is causing trouble. Robert On Fri, 12 Aug 2016 21:18:06 +0200, Karl Heinz Marbaise <khmarba...@gmx.de> wrote: Hi, First I have added the documentation about the opportunities like this (and other one as well a few days before, cause there had been no documentation about that at all https://issues.apache.org/jira/browse/MNGSITE-234): !debug ... which means if the property does not exist...and also works exactly like this. The value does not matter nor is needed to give some. If I argue from a logical point of view I would say (and expect): debug !true ... This would mean: The value is not equal "true"...but the property must exist...so something like "-Ddebug=WHATEVER" The current behaviour is that the previous sentence will be calculated by Maven as: The property is not important nor is needed to exists..and the values is not equal to "true"..which I think is wrong... So it is not possible to express a thing like this: environment !dev ... So this will be activated always...So the call: mvn package -Denvironment=prod mvn package would be equivalent...which I think is wrong... So it is not possible to identify a difference between those two Maven calls. Furthermore if I like to use a combination of two profiles like this: not-existing !environment ... not-dev environment !dev ... So if I call maven via: mvn package the last will take precendence... Kind regards Karl Heinz Marbaise On 12/08/16 19:32, Robert Scholte wrote: Hi, Yes, this is correct. Just to clarify: -Dx is always the same is -Dx=true [1] I'd like to add -Dprofilea= : profile activated 5. mvn initialize -Dprofilea= : profile activated maybe if the property was called skipITs instead of profilea the examples are better to follow, i.e. always activate this profile (with integration-tests), *unless* skipITs is true. Robert [1] https://maven.apache.org/ref/3.3.9/maven-embedder/xref/org/apache/maven/cli/MavenCli.html#L1544 On Fri, 12 Aug 2016 18:59:14 +0200, Guillaume Boué <gb...@apache.org> wrote: Hi Robert, If this is expected, I think the documentation in http://maven.apache.org/guides/introduction/introduction-to-profiles.html should indeed be clarified. Currently, in that situation, it says "The following profile will be activated when the system property "debug" is defined with a value which is not "true"." In this case, when invoking Maven with "mvn initialize", profilea isn't defined so I would expect the profile not to be activated. This is also what would happen if the value in the profile activation was commented out. To recap, this is the current result with Maven 3.3.9 for this situation (and latest 3.4.0-SNAPSHOT): 1. mvn initialize: profile activated 2. mvn initialize -Dprofilea: profile not activated 3. mvn initialize -Dprofilea=false: profile activated 4. mvn initialize -Dprofilea=true: profile not activated Guillaume Message du 12/08/16 18:34 De : "Robert Scholte" A : "Maven Developers List" Copie à : Objet : Re: Profile Activation Hi Karl Heinz, you should read the activation like this: always activate, *unless* profilea is true. So it says nothing about the availability of the property. Maybe the documentation isn't clear enough. Robert On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise wrote: > Hi to all, > > I have the following profile: > > > > profile-not-value-true > > > profilea > !true > > > > > > com.soebes.maven.plugins > echo-maven-plugin > > > initialize > > echo > > > > > > profile not value true > > > > > > > > So the question is: What would you expect you need to do to act
Re: Profile Activation
Hi, First I have added the documentation about the opportunities like this (and other one as well a few days before, cause there had been no documentation about that at all https://issues.apache.org/jira/browse/MNGSITE-234): !debug ... which means if the property does not exist...and also works exactly like this. The value does not matter nor is needed to give some. If I argue from a logical point of view I would say (and expect): debug !true ... This would mean: The value is not equal "true"...but the property must exist...so something like "-Ddebug=WHATEVER" The current behaviour is that the previous sentence will be calculated by Maven as: The property is not important nor is needed to exists..and the values is not equal to "true"..which I think is wrong... So it is not possible to express a thing like this: environment !dev ... So this will be activated always...So the call: mvn package -Denvironment=prod mvn package would be equivalent...which I think is wrong... So it is not possible to identify a difference between those two Maven calls. Furthermore if I like to use a combination of two profiles like this: not-existing !environment ... not-dev environment !dev ... So if I call maven via: mvn package the last will take precendence... Kind regards Karl Heinz Marbaise On 12/08/16 19:32, Robert Scholte wrote: Hi, Yes, this is correct. Just to clarify: -Dx is always the same is -Dx=true [1] I'd like to add -Dprofilea= : profile activated 5. mvn initialize -Dprofilea= : profile activated maybe if the property was called skipITs instead of profilea the examples are better to follow, i.e. always activate this profile (with integration-tests), *unless* skipITs is true. Robert [1] https://maven.apache.org/ref/3.3.9/maven-embedder/xref/org/apache/maven/cli/MavenCli.html#L1544 On Fri, 12 Aug 2016 18:59:14 +0200, Guillaume Boué <gb...@apache.org> wrote: Hi Robert, If this is expected, I think the documentation in http://maven.apache.org/guides/introduction/introduction-to-profiles.html should indeed be clarified. Currently, in that situation, it says "The following profile will be activated when the system property "debug" is defined with a value which is not "true"." In this case, when invoking Maven with "mvn initialize", profilea isn't defined so I would expect the profile not to be activated. This is also what would happen if the value in the profile activation was commented out. To recap, this is the current result with Maven 3.3.9 for this situation (and latest 3.4.0-SNAPSHOT): 1. mvn initialize: profile activated 2. mvn initialize -Dprofilea: profile not activated 3. mvn initialize -Dprofilea=false: profile activated 4. mvn initialize -Dprofilea=true: profile not activated Guillaume Message du 12/08/16 18:34 De : "Robert Scholte" A : "Maven Developers List" Copie à : Objet : Re: Profile Activation Hi Karl Heinz, you should read the activation like this: always activate, *unless* profilea is true. So it says nothing about the availability of the property. Maybe the documentation isn't clear enough. Robert On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise wrote: > Hi to all, > > I have the following profile: > > > > profile-not-value-true > > > profilea > !true > > > > > > com.soebes.maven.plugins > echo-maven-plugin > > > initialize > > echo > > > > > > profile not value true > > > > > > > > So the question is: What would you expect you need to do to activate > this profile? > > Currently this profile is activated cause if I don't define the property > "profilea" at all it seemed to that Maven is assuming this means "not > value 'true'" ? > > I have assumed it should be activated if the property exists which means > giving it on command line like this: > > mvn -Dprofilea > > > > WDYT ? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mai
Re: Profile Activation
On 12/08/16 18:34, Robert Scholte wrote: Maybe the documentation isn't clear enough. I have added the documentation about the property activation with "!" things a few days ago... Either my assumption was wrong or the the intention is wrong... Kind regards Karl Heinz - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Profile Activation
Hi, Yes, this is correct. Just to clarify: -Dx is always the same is -Dx=true [1] I'd like to add -Dprofilea= : profile activated 5. mvn initialize -Dprofilea= : profile activated maybe if the property was called skipITs instead of profilea the examples are better to follow, i.e. always activate this profile (with integration-tests), *unless* skipITs is true. Robert [1] https://maven.apache.org/ref/3.3.9/maven-embedder/xref/org/apache/maven/cli/MavenCli.html#L1544 On Fri, 12 Aug 2016 18:59:14 +0200, Guillaume Boué <gb...@apache.org> wrote: Hi Robert, If this is expected, I think the documentation in http://maven.apache.org/guides/introduction/introduction-to-profiles.html should indeed be clarified. Currently, in that situation, it says "The following profile will be activated when the system property "debug" is defined with a value which is not "true"." In this case, when invoking Maven with "mvn initialize", profilea isn't defined so I would expect the profile not to be activated. This is also what would happen if the value in the profile activation was commented out. To recap, this is the current result with Maven 3.3.9 for this situation (and latest 3.4.0-SNAPSHOT): 1. mvn initialize: profile activated 2. mvn initialize -Dprofilea: profile not activated 3. mvn initialize -Dprofilea=false: profile activated 4. mvn initialize -Dprofilea=true: profile not activated Guillaume Message du 12/08/16 18:34 De : "Robert Scholte" A : "Maven Developers List" Copie à : Objet : Re: Profile Activation Hi Karl Heinz, you should read the activation like this: always activate, *unless* profilea is true. So it says nothing about the availability of the property. Maybe the documentation isn't clear enough. Robert On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise wrote: > Hi to all, > > I have the following profile: > > > > profile-not-value-true > > > profilea > !true > > > > > > com.soebes.maven.plugins > echo-maven-plugin > > > initialize > > echo > > > > > > profile not value true > > > > > > > > So the question is: What would you expect you need to do to activate > this profile? > > Currently this profile is activated cause if I don't define the property > "profilea" at all it seemed to that Maven is assuming this means "not > value 'true'" ? > > I have assumed it should be activated if the property exists which means > giving it on command line like this: > > mvn -Dprofilea > > > > WDYT ? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Profile Activation
Hi Robert, If this is expected, I think the documentation in http://maven.apache.org/guides/introduction/introduction-to-profiles.html should indeed be clarified. Currently, in that situation, it says "The following profile will be activated when the system property "debug" is defined with a value which is not "true"." In this case, when invoking Maven with "mvn initialize", profilea isn't defined so I would expect the profile not to be activated. This is also what would happen if the value in the profile activation was commented out. To recap, this is the current result with Maven 3.3.9 for this situation (and latest 3.4.0-SNAPSHOT): 1. mvn initialize: profile activated 2. mvn initialize -Dprofilea: profile not activated 3. mvn initialize -Dprofilea=false: profile activated 4. mvn initialize -Dprofilea=true: profile not activated Guillaume > Message du 12/08/16 18:34 > De : "Robert Scholte" > A : "Maven Developers List" > Copie à : > Objet : Re: Profile Activation > > Hi Karl Heinz, > > you should read the activation like this: > always activate, *unless* profilea is true. > So it says nothing about the availability of the property. > Maybe the documentation isn't clear enough. > > Robert > > On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaise > wrote: > > > Hi to all, > > > > I have the following profile: > > > > > > > > profile-not-value-true > > > > > > profilea > > !true > > > > > > > > > > > > com.soebes.maven.plugins > > echo-maven-plugin > > > > > > initialize > > > > echo > > > > > > > > > > > > profile not value true > > > > > > > > > > > > > > > > So the question is: What would you expect you need to do to activate > > this profile? > > > > Currently this profile is activated cause if I don't define the property > > "profilea" at all it seemed to that Maven is assuming this means "not > > value 'true'" ? > > > > I have assumed it should be activated if the property exists which means > > giving it on command line like this: > > > > mvn -Dprofilea > > > > > > > > WDYT ? > > > > Kind regards > > Karl Heinz Marbaise > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >
Re: Profile Activation
Hi Karl Heinz, you should read the activation like this: always activate, *unless* profilea is true. So it says nothing about the availability of the property. Maybe the documentation isn't clear enough. Robert On Fri, 12 Aug 2016 17:45:21 +0200, Karl Heinz Marbaisewrote: Hi to all, I have the following profile: profile-not-value-true profilea !true com.soebes.maven.plugins echo-maven-plugin initialize echo profile not value true So the question is: What would you expect you need to do to activate this profile? Currently this profile is activated cause if I don't define the property "profilea" at all it seemed to that Maven is assuming this means "not value 'true'" ? I have assumed it should be activated if the property exists which means giving it on command line like this: mvn -Dprofilea WDYT ? Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: Profile Activation
MG>quick comment > To: dev@maven.apache.org > From: khmarba...@gmx.de > Subject: Profile Activation > Date: Fri, 12 Aug 2016 17:45:21 +0200 > > Hi to all, > > I have the following profile: > > > >profile-not-value-true > > >profilea >!true > > > > > > com.soebes.maven.plugins > echo-maven-plugin > > > initialize > >echo > > > > > > profile not value true > > > > > > > > So the question is: What would you expect you need to do to activate > this profile? > > Currently this profile is activated cause if I don't define the property > "profilea" at all it seemed to that Maven is assuming this means "not > value 'true'" ? > > I have assumed it should be activated if the property exists which means > giving it on command line like this: > > mvn -DprofileaMG>assumes the property *must* exist as documented at MG>http://maven.apache.org/guides/introduction/introduction-to-profiles.html MG>if ok for system property to not exist or system property to *not* be defined then either: MG>fix code to detect system property must exist to conform to doc MG>ORMG>change doc to say : The following profile will be activated when the system property "debug" is defined with a value which is not "true" -OR- when system property "debug" does not exist or when system property "debug" was never defined > MG>*Methinks you found a bug Karl* > > WDYT ? > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org >
Profile Activation
Hi to all, I have the following profile: profile-not-value-true profilea !true com.soebes.maven.plugins echo-maven-plugin initialize echo profile not value true So the question is: What would you expect you need to do to activate this profile? Currently this profile is activated cause if I don't define the property "profilea" at all it seemed to that Maven is assuming this means "not value 'true'" ? I have assumed it should be activated if the property exists which means giving it on command line like this: mvn -Dprofilea WDYT ? Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Fwd: About profile activation with JSR223
I have redesigned the project. It is available at https://github.com/rrialq/jsr223-profile-activator-extension. Instead of resolving properties the extension resolves expressions with the help of Maven interpolator, so it is possible use the original names of properties and it is possible to write complex expressions. An example (please, keep in mind that the following example was written considering the simplicity of the same, not its correct syntax, so the XML presented here is not well formed. For example, instead of the && you must write ): MY_SITE_SKIP_ACTIVATED = var mySiteSkip = aitor.eval('${MY_SITE_SKIP}').getBoolean(false); var reportsEnabled = aitor.eval('${REPORTS_ENABLED}').getBoolean(false); var reportsLevel = aitor.eval('${REPORTS_LEVEL}').getInt(0); var siteUrl = aitor.eval('${SITE_URL}').getString(''); var siteDefined = ( siteUrl != '' ); mySiteSkip && reportsEnabled && ( reportsLevel > 0 ) && siteDefined -- Reply message -- From: Ramón Rial <rri...@gmail.com> Date: 2015-08-25 19:57 GMT+02:00 Subject: About profile activation with JSR223 To: dev@maven.apache.org Hello. *About JSR223 support for activating Profiles* I have a modified version of *PropertyProfileActivation.java* that allows activate a profile evaluating a script. I've done that with JSR223, and it is a minimal modification. The idea is: - Keep the old funcionality for property profile activation. - Allow the evaluation of scripts in some of the JSR223 languages allowed. - Add to the context of the evaluation the *ProjectProperties*, the *UserProperties* and *SystemProperties*. *An example of this:* =JavaScript ( projectProperty == 'value' systemProperty == '45' ) || ( userProperty == 'development' ) The explanation The key to get this without modifying the current model of pom and choose an ScriptEngine is the name of the property. It begins with "*=*" (equals) char, to indicate that value is a JSR223 script, and after the equals char the name of the script engine. We write the script in the value tag. You can see in the example that we use system properties, project properties and user properties, *AND* and *OR* logical operators, so you can write so complex scripts as you want. The logical AND should be written as because of XML. *IMPORTANT*: The new *PropertyProfileActivation.java* converts the name of the project properties, system properties and user properties to a safe name, to allow use them in the script, so if you have a project property with the name "*my.project.property*" it will be replaced in the script context to "*my_project_property*". Question Do you think this could be interesting for Maven 3? Greetings.
About profile activation with JSR223
Hello. *About JSR223 support for activating Profiles* I have a modified version of *PropertyProfileActivation.java* that allows activate a profile evaluating a script. I've done that with JSR223, and it is a minimal modification. The idea is: - Keep the old funcionality for property profile activation. - Allow the evaluation of scripts in some of the JSR223 languages allowed. - Add to the context of the evaluation the *ProjectProperties*, the *UserProperties* and *SystemProperties*. *An example of this:* profile activation property name=JavaScript/name value( projectProperty == 'value' amp;amp; systemProperty == '45' ) || ( userProperty == 'development' )/value /property /activation /profile The explanation The key to get this without modifying the current model of pom and choose an ScriptEngine is the name of the property. It begins with *=* (equals) char, to indicate that value is a JSR223 script, and after the equals char the name of the script engine. We write the script in the value tag. You can see in the example that we use system properties, project properties and user properties, *AND* and *OR* logical operators, so you can write so complex scripts as you want. The logical AND should be written as amp;amp; because of XML. *IMPORTANT*: The new *PropertyProfileActivation.java* converts the name of the project properties, system properties and user properties to a safe name, to allow use them in the script, so if you have a project property with the name *my.project.property* it will be replaced in the script context to *my_project_property*. Question Do you think this could be interesting for Maven 3? Greetings.
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user mikebrock commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-46737130 I think that could be pretty cool. I see no reason why not. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user ChristianSchulte commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-46546268 Another option would be to provide support for activations based on some language like: activation expressionOS IS 'Linux' AND ( PROPERTY 'Some Name' IS 'true' OR JDK IS '1.6 )/expression /activation Maybe some scripting language provided by the platform ScriptEngine. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user ChristianSchulte commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-46547866 Could be as simple as: ``` activation script engine-name= || extension= || mime-type=simple script evaluating to a boolean/script /activation ``` 'engine-name' translates to javax.script.ScriptEngine.getEngineByName() 'extension' translates to javax.script.ScriptEngine.getEngineByExtension() 'mime-type' translates to javax.script.ScriptEngine.getEngineByMimeType() All you need to do is populating the corresponding script engine scope with some pre-defined values. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-46555048 I think Christian's idea is better as the logic is contained to the specific activator. I'm not keen at all to add conditional logic to the POM model anywhere, or any type of expression language being required for the POM 4.0.0 model or general XML model. Maybe an activator using MVEL would work well. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-46562788 @mikebrock Do you think MVEL would be suitable for a one expression evaluator for a Maven profile activator? Imagine putting a MavenProject/pom.xml in the MVEL context and doing some boolean evaluation. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user FredipusRex commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-46523185 You do realize that the current OR condition is actually out in use right now in many POM files, right? This was previously the subject of a patch (MNG-3106) - originally only one condition was accepted which was patched to allow for ORing of conditions - arguably the wrong thing to do, but it's pretty well understood out in the Maven community. While this patch finally matches Maven to the Sonatype book, it will break a lot of POMs without recourse other than multiple, near duplicate activations. The right way to fix this would have been to add the ability to specify the condition (AND, OR), perhaps through a set of tag attributes. activation property nameJDKCheck/name valuetrue/value /property property nameNeedsJava4or5/name /property os group=1 condition=OR group-condition=AND nameLinux/name /os jdk group=11.6/jdk jdk group=2 condition=AND group-condition=OR1.4/jdk jdk group=21.5/jdk /activation All conditions now belong to a group - either the default group or a named group attribute. Members of the default group have no attributes and are AND'd together (keeping the functionality of your patch). There do not need to be any members of the default group - in which case, it acts purely as glue to named groups. One member of each named group must indicate how the group relates to the default group via the condition attribute and how the members of the group are related to each other via the group-condition attribute. This allows compact but complex relationships. The above example is activated when the JDKCheck property is true and the NeedsJava4or5 property exists and the JDK is 1.4 or 1.5, or when compiling under Linux and the JDK is 1.6. It does not allow infinite numbers of levels and parenthetical statements, but does provide for most common build scenarios. When there are no members of the default group, it should be assumed to be not activated and the first group (if any) with the AND condition should be considered the default group. This allows something like group 1-OR with group 2-AND to act like an either/or choice. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-46524647 First of all - thanks for your email. I understand, that this will ruin current ORing technique, but at least it could be fixed with copying for a while. What about complex conditions - it's my next step, I see that people needs complicated conditions, so definitely me or somebody else could provide it . 4565 was the first step, to try how it will going. So, next step would be formalizing task for AND and OR in activation section and then it could be fixed too. Konstantin On Jun 19, 2014 8:45 AM, FredipusRex notificati...@github.com wrote: You do realize that the current OR condition is actually out in use right now in many POM files, right? This was previously the subject of a patch (MNG-3106) - originally only one condition was accepted which was patched to allow for ORing of conditions - arguably the wrong thing to do, but it's pretty well understood out in the Maven community. While this patch finally matches Maven to the Sonatype book, it will break a lot of POMs without recourse other than multiple, near duplicate activations. The right way to fix this would have been to add the ability to specify the condition (AND, OR), perhaps through a set of tag attributes. JDKCheck true NeedsJava4or5 Linux 1.6 1.4 1.5 All conditions now belong to a group - either the default group or a named group attribute. Members of the default group have no attributes and are AND'd together (keeping the functionality of your patch). There do not need to be any members of the default group - in which case, it acts purely as glue to named groups. One member of each named group must indicate how the group relates to the default group via the condition attribute and how the members of the group are related to each other via the group-condition attribute. This allows compact but complex relationships. The above example is activated when the JDKCheck property is true and the NeedsJava4or5 property exists and the JDK is 1.4 or 1.5, or when compiling under Linux and the JDK is 1.6. It does not allow infinite numbers of levels and parenthetical statements, but does provide for most common build scenarios. When there are no members of the default group, it should be assumed to be not activated and the first group (if any) with the AND condition should be considered the default group. This allows something like group 1-OR with group 2-AND to act like an either/or choice. â Reply to this email directly or view it on GitHub https://github.com/apache/maven/pull/20#issuecomment-46523185. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: MNG-3106 implemented profile activation incorrectly
the canonical documentation for that should be http://maven.apache.org/ref/3-LATEST/maven-model/maven.html#class_activation IMHO and yes, AND seems the right choice Regards, Hervé Le mardi 10 juin 2014 18:25:28 Jason van Zyl a écrit : I'm working on a PR for http://jira.codehaus.org/browse/MNG-4565, which is related to what happened in http://jira.codehaus.org/browse/MNG-3106 in that profiles with multiple activators undergo an OR instead of an AND. If you want OR behaviour you can specify multiple profiles each with a single activator for the condition you want satisfied. It doesn't make any sense to OR multiple activators within a single profile because it's impossible to require multiple conditions to met for a profile to be activated. The Sonatype book is not our canonical documentation for Maven but has the only reference I can find describing the logic for multiple activators within a profile and it describes activators being AND'd: http://books.sonatype.com/mvnref-book/reference/profiles-sect-activation.htm l#profiles-sect-activation-config At the cost of potentially having to duplicate a profile to get OR behavior, at least it's possible to have AND behaviour with multiple activators being AND'd. In it's current form profile activation makes it impossible to do often required. Unless anyone objects I'm going to process http://jira.codehaus.org/browse/MNG-4565 and make multiple activators be AND'd. It's just been implemented incorrectly. Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io - To do two things at once is to do neither. -- Publilius Syrus, Roman slave, first century B.C. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise closed the pull request at: https://github.com/apache/maven/pull/20 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45731097 What's the link you used for reference? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45731386 http://jira.codehaus.org/browse/MNG-4565 - take a look here. It have link for reference http://books.sonatype.com/mvnref-book/reference/profiles-sect-activation.html#profiles-sect-activation-config Quote: Activations can contain one of more selectors including JDK versions, Operating System parameters, files, and properties. A profile is activated when all activation criteria has been satisfied. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45731568 Yes, that is the Sonatype book which is the de facto reference for Maven but not the official specification but probably as close to one as we have. The actual documentation on the site regarding profiles is pretty vague. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45731774 Hm, probably you are correct. I've just have strong feeling, when somebody said 'Sonatype' - think about 'Maven' and vice-versa. Regarding PR, let me know, if I need to fix something or anything else. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45732464 Yes, that's not uncommon. The PR is fine, just waiting for any feedback on the Maven dev list. There is one IT I would disable going forward (which tests that the activators are OR'd) and write a new one that tests that activators are AND'd. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45744828 Ok, I've written an integration test and I'll see what falls out on the Maven dev list today. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user mosabua commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45811127 if we need to change something in the book - I can take care of that. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45811451 This change will actually make it match the book. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45820916 @Konstantin, I've applied your patch and pushed the integration test. Try it out and if it's good then close the pull request. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45825613 Let me check. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45826259 @jvanzyl Looks correct, please close this PR --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user asfgit closed the pull request at: https://github.com/apache/maven/pull/16 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-45643803 I'm sorry, I don't understand, why you close this PR? Does it bad? I miss something? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-45644286 Sorry, cut and paste error on my part when closing the other issues. Can you reopen the PR again and I'll process it this afternoon. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
GitHub user MysterionRise opened a pull request: https://github.com/apache/maven/pull/20 [MNG-4565] Multiple profile activation conditions does not work Add possibilty to use multiple activators and have AND between them You can merge this pull request into a Git repository by running: $ git pull https://github.com/MysterionRise/maven MNG-4565 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven/pull/20.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #20 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-45673757 I'm looking for a way to make this work, but this breaks MNG-3106 where the current behaviour is to OR the activators. I agree there are cases where AND is preferable but I don't want to break the existing behavior. Let me see what I can do. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
MNG-3106 implemented profile activation incorrectly
I'm working on a PR for http://jira.codehaus.org/browse/MNG-4565, which is related to what happened in http://jira.codehaus.org/browse/MNG-3106 in that profiles with multiple activators undergo an OR instead of an AND. If you want OR behaviour you can specify multiple profiles each with a single activator for the condition you want satisfied. It doesn't make any sense to OR multiple activators within a single profile because it's impossible to require multiple conditions to met for a profile to be activated. The Sonatype book is not our canonical documentation for Maven but has the only reference I can find describing the logic for multiple activators within a profile and it describes activators being AND'd: http://books.sonatype.com/mvnref-book/reference/profiles-sect-activation.html#profiles-sect-activation-config At the cost of potentially having to duplicate a profile to get OR behavior, at least it's possible to have AND behaviour with multiple activators being AND'd. In it's current form profile activation makes it impossible to do often required. Unless anyone objects I'm going to process http://jira.codehaus.org/browse/MNG-4565 and make multiple activators be AND'd. It's just been implemented incorrectly. Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io - To do two things at once is to do neither. -- Publilius Syrus, Roman slave, first century B.C.
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45681556 I have argued on the Maven dev list to process your patch. The current implementation I believe to be incorrect. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: MNG-3106 implemented profile activation incorrectly
No problem for me. While you are at it, the Maven Release notes on the website (if it exists yet for the upcoming version) should probably get a compatibility issue note about this. Cheers, Paul On Tue, Jun 10, 2014 at 5:25 PM, Jason van Zyl ja...@takari.io wrote: I'm working on a PR for http://jira.codehaus.org/browse/MNG-4565, which is related to what happened in http://jira.codehaus.org/browse/MNG-3106 in that profiles with multiple activators undergo an OR instead of an AND. If you want OR behaviour you can specify multiple profiles each with a single activator for the condition you want satisfied. It doesn't make any sense to OR multiple activators within a single profile because it's impossible to require multiple conditions to met for a profile to be activated. The Sonatype book is not our canonical documentation for Maven but has the only reference I can find describing the logic for multiple activators within a profile and it describes activators being AND'd: http://books.sonatype.com/mvnref-book/reference/profiles-sect-activation.html#profiles-sect-activation-config At the cost of potentially having to duplicate a profile to get OR behavior, at least it's possible to have AND behaviour with multiple activators being AND'd. In it's current form profile activation makes it impossible to do often required. Unless anyone objects I'm going to process http://jira.codehaus.org/browse/MNG-4565 and make multiple activators be AND'd. It's just been implemented incorrectly. Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io - To do two things at once is to do neither. -- Publilius Syrus, Roman slave, first century B.C.
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/20#issuecomment-45704618 I've implement this patch, only cause it's 100% relates with official documentation. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-45431277 Just wonder, is there anything I could do? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-45442939 Tonight I'll try to process all the outstanding PRs. I'll let you know if I need anything. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-45134460 I've update pull request. I change my approach, so it will not now a platform dependable. But ITs are still failing at weird place. I'm 100% sure, that it's not my fault --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-45138360 Cool, I'll take a look at look at the specific IT failure. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44831587 Good stuff. I will try it today. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44797771 I created a simple shell script to help validate a pull request against the Maven integration tests. This script is not great, and running the Maven integration tests is not exactly straight forward but this is a step in the right direction. Here is the shell script: https://gist.github.com/jvanzyl/16da25976f8ad27293fa Save the file to something like `maven-pr-validator.sh` and you run it by providing the PR #. So in your case you will run it as `maven-pr-validator.sh 16` and this will check out Maven, apply your patch, build Maven, check out the integration tests and run them against the just-build Maven. You will see that one of the integration tests is broken as a result of the patch. I will help you debug and fix it. This is not ideal but it's a step in the right direction in helping interested users vet their contributions automatically. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44749028 Any updates on my pull request? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
I applied your changes and your test fails. If you want to take look and validate I will take a look later in the weekend. --- T E S T S --- Running org.apache.maven.model.building.ComplexActivationTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.171 sec FAILURE! - in org.apache.maven.model.building.ComplexActivationTest testAndConditionInActivation(org.apache.maven.model.building.ComplexActivationTest) Time elapsed: 0.158 sec FAILURE! junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertNull(Assert.java:230) at junit.framework.Assert.assertNull(Assert.java:223) at org.apache.maven.model.building.ComplexActivationTest.testAndConditionInActivation(ComplexActivationTest.java:52) Running org.apache.maven.model.building.DefaultModelBuilderFactoryTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in org.apache.maven.model.building.DefaultModelBuilderFactoryTest Running org.apache.maven.model.inheritance.DefaultInheritanceAssemblerTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.678 sec - in org.apache.maven.model.inheritance.DefaultInheritanceAssemblerTest Running org.apache.maven.model.interpolation.StringSearchModelInterpolatorTest Tests run: 28, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.579 sec - in org.apache.maven.model.interpolation.StringSearchModelInterpolatorTest Running org.apache.maven.model.path.DefaultUrlNormalizerTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.apache.maven.model.path.DefaultUrlNormalizerTest Running org.apache.maven.model.profile.activation.JdkVersionProfileActivatorTest Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.103 sec - in org.apache.maven.model.profile.activation.JdkVersionProfileActivatorTest Running org.apache.maven.model.profile.activation.PropertyProfileActivatorTest Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.13 sec - in org.apache.maven.model.profile.activation.PropertyProfileActivatorTest Running org.apache.maven.model.validation.DefaultModelValidatorTest Tests run: 44, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.512 sec - in org.apache.maven.model.validation.DefaultModelValidatorTest Results : Failed tests: org.apache.maven.model.building.ComplexActivationTest#testAndConditionInActivation AssertionFailedError On May 31, 2014, at 10:00 AM, MysterionRise g...@git.apache.org wrote: Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44749028 Any updates on my pull request? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Thanks, Jason -- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io -
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44751378 Could you tell me, what did you use? I've run tests on Linux: mvn -version Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 17:51:28+0400) Maven home: /home/mysterion/Downloads/apache-maven-3.0.5 Java version: 1.7.0_25, vendor: Oracle Corporation Java home: /home/mysterion/Downloads/jdk1.7.0_25/jre Default locale: en_US, platform encoding: UTF-8 OS name: linux, version: 3.13.0-27-generic, arch: amd64, family: unix also, i've try with windows mvn -version Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T21:37:5 2+04:00) Maven home: C:\Users\User\Downloads\apache-maven-3.2.1-bin\apache-maven-3.2.1\bi n\.. Java version: 1.7.0_55, vendor: Oracle Corporation Java home: C:\Program Files (x86)\Java\jdk1.7.0_55\jre Default locale: ru_RU, platform encoding: Cp1251 OS name: windows 8, version: 6.2, arch: x86, family: windows and all tests are also passed. Did you use anything that isn't from family: windows or unix? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44755377 I used Maven, master branch at revision 73d35ba9597cd867717310ae8813376888debb9b. I applied your patch to master, and ran the tests with Maven 3.2.1 on OSX. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44755927 Awesome,this is the only platform, I couldn't test against.Could you specify your _mvn -version_ output? I will try to fix test. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44756291 Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00) Maven home: /Users/jvanzyl/m2 Java version: 1.7.0_21, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: mac os x, version: 10.9.2, arch: x86_64, family: mac But the same test fails against master as well. You might not want to use platform activators in the tests. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44756590 Not understand your point about failing against master. I agree that platform activators is not good idea. So same with JDK activator, right? I'm only left with existing/missing file (what I've already use) and property activator (which is tricky for testing) So, how we could resolve it? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44756676 I will take a look as soon as I can. Maybe making an activator specifically for helping us test this will be better. Thanks for being patient, we'll get this sorted and integrated. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44756700 Maybe creating an activator specifically for testing this might be better. I will take a look as soon as I can. Likely tomorrow. Thanks for your patience, we'll get this integrated shortly. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
Github user MysterionRise commented on the pull request: https://github.com/apache/maven/pull/16#issuecomment-44757042 I'm 100% don't wanna rush. I will think about special activator for testing purpose (It could be _AlwaysTrueActivator_). I will try to give it a try tomorrow. Also, the way which is used now in 4 activators isn't best (I'm talking about condition for checking) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven pull request: [MNG-4565] Multiple profile activation conditi...
GitHub user MysterionRise opened a pull request: https://github.com/apache/maven/pull/16 [MNG-4565] Multiple profile activation conditions does not work You can merge this pull request into a Git repository by running: $ git pull https://github.com/MysterionRise/maven MNG-4565 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven/pull/16.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16 commit 0bdb276b36ee4532cb0b57e62591ded647cf0ca2 Author: Mysterion pericov...@gmail.com Date: 2014-05-26T20:18:08Z Add solution to http://jira.codehaus.org/browse/MNG-4565 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: git commit: [MNG-5608] added a warning on ${project.basedir} use for profile activation
In fact, a ModelValidator validates both the rawModel and effectiveModel[1] regards, Robert [1] https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-builder/src/main/java/org/apache/maven/model/validation/ModelValidator.java;h=34bd97a5dc3d0a2d5f694d069ab80328d4adee1c;hb=HEAD1 Op Mon, 24 Mar 2014 00:20:06 +0100 schreef Hervé BOUTEMY herve.bout...@free.fr: I don't think so: DefaultModelValidator is the *effective model* validator It contains validations that happen when everything is done: it's too late for profile activation controls Regards, Hervé Le dimanche 23 mars 2014 20:29:42 Robert Scholte a écrit : Hi Hervé, I think this should have been fixed in the org.apache.maven.model.validation.DefaultModelValidator. That's the location where all these kinds of validations are done. A ProfileActivator has only one task: Determines whether the specified profile is active in the given activator context. regards, Robert Op Sun, 23 Mar 2014 19:58:28 +0100 schreef hbout...@apache.org: Repository: maven Updated Branches: refs/heads/master 3c7744a9a - 64c419506 [MNG-5608] added a warning on ${project.basedir} use for profile activation Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/64c41950 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/64c41950 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/64c41950 Branch: refs/heads/master Commit: 64c41950671b6b5472532cd2e34f28fff17c5fee Parents: 3c7744a Author: Hervé Boutemy hbout...@apache.org Authored: Sun Mar 23 19:58:26 2014 +0100 Committer: Hervé Boutemy hbout...@apache.org Committed: Sun Mar 23 19:58:26 2014 +0100 -- .../maven/model/profile/activation/FileProfileActivator.java | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/maven/blob/64c41950/maven-model-bui lder/src/main/java/org/apache/maven/model/profile/activation/FileProfileAc tivator.java -- diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activat ion/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa tion/FileProfileActivator.java index 039c37b..ae20762 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activat ion/FileProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activat ion/FileProfileActivator.java @@ -116,6 +116,14 @@ public class FileProfileActivator return null; } } ); + +if ( path.contains( ${project.basedir} ) ) +{ +problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE ) +.setMessage( Failed to interpolate file location + path + for profile + profile.getId() + : ${project.basedir} expression not supported during profile activation, use ${basedir} instead ) +.setLocation( file.getLocation( missing ? missing : exists ) ) ); +} + } else if ( path.contains( ${basedir} ) ) { - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: git commit: [MNG-5608] added a warning on ${project.basedir} use for profile activation
ok, I'll have a look to try to move code Regards, Hervé Le lundi 24 mars 2014 19:14:02 Robert Scholte a écrit : In fact, a ModelValidator validates both the rawModel and effectiveModel[1] regards, Robert [1] https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-bui lder/src/main/java/org/apache/maven/model/validation/ModelValidator.java;h=3 4bd97a5dc3d0a2d5f694d069ab80328d4adee1c;hb=HEAD1 Op Mon, 24 Mar 2014 00:20:06 +0100 schreef Hervé BOUTEMY herve.bout...@free.fr: I don't think so: DefaultModelValidator is the *effective model* validator It contains validations that happen when everything is done: it's too late for profile activation controls Regards, Hervé Le dimanche 23 mars 2014 20:29:42 Robert Scholte a écrit : Hi Hervé, I think this should have been fixed in the org.apache.maven.model.validation.DefaultModelValidator. That's the location where all these kinds of validations are done. A ProfileActivator has only one task: Determines whether the specified profile is active in the given activator context. regards, Robert Op Sun, 23 Mar 2014 19:58:28 +0100 schreef hbout...@apache.org: Repository: maven Updated Branches: refs/heads/master 3c7744a9a - 64c419506 [MNG-5608] added a warning on ${project.basedir} use for profile activation Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/64c41950 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/64c41950 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/64c41950 Branch: refs/heads/master Commit: 64c41950671b6b5472532cd2e34f28fff17c5fee Parents: 3c7744a Author: Hervé Boutemy hbout...@apache.org Authored: Sun Mar 23 19:58:26 2014 +0100 Committer: Hervé Boutemy hbout...@apache.org Committed: Sun Mar 23 19:58:26 2014 +0100 -- .../maven/model/profile/activation/FileProfileActivator.java | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/maven/blob/64c41950/maven-model-bu i lder/src/main/java/org/apache/maven/model/profile/activation/FileProfileA c tivator.java -- diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa t ion/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa tion/FileProfileActivator.java index 039c37b..ae20762 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa t ion/FileProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa t ion/FileProfileActivator.java @@ -116,6 +116,14 @@ public class FileProfileActivator return null; } } ); + +if ( path.contains( ${project.basedir} ) ) +{ +problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE ) +.setMessage( Failed to interpolate file location + path + for profile + profile.getId() + : ${project.basedir} expression not supported during profile activation, use ${basedir} instead ) +.setLocation( file.getLocation( missing ? missing : exists ) ) ); +} + } else if ( path.contains( ${basedir} ) ) { - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: git commit: [MNG-5608] added a warning on ${project.basedir} use for profile activation
Hi Hervé, I think this should have been fixed in the org.apache.maven.model.validation.DefaultModelValidator. That's the location where all these kinds of validations are done. A ProfileActivator has only one task: Determines whether the specified profile is active in the given activator context. regards, Robert Op Sun, 23 Mar 2014 19:58:28 +0100 schreef hbout...@apache.org: Repository: maven Updated Branches: refs/heads/master 3c7744a9a - 64c419506 [MNG-5608] added a warning on ${project.basedir} use for profile activation Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/64c41950 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/64c41950 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/64c41950 Branch: refs/heads/master Commit: 64c41950671b6b5472532cd2e34f28fff17c5fee Parents: 3c7744a Author: Hervé Boutemy hbout...@apache.org Authored: Sun Mar 23 19:58:26 2014 +0100 Committer: Hervé Boutemy hbout...@apache.org Committed: Sun Mar 23 19:58:26 2014 +0100 -- .../maven/model/profile/activation/FileProfileActivator.java | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/maven/blob/64c41950/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java -- diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java index 039c37b..ae20762 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java @@ -116,6 +116,14 @@ public class FileProfileActivator return null; } } ); + +if ( path.contains( ${project.basedir} ) ) +{ +problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE ) +.setMessage( Failed to interpolate file location + path + for profile + profile.getId() + : ${project.basedir} expression not supported during profile activation, use ${basedir} instead ) +.setLocation( file.getLocation( missing ? missing : exists ) ) ); +} + } else if ( path.contains( ${basedir} ) ) { - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: git commit: [MNG-5608] added a warning on ${project.basedir} use for profile activation
I don't think so: DefaultModelValidator is the *effective model* validator It contains validations that happen when everything is done: it's too late for profile activation controls Regards, Hervé Le dimanche 23 mars 2014 20:29:42 Robert Scholte a écrit : Hi Hervé, I think this should have been fixed in the org.apache.maven.model.validation.DefaultModelValidator. That's the location where all these kinds of validations are done. A ProfileActivator has only one task: Determines whether the specified profile is active in the given activator context. regards, Robert Op Sun, 23 Mar 2014 19:58:28 +0100 schreef hbout...@apache.org: Repository: maven Updated Branches: refs/heads/master 3c7744a9a - 64c419506 [MNG-5608] added a warning on ${project.basedir} use for profile activation Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/64c41950 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/64c41950 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/64c41950 Branch: refs/heads/master Commit: 64c41950671b6b5472532cd2e34f28fff17c5fee Parents: 3c7744a Author: Hervé Boutemy hbout...@apache.org Authored: Sun Mar 23 19:58:26 2014 +0100 Committer: Hervé Boutemy hbout...@apache.org Committed: Sun Mar 23 19:58:26 2014 +0100 -- .../maven/model/profile/activation/FileProfileActivator.java | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/maven/blob/64c41950/maven-model-bui lder/src/main/java/org/apache/maven/model/profile/activation/FileProfileAc tivator.java -- diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activat ion/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa tion/FileProfileActivator.java index 039c37b..ae20762 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activat ion/FileProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activat ion/FileProfileActivator.java @@ -116,6 +116,14 @@ public class FileProfileActivator return null; } } ); + +if ( path.contains( ${project.basedir} ) ) +{ +problems.add( new ModelProblemCollectorRequest( Severity.WARNING, Version.BASE ) +.setMessage( Failed to interpolate file location + path + for profile + profile.getId() + : ${project.basedir} expression not supported during profile activation, use ${basedir} instead ) +.setLocation( file.getLocation( missing ? missing : exists ) ) ); +} + } else if ( path.contains( ${basedir} ) ) { - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
MNG-5127 - Maven profile activation does not work when profile is defined in inherited 'parent' pom
Hi folks, how is it going with this one? Is there anything planned? I have attached a test project to the issue - http://jira.codehaus.org/browse/MNG-5127 Hope it helps. Thanks Tony
Re: New Profile Activation Type Request - Maven Version
On 9 February 2011 14:28, Brian Fox bri...@infinity.nu wrote: Here's a workaround in the meantime: http://svn.apache.org/viewvc/maven/pom/trunk/asf/pom.xml?p2=%2Fmaven%2Fpom%2Ftrunk%2Fasf%2Fpom.xmlp1=%2Fmaven%2Fpom%2Ftrunk%2Fasf%2Fpom.xmlr1=1065778r2=1065777view=diffpathrev=1065778 On Wed, Feb 9, 2011 at 9:12 AM, John Patrick nhoj.patr...@gmail.com wrote: Hi, I believe this is the right mailing list, but please send me else where if not. I would like to request that a new profile activation type be added, which is based upon the maven version that is executing. What are people version upon this change? Base Ground I've just done an upgrade from maven 2 to maven 3, it was a staggered upgrade so not all developers where done at the same time, as well as upgrading to maven 3 did not break anything. I had to create two profiles which contained version properties to use respectively. One issues was developer where using the wrong profile, or missing profile. e.g. project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; ... profiles ... profile idmaven2-profile/id activation maven2+/maven ... profile idmaven3-profile/id activation maven3+/maven ... So you can define which maven version to activate on, using a regex type pattern. e.g. --- 3+ maven version 3 or newer --- 3.0.1 specifically maven version 3.0.1 What are peoples views on this change, I realize that maven prerequisites exists but that is a hard limit, where as maven 2 to 3 you needed different plugin version and everything still worked okay. Cheers, John - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org Cheers, Voted, I thought there would be an issue raised already. Just couldn't find the jira project it might be in. John - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
New Profile Activation Type Request - Maven Version
Hi, I believe this is the right mailing list, but please send me else where if not. I would like to request that a new profile activation type be added, which is based upon the maven version that is executing. What are people version upon this change? Base Ground I've just done an upgrade from maven 2 to maven 3, it was a staggered upgrade so not all developers where done at the same time, as well as upgrading to maven 3 did not break anything. I had to create two profiles which contained version properties to use respectively. One issues was developer where using the wrong profile, or missing profile. e.g. project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; ... profiles ... profile idmaven2-profile/id activation maven2+/maven ... profile idmaven3-profile/id activation maven3+/maven ... So you can define which maven version to activate on, using a regex type pattern. e.g. --- 3+ maven version 3 or newer --- 3.0.1 specifically maven version 3.0.1 What are peoples views on this change, I realize that maven prerequisites exists but that is a hard limit, where as maven 2 to 3 you needed different plugin version and everything still worked okay. Cheers, John - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: New Profile Activation Type Request - Maven Version
Vote for this jira ticket: http://jira.codehaus.org/browse/MNG-4760 /Anders On Wed, Feb 9, 2011 at 15:12, John Patrick nhoj.patr...@gmail.com wrote: Hi, I believe this is the right mailing list, but please send me else where if not. I would like to request that a new profile activation type be added, which is based upon the maven version that is executing. What are people version upon this change? Base Ground I've just done an upgrade from maven 2 to maven 3, it was a staggered upgrade so not all developers where done at the same time, as well as upgrading to maven 3 did not break anything. I had to create two profiles which contained version properties to use respectively. One issues was developer where using the wrong profile, or missing profile. e.g. project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; ... profiles ... profile idmaven2-profile/id activation maven2+/maven ... profile idmaven3-profile/id activation maven3+/maven ... So you can define which maven version to activate on, using a regex type pattern. e.g. --- 3+ maven version 3 or newer --- 3.0.1 specifically maven version 3.0.1 What are peoples views on this change, I realize that maven prerequisites exists but that is a hard limit, where as maven 2 to 3 you needed different plugin version and everything still worked okay. Cheers, John - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: New Profile Activation Type Request - Maven Version
Here's a workaround in the meantime: http://svn.apache.org/viewvc/maven/pom/trunk/asf/pom.xml?p2=%2Fmaven%2Fpom%2Ftrunk%2Fasf%2Fpom.xmlp1=%2Fmaven%2Fpom%2Ftrunk%2Fasf%2Fpom.xmlr1=1065778r2=1065777view=diffpathrev=1065778 On Wed, Feb 9, 2011 at 9:12 AM, John Patrick nhoj.patr...@gmail.com wrote: Hi, I believe this is the right mailing list, but please send me else where if not. I would like to request that a new profile activation type be added, which is based upon the maven version that is executing. What are people version upon this change? Base Ground I've just done an upgrade from maven 2 to maven 3, it was a staggered upgrade so not all developers where done at the same time, as well as upgrading to maven 3 did not break anything. I had to create two profiles which contained version properties to use respectively. One issues was developer where using the wrong profile, or missing profile. e.g. project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; ... profiles ... profile idmaven2-profile/id activation maven2+/maven ... profile idmaven3-profile/id activation maven3+/maven ... So you can define which maven version to activate on, using a regex type pattern. e.g. --- 3+ maven version 3 or newer --- 3.0.1 specifically maven version 3.0.1 What are peoples views on this change, I realize that maven prerequisites exists but that is a hard limit, where as maven 2 to 3 you needed different plugin version and everything still worked okay. Cheers, John - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Bug: profile activation not detected in a parent pom.xml
I have discovered a bug in mvn 2.2.1 in relation to inheritance of profiles. It affects profile inheritance within MavenProject and the maven-help-plugin. 1. The help mojo issue: This appears to be a bug that has been re-introduced into mvn 2.2.1: http://jira.codehaus.org/browse/MPH-16 There is a test file attached to the jira, helptest.zip. The original recursive tree walk appears to have been removed for some reason, or made to depend on mavenProject.getActiveProfiles(). Testing was performed using command line: mvn help:active-profiles 2. This relates to profile information containing repository and build plugins in a parent pom (anywhere in the hierarchy tree). A mvn deploy failed as no distribution repository details were loaded. Reference docs on profiles: http://maven.apache.org/settings.html#Profilesand http://docs.codehaus.org/display/MAVEN/Build+Profiles Would anyone know of a fix or workaround for (2) please? Moving the profile and its build plugins to settings.xml or profiles.xml does not help as the schema does not support the build element beneath profile. The profile's build plugins are a system wide feature for me. Effectively, in my production profile a series of plugins run to integrate details to a wider system, which are not to be executed in my staging and development profiles.
profile activation customization
Hi I'd like to have more more control on how profiles are activated. I've registered my implementation of ProfileActivator as a plexus component with org.apache.maven.profiles.activation.ProfileActivator role. I've used extension to inject the component to the maven context. The issue is that the extensions are added at the very end, when all profiles are already resolved. Is there any way I could registrer such component earlier? Any other hint how to achive my goal will be more than appriciated. Thanks, Mateusz - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
basedir property expansion in file-profile-activation
Hi, I attached a patch to MNG-1775 today, and I would like to hear to what extent I can you folks to apply it, and/or what needs to be changed. My arguments pro my own patch: - I think it works, the test2.zip serves as a test case (build fails with maven-2.2.x, but succeeds after patch) - http://maven.apache.org/pom.html gives an example of fileexists${basedir} , so it should work as advocated Against: - It's a patch against the 2.2.x branch, but I'm willing to fix that if there's a chance of the patch getting accepted - It's a bit rough - passing a java.util.Properties object right down to where it's needed. There may be more elegant ways. WDYT? Karel clicky: http://jira.codehaus.org/browse/MNG-1775 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: basedir property expansion in file-profile-activation
Karel Vervaeke wrote: clicky: http://jira.codehaus.org/browse/MNG-1775 Looks like a duplicate of MNG-2363, i.e. the ${basedir} expression is already supposed to work in Maven 3. Benjamin - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Profile activation by missing file doesn't works
Felix Knecht wrote: Hi all The foofoo profile is always activated, no matter if a file 'timestamp' exists in the same directory like the pom.xml or not. It looks to me as the ${basedir} is not correctly resolved. Is this a known problem? http://jira.codehaus.org/browse/MNG-3524 Thanks Felix [EMAIL PROTECTED] ~/tmp $ cat pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdbar/groupId artifactIdfoo/artifactId version1.0.0/version namefoobar/name packagingjar/packaging profiles profile idfoofoo/id activation file missing${basedir}/timestamp/missing /file /activation /profile /profiles /project [EMAIL PROTECTED] ~/tmp $ touch timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:51 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] [EMAIL PROTECTED] ~/tmp $ rm timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:58 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dennis Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Profile activation by missing file doesn't works
Hi all The foofoo profile is always activated, no matter if a file 'timestamp' exists in the same directory like the pom.xml or not. It looks to me as the ${basedir} is not correctly resolved. Is this a known problem? Thanks Felix [EMAIL PROTECTED] ~/tmp $ cat pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdbar/groupId artifactIdfoo/artifactId version1.0.0/version namefoobar/name packagingjar/packaging profiles profile idfoofoo/id activation file missing${basedir}/timestamp/missing /file /activation /profile /profiles /project [EMAIL PROTECTED] ~/tmp $ touch timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:51 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] [EMAIL PROTECTED] ~/tmp $ rm timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:58 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profile activation by missing file doesn't works
Profile activation doesn't support property interopolation, even the ${basedir} one This makes this feature unusable in nested modules configuration, as the file are tested from current dir, not active project root... I already reported this issue in JIRA. Nicolas 2008/9/26 Felix Knecht [EMAIL PROTECTED] Hi all The foofoo profile is always activated, no matter if a file 'timestamp' exists in the same directory like the pom.xml or not. It looks to me as the ${basedir} is not correctly resolved. Is this a known problem? Thanks Felix [EMAIL PROTECTED] ~/tmp $ cat pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdbar/groupId artifactIdfoo/artifactId version1.0.0/version namefoobar/name packagingjar/packaging profiles profile idfoofoo/id activation file missing${basedir}/timestamp/missing /file /activation /profile /profiles /project [EMAIL PROTECTED] ~/tmp $ touch timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:51 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] [EMAIL PROTECTED] ~/tmp $ rm timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:58 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profile activation by missing file doesn't works
nicolas de loof schrieb: Profile activation doesn't support property interopolation, even the ${basedir} one This makes this feature unusable in nested modules configuration, as the file are tested from current dir, not active project root... I already reported this issue in JIRA. Thanks Nicolas. In this case the documentation is wrong: http://maven.apache.org/pom.html#Activation Felix - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profile activation by missing file doesn't works
Is there a JIRA in for this? nicolas de loof wrote: Profile activation doesn't support property interopolation, even the ${basedir} one This makes this feature unusable in nested modules configuration, as the file are tested from current dir, not active project root... I already reported this issue in JIRA. Nicolas 2008/9/26 Felix Knecht [EMAIL PROTECTED] Hi all The foofoo profile is always activated, no matter if a file 'timestamp' exists in the same directory like the pom.xml or not. It looks to me as the ${basedir} is not correctly resolved. Is this a known problem? Thanks Felix [EMAIL PROTECTED] ~/tmp $ cat pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdbar/groupId artifactIdfoo/artifactId version1.0.0/version namefoobar/name packagingjar/packaging profiles profile idfoofoo/id activation file missing${basedir}/timestamp/missing /file /activation /profile /profiles /project [EMAIL PROTECTED] ~/tmp $ touch timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:51 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] [EMAIL PROTECTED] ~/tmp $ rm timestamp [EMAIL PROTECTED] ~/tmp $ mvn help:active-profiles [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building foobar [INFO]task-segment: [help:active-profiles] (aggregator-style) [INFO] [INFO] [help:active-profiles] [INFO] Active Profiles for Project 'bar:foo:jar:1.0.0': The following profiles are active: - foofoo (source: pom) [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Sep 26 15:22:58 CEST 2008 [INFO] Final Memory: 19M/64M [INFO] - 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]
Re: Profile activation/deactivation
I agree, I think the best option for 2.0.x is to keep the current profile behaviour, with the working profile deactivation. I like the idea of being able to use +myProfile to add a profile without deactivating the deafault profiles. But for 2.0.x I think we should just leave the current behaviour because: 1. The change would require some changes to the ProfileManager interface and more changes to the DefaultProfileManager should probably wait until 2.1. 2. I see the + option as low priority because there is an easy workaround of just specifying all the profiles that you want active. For 2.1 maybe we can add an optional groupId to the profile config like you suggested. As far as reducing the overall need for profiles maybe being able to more easily control the build lifecycle would help. For example, if there was an easy way to tell the build to skip a certain phase or skip certain plugins or executions, that might cover some profile use cases. Brian E. Fox wrote: I think we should maintain the current functionality of a default deactivating when another profile in the pom is activated until there is a syntax to perform the same. I have often in the past done things like: (pseudo pom code) profile idall/id activeByDefaulttrue/activeByDefault modules modulea/module moduleb/module modulec/module ... profile ida/id modules modulea/module Etc and the activation would be mvn xxx -Pa and the expectation is you only build a...retraining everyone to say -Pa,!all is a bit much. To accomplish this correctly, you would need to add a profile group id and if nothing is there, then the explicitly share the same group, thus preserving backwards compat while giving a bit more flexibility. I do share Jesse's sentiment about maybe we are missing something else. If there's anything in the pom that reduces clarity, it is definitely profiles. --Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jesse McConnell Sent: Thursday, May 15, 2008 11:37 AM To: Maven Developers List; [EMAIL PROTECTED] Subject: Re: Profile activation/deactivation No one can dispute the nice things that profiles let us accomplish in terms of toggling on functionalities... But I wonder much this will impact build reproducibilityespecially given the existence of profiles in the settings.xml file. It is already a source of minor pain where people need to pass around fragments of profiles to get their builds (or releases) working. I wonder how much making it easier to toggle on and off profiles will impact the future of these sorts of practices. I already have to edit my settings.xml file and comment in and out a certain profile if I want to deploy something from one place or another. I could override on the cli but thats a big pita as well. John and I talked ages ago about how profiles were basically a hack and black magic in what they allowed people to do with any given build. Seeing all of these +/-/D:/E:/! goop floating around seems to be increasing the black magic. I am torn though, profiles have helped me immeasurably in the past...even if they made me feel a touch dirty in the process. Are we missing a chance to codify some other sort of functionality that keeps build reproducibility at the forefront? And by build reproducibility I mean out of the box, not after cut and pasting magic chunks of stuff around behind the scenes. anywho, figured I would throw that out. jesse On Thu, May 15, 2008 at 10:16 AM, Ralph Goers [EMAIL PROTECTED] wrote: +1. My first reaction though was the thought, what should -P-profile do? Is it confusing not to have it if + is supported? Would it be the same as -P!profile? Bernhard David wrote: would it be possible to have -Pprofile work as usual (activate profile, deactivate defaults) but -P+profile add profile to the existing ones, without deactivating defaults? Or if + is taken we could use some other character. In any case it would be really useful to add profiles like this, for instance to support mvn install -P+optionalTests without having to figure out what other profiles you need manually. Greetings, David Bernhard - 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]
Re: Profile activation/deactivation
I added a proposal for some profile activation/deactivation improvements here: http://docs.codehaus.org/display/MAVENUSER/Improvements+to+Profile+Activation+Deactivation Please take a look and add comments if you are interested. Thanks! Paul Gier wrote: I would like to bring up a couple of issues related to profile activation and deactivation. While working on MNG-3545 I noticed some cases where the current behaviour might be improved. 1. What is the correct behaviour when there is more than one activeByDefault profile and I manually activate one of them? Currently, if I have two activeByDefault profiles, profile1 and profile2, and I run mvn -P+profile1 then profile1 stays active and profile2 is deactivated. This also bring up the following more general question. 2. Should default profiles be automatically deactivated if another profile is activated? I don't think the current behaviour should be changed in 2.0.x, but for 2.1 I think it's worth considering leaving default profiles active unless explicitly disabled. If you think of profiles as being mutually exclusive, then it makes sense to activate one and have the default profile be deactivated. But IMO that seems to be a less common use case vs. using profiles to activate particular parts of a build and not normally interfering with each other. In this case it seems more intuitive that an activeByDefault profile is always active unless deactivated. In addition, now that profiles can be deactivated as needed from the command line, there doesn't seem to be as much of a need to have activeByDefault profiles automatically turn off. 3. There was a suggestion to allow the use of ! to disable a profile. So the command line would look like: mvn -P!myProfile This seems more intuitive than the current syntax using a dash, and I created MNG-3571 for it. But I'm hesitant to add it since we can already use - for this, and it looks like mvn -P D:myProfile was added as another option for disabling a profile in 2.1. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Profile activation/deactivation
Hello, here's a suggestion Re. point 2 2. Should default profiles be automatically deactivated if another profile is activated? I don't think the current behaviour should be changed in 2.0.x, but for 2.1 I think it's worth considering leaving default profiles active unless explicitly disabled. would it be possible to have -Pprofile work as usual (activate profile, deactivate defaults) but -P+profile add profile to the existing ones, without deactivating defaults? Or if + is taken we could use some other character. In any case it would be really useful to add profiles like this, for instance to support mvn install -P+optionalTests without having to figure out what other profiles you need manually. Greetings, David Bernhard -Original Message- From: Jesse McConnell [mailto:[EMAIL PROTECTED] Sent: 15 May 2008 00:04 To: Maven Developers List Subject: Re: Profile activation/deactivation I think the ! is probably better then D: E: E: jesse On Wed, May 14, 2008 at 4:51 PM, Paul Gier [EMAIL PROTECTED] wrote: Brian E. Fox wrote: snip Need to think about 1 2 some more but: 3. There was a suggestion to allow the use of ! to disable a profile. So the command line would look like: mvn -P!myProfile This seems more intuitive than the current syntax using a dash, and I created MNG-3571 for it. But I'm hesitant to add it since we can already use - for this, and it looks like mvn -P D:myProfile was added as another option for disabling a profile in 2.1. As far as I know, the - never worked so going to ! is better...I think the 2.1 deactivation should be brought in line as well...we don't need more proliferation of changes. Should I remove both - and + since they would both be redundant if we add !? So some examples would be: mvn -P !profile1,profile2,profile3 And in maven 2.1 currently this can also be expressed with: mvn -P D:profile1,E:profile2,E:profile3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- jesse mcconnell [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]