mirror of https://github.com/apache/maven.git
make mojos backwards compat with alpha-2, and run with the eclipse test unmodified
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d7e421fd01
commit
046dc5d63c
|
@ -28,7 +28,7 @@ import java.io.File;
|
|||
*
|
||||
* @goal eclipse
|
||||
* @requiresDependencyResolution test
|
||||
* @execute phase="generate-sources"
|
||||
* @executePhase="generate-sources"
|
||||
*
|
||||
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
|
||||
* @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 class EclipsePlugin
|
|||
{
|
||||
eclipseWriter.setLocalRepositoryFile( new File ( localRepository.getBasedir() ) );
|
||||
|
||||
if ( executedProject == null )
|
||||
{
|
||||
// backwards compat with alpha-2 only
|
||||
executedProject = project;
|
||||
}
|
||||
|
||||
eclipseWriter.write( project, executedProject );
|
||||
}
|
||||
catch ( EclipsePluginException e )
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.Iterator;
|
|||
* 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();
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue