You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/02/16 14:25:40 UTC

[GitHub] [maven] mthmulders opened a new pull request #678: [MNG-7244] Ignore pom.-prefix in expressions

mthmulders opened a new pull request #678:
URL: https://github.com/apache/maven/pull/678


   This pull request removes the long deprecated support of properties with the `pom.` prefix in pom.xml.
   
   Contrary to the JIRA ticket suggestion, the build will not fail, it will continue similarly to when a non-existing property is used.
   
   When we will remove support for "unprefixed" property expressions (MNG-7404) the code for interpolating expressions becomes a lot easier, as we can then completely remove the `ProblemDetectingValueSource` class that was introduced only to log warnings about the deprecation.
   
   ---
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [X] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed
          for the change (usually before you start working on it).  Trivial changes like typos do not
          require a JIRA issue. Your pull request should address just this issue, without
          pulling in other changes.
          **[MNG-7244](https://issues.apache.org/jira/browse/MNG-7244)**
    - [X] Each commit in the pull request should have a meaningful subject line and body.
    - [X] Format the pull request title like `[MNG-XXX] SUMMARY`, where you replace `MNG-XXX`
          and `SUMMARY` with the appropriate JIRA issue. Best practice is to use the JIRA issue
          title in the pull request title and in the first line of the commit message.
    - [X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [X] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
          be performed on your pull request automatically.
    - [X] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [X] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] mthmulders commented on pull request #678: [MNG-7244] Ignore pom.-prefix in expressions

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #678:
URL: https://github.com/apache/maven/pull/678#issuecomment-1042888804


   > Since you already say "contrary", please modify the JIRA issue accordingly.
   
   Done.


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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] Giovds commented on a change in pull request #678: [MNG-7244] Ignore pom.-prefix in expressions

Posted by GitBox <gi...@apache.org>.
Giovds commented on a change in pull request #678:
URL: https://github.com/apache/maven/pull/678#discussion_r809463268



##########
File path: maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
##########
@@ -189,7 +187,7 @@ public Object getValue( String expression )
         if ( projectDir != null )
         {
             processors.add( new PathTranslatingPostProcessor( PROJECT_PREFIXES, TRANSLATED_PATH_EXPRESSIONS,
-                                                              projectDir, pathTranslator ) );
+                    projectDir, pathTranslator ) );

Review comment:
       You are right. Reverted.




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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] michael-o commented on pull request #678: [MNG-7244] Ignore pom.-prefix in expressions

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #678:
URL: https://github.com/apache/maven/pull/678#issuecomment-1044033959


   Let me have another look at this...


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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] asfgit closed pull request #678: [MNG-7244] Ignore pom.-prefix in expressions

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #678:
URL: https://github.com/apache/maven/pull/678


   


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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] Giovds commented on a change in pull request #678: [MNG-7244] Ignore pom.-prefix in expressions

Posted by GitBox <gi...@apache.org>.
Giovds commented on a change in pull request #678:
URL: https://github.com/apache/maven/pull/678#discussion_r809466481



##########
File path: maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
##########
@@ -60,12 +68,12 @@ public Object getValue( String expression )
 
         if ( value != null && expression.startsWith( bannedPrefix ) )
         {
-            String msg = "The expression ${" + expression + "} is deprecated.";
+            String msg = "The expression ${" + expression + "} is " + status + ".";

Review comment:
       These changes were made for the initial idea of making the build fail on `pom.` prefixes. Since we are not failing the build anymore these changes have become unnecessary. Once support for prefixless expressions has been removed this class can be removed entirely. I've reverted the changes.




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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] michael-o commented on a change in pull request #678: [MNG-7244] Ignore pom.-prefix in expressions

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #678:
URL: https://github.com/apache/maven/pull/678#discussion_r808406484



##########
File path: maven-model-builder/src/main/java/org/apache/maven/model/interpolation/AbstractStringBasedModelInterpolator.java
##########
@@ -189,7 +187,7 @@ public Object getValue( String expression )
         if ( projectDir != null )
         {
             processors.add( new PathTranslatingPostProcessor( PROJECT_PREFIXES, TRANSLATED_PATH_EXPRESSIONS,
-                                                              projectDir, pathTranslator ) );
+                    projectDir, pathTranslator ) );

Review comment:
       This should not have happened.

##########
File path: maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
##########
@@ -60,12 +68,12 @@ public Object getValue( String expression )
 
         if ( value != null && expression.startsWith( bannedPrefix ) )
         {
-            String msg = "The expression ${" + expression + "} is deprecated.";
+            String msg = "The expression ${" + expression + "} is " + status + ".";

Review comment:
       Why do we need this now? I mean `pom.` is gone and such an occurency should be treated as opaque and will not be touched at ll. It will remain as a placeholder in the effective model.




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

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org