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 2007/07/29 19:22:00 UTC

svn commit: r560763 - /maven/core-integration-testing/trunk/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java

Author: jvanzyl
Date: Sun Jul 29 10:22:00 2007
New Revision: 560763

URL: http://svn.apache.org/viewvc?view=rev&rev=560763
Log:
o some notes and example configuration for this IT which is now failing due to some changes in 2.1. once this is fixed we can start
  pumping out alphas

Modified:
    maven/core-integration-testing/trunk/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java

Modified: maven/core-integration-testing/trunk/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java?view=diff&rev=560763&r1=560762&r2=560763
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java (original)
+++ maven/core-integration-testing/trunk/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java Sun Jul 29 10:22:00 2007
@@ -9,9 +9,30 @@
 
 /**
  * Take some configuration values that use interpolated POM values and write them to a properties file
- * to make sure they are passing through the system properly. We have reports (MNG-1927) that we're
+ * to make sure they are passing through the system properly. We are using this mojo in it0088, and the
+ * configuration looks like the following:
+ * 
+ * <plugin>
+ *   <groupId>org.apache.maven.its.plugins</groupId>
+ *   <artifactId>maven-it-plugin-generate-properties</artifactId>
+ *   <version>1.0-SNAPSHOT</version>
+ *   <executions>
+ *     <execution>
+ *       <phase>process-resources</phase>
+ *       <configuration>
+ *         <projectBuildDirectory>${project.build.directory}</projectBuildDirectory>
+ *         <targetDirectoryString>target</targetDirectoryString>
+ *         <targetDirectoryFile>target</targetDirectoryFile>
+ *       </configuration>
+ *       <goals>
+ *         <goal>generate-properties</goal>
+ *       </goals>
+ *     </execution>
+ *   </executions>
+ * </plugin>
  * 
  * @goal generate-properties
+ *
  */
 public class InterpolatedPomConfigurationMojo
     extends AbstractMojo
@@ -22,6 +43,11 @@
     private String basedir;
 
     /**
+     * This is using the plugin configuration above and so ${project.build.directory} is the value
+     * of the expression ${projectBuildDirectory} and should be the full path to the scratch directory
+     * which often looks something like /path/to/project/target. For the 2.0.x family this always results
+     * in a full path, and bugs have resulted when it resolves to something that is not a full path like "target".
+     *
      * @parameter expression="${projectBuildDirectory}"
      */
     private String projectBuildDirectory;
@@ -44,6 +70,7 @@
             Properties mojoGeneratedPropeties = new Properties();
 
             mojoGeneratedPropeties.put( "project.build.directory", projectBuildDirectory );
+            
             if ( targetDirectoryString != null )
             {
                 mojoGeneratedPropeties.put( "targetDirectoryString", targetDirectoryString );