From 988566e2a0928ed7be51e124499c3c0483140653 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Sun, 29 Jul 2007 17:22:00 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@560763 13f79535-47bb-0310-9956-ffa450edef68 --- .../InterpolatedPomConfigurationMojo.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/its/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java b/its/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java index 04e791edc4..e1414cd3cc 100644 --- a/its/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java +++ b/its/core-integration-testing-plugins/maven-it-plugin-generate-properties/src/main/java/org/apache/maven/plugin/coreit/InterpolatedPomConfigurationMojo.java @@ -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: + * + * + * org.apache.maven.its.plugins + * maven-it-plugin-generate-properties + * 1.0-SNAPSHOT + * + * + * process-resources + * + * ${project.build.directory} + * target + * target + * + * + * generate-properties + * + * + * + * * * @goal generate-properties + * */ public class InterpolatedPomConfigurationMojo extends AbstractMojo @@ -22,6 +43,11 @@ public class InterpolatedPomConfigurationMojo 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 @@ public void execute() Properties mojoGeneratedPropeties = new Properties(); mojoGeneratedPropeties.put( "project.build.directory", projectBuildDirectory ); + if ( targetDirectoryString != null ) { mojoGeneratedPropeties.put( "targetDirectoryString", targetDirectoryString );