From adb803fd1ba0aa42b7fd6b0204eb1aec9b7a6e48 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Wed, 23 Dec 2009 22:33:42 +0100 Subject: Added .exe to windows test name --- src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/apache/maven') 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 8930141..bf5fc1b 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java @@ -74,9 +74,10 @@ public class NarTestMojo if ( test.shouldRun() ) { // NOTE should we use layout here ? + String extension = getOS().equals( OS.WINDOWS ) ? ".exe" : ""; String name = getTestTargetDirectory().getPath() + File.separator + "bin" + File.separator + getAOL() - + File.separator + test.getName(); + + File.separator + test.getName() + extension; if ( !new File( name ).exists() ) { getLog().warn( "Skipping non-existing test " + name ); @@ -105,10 +106,11 @@ public class NarTestMojo { MavenProject project = getMavenProject(); // FIXME NAR-90, we could make sure we get the final name from layout + String extension = getOS().equals( OS.WINDOWS ) ? ".exe" : ""; File executable = new File( getLayout().getBinDirectory( getTargetDirectory(), getMavenProject().getArtifactId(), getMavenProject().getVersion(), getAOL().toString() ), - project.getArtifactId() ); + project.getArtifactId() + extension ); if ( !executable.exists() ) { getLog().warn( "Skipping non-existing executable " + executable ); -- cgit v1.2.3