You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/06/21 00:35:30 UTC

svn commit: r191579 - in /maven/components/trunk/maven-plugins: maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java pom.xml

Author: brett
Date: Mon Jun 20 15:35:26 2005
New Revision: 191579

URL: http://svn.apache.org/viewcvs?rev=191579&view=rev
Log:
make mojos backwards compat with alpha-2, and run with the eclipse test unmodified


Modified:
    maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
    maven/components/trunk/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java
    maven/components/trunk/maven-plugins/pom.xml

Modified: maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=191579&r1=191578&r2=191579&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original)
+++ maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Mon Jun 20 15:35:26 2005
@@ -28,7 +28,7 @@
  *
  * @goal eclipse
  * @requiresDependencyResolution test
- * @execute phase="generate-sources"
+ * @executePhase="generate-sources"
  *
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -47,10 +47,7 @@
     private MavenProject project;
 
     /**
-     * The project whose project files to create.
-     *
      * @parameter expression="${executedProject}"
-     * @required
      */
     private MavenProject executedProject;
 
@@ -93,6 +90,12 @@
         try
         {
             eclipseWriter.setLocalRepositoryFile( new File ( localRepository.getBasedir() ) );
+
+            if ( executedProject == null )
+            {
+                // backwards compat with alpha-2 only
+                executedProject = project;
+            }
 
             eclipseWriter.write( project, executedProject );
         }

Modified: maven/components/trunk/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java?rev=191579&r1=191578&r2=191579&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java (original)
+++ maven/components/trunk/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java Mon Jun 20 15:35:26 2005
@@ -40,7 +40,7 @@
  * Goal for generating IDEA files from a POM.
  *
  * @goal idea
- * @execute phase="generate-sources"
+ * @executePhase "generate-sources"
  * @requiresDependencyResolution test
  * @todo use dom4j or something. Xpp3Dom can't cope properly with entities and so on
  */
@@ -56,14 +56,18 @@
 
     /**
      * @parameter expression="${executedProject}"
-     * @required
-     * @readonly
      */
     private MavenProject executedProject;
 
     public void execute()
         throws MojoExecutionException
     {
+        if ( executedProject == null )
+        {
+            // backwards compat with alpha-2 only
+            executedProject = project;
+        }
+
         rewriteModule();
 
         rewriteProject();

Modified: maven/components/trunk/maven-plugins/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/pom.xml?rev=191579&r1=191578&r2=191579&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/pom.xml (original)
+++ maven/components/trunk/maven-plugins/pom.xml Mon Jun 20 15:35:26 2005
@@ -90,8 +90,7 @@
     <module>maven-clean-plugin</module>
     <module>maven-compiler-plugin</module>
     <module>maven-deploy-plugin</module>
-    <!-- Broken reference to ${executedProject} -->
-    <!-- module>maven-eclipse-plugin</module -->
+    <module>maven-eclipse-plugin</module>
     <module>maven-ejb-plugin</module>
     <module>maven-idea-plugin</module>
     <module>maven-install-plugin</module>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org