You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2006/01/10 16:11:10 UTC

svn commit: r367633 - in /maven/components/branches/maven-2.0.x: integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/ maven-core-it/it0088/ maven-core-it/it0088/src/test/java/org/apache/maven/it0088/ maven-project/src/ma...

Author: jvanzyl
Date: Tue Jan 10 07:10:37 2006
New Revision: 367633

URL: http://svn.apache.org/viewcvs?rev=367633&view=rev
Log:
o fixing it0040
o [MNG-1927] merging from the trunk

Added:
    maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java   (props changed)
      - copied unchanged from r367457, maven/components/trunk/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java
Modified:
    maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java
    maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml
    maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java
    maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java

Propchange: maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java?rev=367633&r1=367632&r2=367633&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java (original)
+++ maven/components/branches/maven-2.0.x/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/PackagingMojo.java Tue Jan 10 07:10:37 2006
@@ -21,6 +21,7 @@
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.archiver.jar.JarArchiver;
 
 import java.io.File;
 
@@ -58,6 +59,8 @@
         File jarFile = new File( outputDirectory, finalName + "-it.jar" );
 
         MavenArchiver archiver = new MavenArchiver();
+
+        archiver.setArchiver( new JarArchiver() );
 
         archiver.setOutputFile( jarFile );
 

Modified: maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml?rev=367633&r1=367632&r2=367633&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-core-it/it0088/pom.xml Tue Jan 10 07:10:37 2006
@@ -19,5 +19,22 @@
         <filtering>true</filtering>
       </resource>
     </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-core-it-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>process-resources</phase>
+            <configuration>
+              <pomBuildDirectory>${project.build.directory}</pomBuildDirectory>
+            </configuration>
+            <goals>
+              <goal>generate-properties</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
   </build>
 </project>

Modified: maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java?rev=367633&r1=367632&r2=367633&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-core-it/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java Tue Jan 10 07:10:37 2006
@@ -17,12 +17,28 @@
         basedir = System.getProperty( "basedir" );
     }
 
-    public void testProjectBuildDirectory()
+    public void testProjectBuildDirectoryAfterResourceFiltering()
         throws Exception
     {
         Properties testProperties = new Properties();
 
         File testPropertiesFile = new File( basedir, "target/classes/test.properties" );
+
+        assertTrue( testPropertiesFile.exists() );
+
+        testProperties.load( new FileInputStream( testPropertiesFile ) );
+
+        File projectBuildDirectory = new File( basedir, "target" );
+
+        assertEquals( testProperties.getProperty( "project.build.directory" ), projectBuildDirectory.getAbsolutePath() );
+    }
+
+    public void testProjectBuildDirectoryAfterForMojoExecution()
+        throws Exception
+    {
+        Properties testProperties = new Properties();
+
+        File testPropertiesFile = new File( basedir, "target/mojo-generated.properties" );
 
         assertTrue( testPropertiesFile.exists() );
 

Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java?rev=367633&r1=367632&r2=367633&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java Tue Jan 10 07:10:37 2006
@@ -80,7 +80,7 @@
 
         if ( requiresBaseDirectoryAlignment( s ) )
         {
-            s = new File( basedir, s ).getPath();
+            s = new File( basedir, s ).getAbsolutePath();
         }
 
         return s;