summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-12-23 22:01:58 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-12-23 22:01:58 +0100
commit6a702cb7dfada3e86029f5d378a439246aedb757 (patch)
tree48f04f8ff3579f16d4d5e6c07f32dcb887bc12c4 /src
parentb9a34889f9219d3f36d8af8a9f74af8872a7befb (diff)
downloadmaven-nar-plugin-6a702cb7dfada3e86029f5d378a439246aedb757.tar.gz
maven-nar-plugin-6a702cb7dfada3e86029f5d378a439246aedb757.tar.bz2
maven-nar-plugin-6a702cb7dfada3e86029f5d378a439246aedb757.tar.xz
maven-nar-plugin-6a702cb7dfada3e86029f5d378a439246aedb757.zip
Skip running executable if it does not exist
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java
index ce5c8f0..549be88 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java
@@ -105,6 +105,10 @@ public class NarTestMojo
new File( getLayout().getBinDirectory( getTargetDirectory(), getMavenProject().getArtifactId(),
getMavenProject().getVersion(), getAOL().toString() ),
project.getArtifactId() );
+ if (!executable.exists()) {
+ getLog().warn( "Skipping executable "+executable );
+ return;
+ }
getLog().info( "Running executable " + executable );
List args = library.getArgs();
int result =