You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2023/05/05 09:54:55 UTC

[GitHub] [maven] cstamas commented on a diff in pull request #1098: [MNG-7774] Maven config and command line interpolation

cstamas commented on code in PR #1098:
URL: https://github.com/apache/maven/pull/1098#discussion_r1185906988


##########
maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java:
##########
@@ -364,6 +369,38 @@ public void testVersionStringWithoutAnsi() throws Exception {
         assertEquals(MessageUtils.stripAnsiCodes(versionOut), versionOut);
     }
 
+    @Test
+    public void testPropertiesInterpolation() throws Exception {
+        // Arrange
+        CliRequest request = new CliRequest(
+                new String[] {
+                    "-Dfoo=bar",
+                    "-DvalFound=s${foo}i",
+                    "-DvalNotFound=s${foz}i",
+                    "-DvalRootDirectory=${session.rootDirectory}/.mvn/foo",
+                    "-DvalTopDirectory=${session.topDirectory}/pom.xml",

Review Comment:
   Expressions HAVE BEEN (in this PR) backported, what you *really mean* is that 3.9.x does not expose them on MavenSession object, that is true. Still, the point of this PR is to make builds between 3.9.x and 4 permeable, "work with both". This PR as explained above, *does not back port everything*, just the ability to interpolate and these two "special" expressions used in interpolation.



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