You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2006/03/08 18:04:59 UTC

svn commit: r384270 - in /maven/components/trunk: maven-core-it/ maven-core-it/it0088/src/test/java/org/apache/maven/it0088/ maven-core-it/it0100/ maven-core-it/it0100/parent/ maven-core-it/it0100/parent/child/ maven-core-it/it0100/parent/child/src/ ma...

Author: jdcasey
Date: Wed Mar  8 09:04:47 2006
New Revision: 384270

URL: http://svn.apache.org/viewcvs?rev=384270&view=rev
Log:
(Merged from 384264.) [MNG-2124] Fixed interpolator to call the ReflectionValueExtractor method that prevents trimming the first expression token, since this is done in the interpolator itself. I'm still investigating whether this is going to break realignment of File instances to basedir during plugin parameter injection, but I've had to adjust it0088, since it is not handling project.build.directory as a File, but as a String.

Added:
    maven/components/trunk/maven-core-it/it0100/
      - copied from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/
    maven/components/trunk/maven-core-it/it0100/goals.txt
      - copied unchanged from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/goals.txt
    maven/components/trunk/maven-core-it/it0100/parent/
      - copied from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/
    maven/components/trunk/maven-core-it/it0100/parent/child/
      - copied from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/child/
    maven/components/trunk/maven-core-it/it0100/parent/child/pom.xml
      - copied unchanged from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/child/pom.xml
    maven/components/trunk/maven-core-it/it0100/parent/child/src/
      - copied from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/child/src/
    maven/components/trunk/maven-core-it/it0100/parent/child/src/test/
      - copied from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/child/src/test/
    maven/components/trunk/maven-core-it/it0100/parent/child/src/test/verifier/
      - copied from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/child/src/test/verifier/
    maven/components/trunk/maven-core-it/it0100/parent/child/src/test/verifier/verifications.xml
      - copied unchanged from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/child/src/test/verifier/verifications.xml
    maven/components/trunk/maven-core-it/it0100/parent/pom.xml
      - copied unchanged from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/parent/pom.xml
    maven/components/trunk/maven-core-it/it0100/pom.xml
      - copied unchanged from r384264, maven/components/branches/maven-2.0.x/maven-core-it/it0100/pom.xml
Modified:
    maven/components/trunk/maven-core-it/README.txt
    maven/components/trunk/maven-core-it/integration-tests.txt
    maven/components/trunk/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java

Modified: maven/components/trunk/maven-core-it/README.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/README.txt?rev=384270&r1=384269&r2=384270&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/README.txt (original)
+++ maven/components/trunk/maven-core-it/README.txt Wed Mar  8 09:04:47 2006
@@ -266,7 +266,9 @@
 it0098: Test that quoted system properties are processed correctly. [MNG-1415]
 
 it0099: Test that parent-POMs cached during a build are available as parents
-        to other POMs in the multimodule build. [MNG-2124]
+        to other POMs in the multimodule build. [MNG-2130]
+
+it0100: Test that ${parent.artifactId} resolves correctly. [MNG-2124]
 
 -------------------------------------------------------------------------------
 

Modified: maven/components/trunk/maven-core-it/integration-tests.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/integration-tests.txt?rev=384270&r1=384269&r2=384270&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/integration-tests.txt (original)
+++ maven/components/trunk/maven-core-it/integration-tests.txt Wed Mar  8 09:04:47 2006
@@ -1,3 +1,4 @@
+it0100
 it0099
 it0098
 it0097

Modified: maven/components/trunk/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java?rev=384270&r1=384269&r2=384270&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java (original)
+++ maven/components/trunk/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java Wed Mar  8 09:04:47 2006
@@ -44,8 +44,9 @@
 
         testProperties.load( new FileInputStream( testPropertiesFile ) );
 
-        File projectBuildDirectory = new File( basedir, "target" );
-
-        assertEquals( testProperties.getProperty( "project.build.directory" ), projectBuildDirectory.getAbsolutePath() );
+        // [jdcasey] NOTE: This property is not a java.io.File, so it will NOT be adjusted
+        // to the basedir! We need to simply check that it's value is "target", rather than
+        // new java.io.File( basedir, "target" ).getAbsolutePath();
+        assertEquals( testProperties.getProperty( "project.build.directory" ), "target" );
     }
 }

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java?rev=384270&r1=384269&r2=384270&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/interpolation/RegexBasedModelInterpolator.java Wed Mar  8 09:04:47 2006
@@ -136,7 +136,10 @@
             {
                 try
                 {
-                    value = ReflectionValueExtractor.evaluate( realExpr, model );
+                    // NOTE: We've already trimmed off any leading expression parts like 'project.'
+                    // or 'pom.', and now we have to ensure that the ReflectionValueExtractor 
+                    // doesn't try to do it again.
+                    value = ReflectionValueExtractor.evaluate( realExpr, model, false );
                 }
                 catch ( Exception e )
                 {