maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r557316 - in /maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun: AbstractAntMojo.java AntRunMojo.java
Date Wed, 18 Jul 2007 16:29:28 GMT
Author: kenney
Date: Wed Jul 18 09:29:17 2007
New Revision: 557316

URL: http://svn.apache.org/viewvc?view=rev&rev=557316
Log:
Remove the artifacts parameter from the abstractantmojo
and back to antrunmojo;
add it as a parameter to executeTasks.

This is needed so other plugins can extend this plugin.
The plugin plugin can only detect parameters using the source,
so when another plugin depends on this one the parameter
will be missing from the descriptor.

Modified:
    maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
    maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java

Modified: maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java?view=diff&rev=557316&r1=557315&r2=557316
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
(original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
Wed Jul 18 09:29:17 2007
@@ -48,20 +48,11 @@
     extends AbstractMojo
 {
     /**
-     * The plugin dependencies.
-     *
-     * @parameter expression="${plugin.artifacts}"
-     * @required
-     * @readonly
-     */
-    private List artifacts;
-
-    /**
      * @param antTasks
      * @param mavenProject
      * @throws MojoExecutionException
      */
-    protected void executeTasks( Target antTasks, MavenProject mavenProject )
+    protected void executeTasks( Target antTasks, MavenProject mavenProject, List pluginArtifacts
)
         throws MojoExecutionException
     {
         if ( antTasks == null )
@@ -105,7 +96,7 @@
             antProject.addReference( "maven.test.classpath", p );
 
             /* set maven.plugin.classpath with plugin dependencies */
-            antProject.addReference( "maven.plugin.classpath", getPathFromArtifacts( artifacts,
antProject ) );
+            antProject.addReference( "maven.plugin.classpath", getPathFromArtifacts( pluginArtifacts,
antProject ) );
 
             if ( getLog().isInfoEnabled() )
             {

Modified: maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java?view=diff&rev=557316&r1=557315&r2=557316
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
(original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
Wed Jul 18 09:29:17 2007
@@ -17,6 +17,7 @@
  */
 
 import java.io.File;
+import java.util.List;
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
@@ -51,6 +52,15 @@
     private MavenProject project;
 
     /**
+     * The plugin dependencies.
+     *
+     * @parameter expression="${plugin.artifacts}"
+     * @required
+     * @readonly
+     */
+    private List pluginArtifacts;
+
+    /**
      * The XML for the Ant task. You can add anything you can add
      * between <target> and </target> in a build.xml.
      *
@@ -82,7 +92,7 @@
     public void execute()
         throws MojoExecutionException
     {
-        executeTasks( tasks, project );
+        executeTasks( tasks, project, pluginArtifacts );
 
         if ( sourceRoot != null )
         {



Mime
View raw message