diff --git a/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java b/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java index 066a346311..7a5b97e9a9 100644 --- a/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java +++ b/maven-plugins/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java @@ -28,7 +28,7 @@ * * @goal eclipse * @requiresDependencyResolution test - * @execute phase="generate-sources" + * @executePhase="generate-sources" * * @author Trygve Laugstøl * @version $Id$ @@ -47,10 +47,7 @@ public class EclipsePlugin private MavenProject project; /** - * The project whose project files to create. - * * @parameter expression="${executedProject}" - * @required */ private MavenProject executedProject; @@ -94,6 +91,12 @@ public void execute() { eclipseWriter.setLocalRepositoryFile( new File ( localRepository.getBasedir() ) ); + if ( executedProject == null ) + { + // backwards compat with alpha-2 only + executedProject = project; + } + eclipseWriter.write( project, executedProject ); } catch ( EclipsePluginException e ) diff --git a/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java b/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java index 582b77d2d2..c8a3bfa9e0 100644 --- a/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java +++ b/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java @@ -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 @@ public class IdeaMojo /** * @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(); diff --git a/maven-plugins/pom.xml b/maven-plugins/pom.xml index 0a34b61596..b2d51e3154 100644 --- a/maven-plugins/pom.xml +++ b/maven-plugins/pom.xml @@ -90,8 +90,7 @@ maven-clean-plugin maven-compiler-plugin maven-deploy-plugin - - + maven-eclipse-plugin maven-ejb-plugin maven-idea-plugin maven-install-plugin