[jira] [Commented] (MNG-4777) Match property for profile activation against a regex
[ https://issues.apache.org/jira/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16700901#comment-16700901 ] ASF GitHub Bot commented on MNG-4777: - rfscholte commented on issue #80: [MNG-4777] Match property for profile activation against a regex URL: https://github.com/apache/maven/pull/80#issuecomment-442186378 Not anymore possible to merge. Also, changing the specification will have a negative effect on all consumers of the pom. Allowing regex as property comes with extra requirements and such profile must be removed when distributing the pom. I'll close this PR, MNG-4777is still open. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > Match property for profile activation against a regex > - > > Key: MNG-4777 > URL: https://issues.apache.org/jira/browse/MNG-4777 > Project: Maven > Issue Type: Improvement > Components: Profiles >Affects Versions: 2.0.11 >Reporter: Andreas Ebbert-Karroum >Priority: Major > Attachments: regex-project-property-profile-activator.patch > > > For activating a profile it would be nice, in addition or as a seperate > feature to MNG-3328, to match a property not against a specific value but > against a regex. In our case, we need to set some properties for some hudson > builds. Not only is that setup fragile against job name changes, but also > doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice > feature for multiple purposes. > Old: > {code:xml} > > > env.JOB_NAME > > xyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev > > > {code} > New: > {code:xml} > > > env.JOB_NAME > xyz-abc-foo/.* > > > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-4777) Match property for profile activation against a regex
[ https://issues.apache.org/jira/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15292782#comment-15292782 ] ASF GitHub Bot commented on MNG-4777: - Github user vjkoskela commented on the pull request: https://github.com/apache/maven/pull/80#issuecomment-220525039 The use case we had was to activate a different profile for snapshot and release versions in order to release to a custom artifact store using the http wagon plugin. We couldn't match directly against the version so we pulled it into a property which enabling matching with these changes. > Match property for profile activation against a regex > - > > Key: MNG-4777 > URL: https://issues.apache.org/jira/browse/MNG-4777 > Project: Maven > Issue Type: Improvement > Components: Profiles >Affects Versions: 2.0.11 >Reporter: Andreas Ebbert-Karroum > Attachments: regex-project-property-profile-activator.patch > > > For activating a profile it would be nice, in addition or as a seperate > feature to MNG-3328, to match a property not against a specific value but > against a regex. In our case, we need to set some properties for some hudson > builds. Not only is that setup fragile against job name changes, but also > doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice > feature for multiple purposes. > Old: > {code:xml} > > > env.JOB_NAME > > xyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev > > > {code} > New: > {code:xml} > > > env.JOB_NAME > xyz-abc-foo/.* > > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-4777) Match property for profile activation against a regex
[ https://issues.apache.org/jira/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15292494#comment-15292494 ] ASF GitHub Bot commented on MNG-4777: - Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/80#issuecomment-220492182 How do you plan on using this feature? > Match property for profile activation against a regex > - > > Key: MNG-4777 > URL: https://issues.apache.org/jira/browse/MNG-4777 > Project: Maven > Issue Type: Improvement > Components: Profiles >Affects Versions: 2.0.11 >Reporter: Andreas Ebbert-Karroum > Attachments: regex-project-property-profile-activator.patch > > > For activating a profile it would be nice, in addition or as a seperate > feature to MNG-3328, to match a property not against a specific value but > against a regex. In our case, we need to set some properties for some hudson > builds. Not only is that setup fragile against job name changes, but also > doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice > feature for multiple purposes. > Old: > {code:xml} > > > env.JOB_NAME > > xyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev > > > {code} > New: > {code:xml} > > > env.JOB_NAME > xyz-abc-foo/.* > > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-4777) Match property for profile activation against a regex
[ https://issues.apache.org/jira/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15229683#comment-15229683 ] ASF GitHub Bot commented on MNG-4777: - GitHub user vjkoskela opened a pull request: https://github.com/apache/maven/pull/80 [MNG-4777] Match property for profile activation against a regex You can merge this pull request into a Git repository by running: $ git pull https://github.com/vjkoskela/maven mng-4777 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven/pull/80.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 #80 commit 2f81de5d883c76ff60e60666d1ffafac6a4f3dcb Author: Ville KoskelaDate: 2016-04-07T04:43:53Z [MNG-4777] Match property for profile activation against a regex > Match property for profile activation against a regex > - > > Key: MNG-4777 > URL: https://issues.apache.org/jira/browse/MNG-4777 > Project: Maven > Issue Type: Improvement > Components: Profiles >Affects Versions: 2.0.11 >Reporter: Andreas Ebbert-Karroum > Attachments: regex-project-property-profile-activator.patch > > > For activating a profile it would be nice, in addition or as a seperate > feature to MNG-3328, to match a property not against a specific value but > against a regex. In our case, we need to set some properties for some hudson > builds. Not only is that setup fragile against job name changes, but also > doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice > feature for multiple purposes. > Old: > {code:xml} > > > env.JOB_NAME > > xyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev > > > {code} > New: > {code:xml} > > > env.JOB_NAME > xyz-abc-foo/.* > > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MNG-4777) Match property for profile activation against a regex
[ https://issues.apache.org/jira/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15063605#comment-15063605 ] Ville commented on MNG-4777: I have a patch I would like to submit for this issue (see attached). Unfortunately, I am unable to re-open this issue; [~jvanzyl] please let me know if you would prefer that I file a new issue. Our use case is to activate a profile when the project version is (or is not) a SNAPSHOT version. In order to do this, we create a project property for the version, then a inactive-by-default profile with a property activation rule. The property value of the rule may be set to either: "~.*-SNAPSHOT" (is a SNAPSHOT version) or "!~.*-SNAPSHOT" (is not a SNAPSHOT version). The patch includes the following changes: - Fetching the property value from project properties if it is not found in either user properties or system properties. - Supporting a prefix character "~" for a regular expression comparison (as suggested by [~ja...@planet57.com] above). Negation is extended to regular expressions if "!" is specified before "~". The patch includes unit tests and the integration tests pass with "mvn -Prun-its install" from the root of the project tree. I would be happy to submit a documentation patch as well; however, I have been unable to locate the documentation source to modify around profile activation using properties. The closest I have come is the Maven Book on Sonatype here: https://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html > Match property for profile activation against a regex > - > > Key: MNG-4777 > URL: https://issues.apache.org/jira/browse/MNG-4777 > Project: Maven > Issue Type: Improvement > Components: Profiles >Affects Versions: 2.0.11 >Reporter: Andreas Ebbert-Karroum > > For activating a profile it would be nice, in addition or as a seperate > feature to MNG-3328, to match a property not against a specific value but > against a regex. In our case, we need to set some properties for some hudson > builds. Not only is that setup fragile against job name changes, but also > doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice > feature for multiple purposes. > Old: > {code:xml} > > > env.JOB_NAME > > xyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev > > > {code} > New: > {code:xml} > > > env.JOB_NAME > xyz-abc-foo/.* > > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] Commented: (MNG-4777) Match property for profile activation against a regex
[ http://jira.codehaus.org/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=241491#action_241491 ] Jason Dillon commented on MNG-4777: --- Would also be good to allow the expression to be negated. So only if it doesn't match will it activate. Match property for profile activation against a regex - Key: MNG-4777 URL: http://jira.codehaus.org/browse/MNG-4777 Project: Maven 2 3 Issue Type: Improvement Components: Profiles Affects Versions: 2.0.11 Reporter: Andreas Ebbert-Karroum Fix For: Issues to be reviewed for 3.x For activating a profile it would be nice, in addition or as a seperate feature to MNG-3328, to match a property not against a specific value but against a regex. In our case, we need to set some properties for some hudson builds. Not only is that setup fragile against job name changes, but also doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice feature for multiple purposes. Old: {code:xml} activation property nameenv.JOB_NAME/name valuexyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev/value /property /activation {code} New: {code:xml} activation property nameenv.JOB_NAME/name regexxyz-abc-foo/.*/regex /property /activation {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4777) Match property for profile activation against a regex
[ http://jira.codehaus.org/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=241498#action_241498 ] Jason Dillon commented on MNG-4777: --- Could also overload the value element with [!]~/REGEX/[options] so that if it starts with ~/ or !~/ then treat like a regular expression. Match property for profile activation against a regex - Key: MNG-4777 URL: http://jira.codehaus.org/browse/MNG-4777 Project: Maven 2 3 Issue Type: Improvement Components: Profiles Affects Versions: 2.0.11 Reporter: Andreas Ebbert-Karroum Fix For: Issues to be reviewed for 3.x For activating a profile it would be nice, in addition or as a seperate feature to MNG-3328, to match a property not against a specific value but against a regex. In our case, we need to set some properties for some hudson builds. Not only is that setup fragile against job name changes, but also doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice feature for multiple purposes. Old: {code:xml} activation property nameenv.JOB_NAME/name valuexyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev/value /property /activation {code} New: {code:xml} activation property nameenv.JOB_NAME/name regexxyz-abc-foo/.*/regex /property /activation {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4777) Match property for profile activation against a regex
[ http://jira.codehaus.org/browse/MNG-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=241503#action_241503 ] Jason Dillon commented on MNG-4777: --- Downside to the above is only that if for some reason someone was already using {{~/}} or {{!~/}} in their properties, this would probably puke. Match property for profile activation against a regex - Key: MNG-4777 URL: http://jira.codehaus.org/browse/MNG-4777 Project: Maven 2 3 Issue Type: Improvement Components: Profiles Affects Versions: 2.0.11 Reporter: Andreas Ebbert-Karroum Fix For: Issues to be reviewed for 3.x For activating a profile it would be nice, in addition or as a seperate feature to MNG-3328, to match a property not against a specific value but against a regex. In our case, we need to set some properties for some hudson builds. Not only is that setup fragile against job name changes, but also doesn't scale for multiple jobs. IMHO adding a regex matcher would be a nice feature for multiple purposes. Old: {code:xml} activation property nameenv.JOB_NAME/name valuexyz-abc-foo/label=robotframework,maven.browser-profile=firefox,maven.env-profile=dev/value /property /activation {code} New: {code:xml} activation property nameenv.JOB_NAME/name regexxyz-abc-foo/.*/regex /property /activation {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira