diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-23 22:33:42 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-23 22:33:42 +0100 |
commit | adb803fd1ba0aa42b7fd6b0204eb1aec9b7a6e48 (patch) | |
tree | db3842addf1c93bf2a8afc578dd19ad4e17e6029 /src/main/java/org | |
parent | f26589b7df0cc24a61e9a21ac839ffed10e8869e (diff) | |
download | maven-nar-plugin-adb803fd1ba0aa42b7fd6b0204eb1aec9b7a6e48.tar.gz maven-nar-plugin-adb803fd1ba0aa42b7fd6b0204eb1aec9b7a6e48.tar.bz2 maven-nar-plugin-adb803fd1ba0aa42b7fd6b0204eb1aec9b7a6e48.tar.xz maven-nar-plugin-adb803fd1ba0aa42b7fd6b0204eb1aec9b7a6e48.zip |
Added .exe to windows test name
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java | 6 |
1 files changed, 4 insertions, 2 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 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 ); |