From 6a702cb7dfada3e86029f5d378a439246aedb757 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Wed, 23 Dec 2009 22:01:58 +0100 Subject: Skip running executable if it does not exist --- src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java | 4 ++++ 1 file changed, 4 insertions(+) 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 = -- cgit v1.2.3