maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r807158 - /maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java
Date Mon, 24 Aug 2009 11:41:11 GMT
Author: bentmann
Date: Mon Aug 24 11:41:11 2009
New Revision: 807158

URL: http://svn.apache.org/viewvc?rev=807158&view=rev
Log:
o Extended mojo to track its execution

Modified:
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java

Modified: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java?rev=807158&r1=807157&r2=807158&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java
(original)
+++ maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-all/src/main/java/org/apache/maven/plugin/coreit/AggregatorDependenciesMojo.java
Mon Aug 24 11:41:11 2009
@@ -19,6 +19,9 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 
@@ -31,11 +34,33 @@
 public class AggregatorDependenciesMojo
     extends AbstractMojo
 {
-    
+
+    /**
+     * The path to the touch file, relative to the project's base directory.
+     * 
+     * @parameter expression="${aggregator.touchFile}" default-value="${project.build.directory}/touch.txt"
+     */
+    private File touchFile;
 
     public void execute()
         throws MojoExecutionException
     {
-        //nothing to do, we are checking Maven's behavior here.
+        getLog().info( "[MAVEN-CORE-IT-LOG] Touching file: " + touchFile );
+
+        if ( touchFile != null )
+        {
+            try
+            {
+                touchFile.getParentFile().mkdirs();
+                touchFile.createNewFile();
+            }
+            catch ( IOException e )
+            {
+                throw new MojoExecutionException( "Failed to create touch file " + touchFile,
e );
+            }
+        }
+
+        getLog().info( "[MAVEN-CORE-IT-LOG] Touched file: " + touchFile );
     }
+
 }



Mime
View raw message