brett 2004/10/23 18:53:20
Modified: src/java/org/apache/maven/cli Tag: MAVEN-1_0-BRANCH App.java
Log:
PR: MAVEN-1424
Submitted by: Felipe Leme
Reviewed by: Brett Porter
build fails if file given by -p doesn't exist
Revision Changes Path
No revision
No revision
1.37.4.27 +5 -1 maven/src/java/org/apache/maven/cli/App.java
Index: App.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/cli/App.java,v
retrieving revision 1.37.4.26
retrieving revision 1.37.4.27
diff -u -r1.37.4.26 -r1.37.4.27
--- App.java 24 Sep 2004 10:38:43 -0000 1.37.4.26
+++ App.java 24 Oct 2004 01:53:20 -0000 1.37.4.27
@@ -43,6 +43,7 @@
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
@@ -307,6 +308,9 @@
else
{
descriptorFile = new File(descriptorName);
+ }
+ if ( getCli().hasOption( SET_POM_DESCRIPTOR ) && !descriptorFile.exists() )
{
+ throw new FileNotFoundException( "Project file '" + descriptorName + "'
not found" );
}
descriptorFile = descriptorFile.getAbsoluteFile();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]