o provide a message when there is no POM, which the eclipse plugin requires

to work correctly.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@170135 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2005-05-14 12:18:59 +00:00
parent 85d7de996d
commit d6567987c5
3 changed files with 7 additions and 2 deletions

View File

@ -60,6 +60,11 @@ public class EclipsePlugin
public void execute() public void execute()
throws MojoExecutionException throws MojoExecutionException
{ {
if ( project.getFile() == null || !project.getFile().exists() )
{
throw new MojoExecutionException( "There must be a POM in the current working directory for the Eclipse plugin to work." );
}
try try
{ {
eclipseWriter.write( project ); eclipseWriter.write( project );

View File

@ -2,5 +2,5 @@
<classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/> <classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="c:/home/Brett/cvs/maven-2/maven-components/maven-plugins/maven-eclipse-plugin/src/test/repository/maven/jars/maven-core-2.0-SNAPSHOT.jar"/> <classpathentry kind="lib" path="/home/jvanzyl/js/org.apache.maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/repository/maven/jars/maven-core-2.0-SNAPSHOT.jar"/>
</classpath> </classpath>

View File

@ -5,5 +5,5 @@
<classpathentry kind="src" path="src/test/resources" output="target/test-classes"/> <classpathentry kind="src" path="src/test/resources" output="target/test-classes"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/> <classpathentry kind="var" rootpath="JRE_SRCROOT" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="c:/home/Brett/cvs/maven-2/maven-components/maven-plugins/maven-eclipse-plugin/src/test/repository/junit/jars/junit-2.0.jar"/> <classpathentry kind="lib" path="/home/jvanzyl/js/org.apache.maven/components/trunk/maven-plugins/maven-eclipse-plugin/src/test/repository/junit/jars/junit-2.0.jar"/>
</classpath> </classpath>