diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-23 22:25:05 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-23 22:25:05 +0100 |
commit | f26589b7df0cc24a61e9a21ac839ffed10e8869e (patch) | |
tree | a0133fc38d772dfe2e2e19cec5a474d5206b9dea /src/main | |
parent | 5d9bae32de9a7370f336dc3ed38bbe65428a024c (diff) | |
download | maven-nar-plugin-f26589b7df0cc24a61e9a21ac839ffed10e8869e.tar.gz maven-nar-plugin-f26589b7df0cc24a61e9a21ac839ffed10e8869e.tar.bz2 maven-nar-plugin-f26589b7df0cc24a61e9a21ac839ffed10e8869e.tar.xz maven-nar-plugin-f26589b7df0cc24a61e9a21ac839ffed10e8869e.zip |
Fixed Windows separator in test
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java | 15 |
1 files changed, 10 insertions, 5 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 9fd2695..8930141 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java @@ -73,9 +73,13 @@ public class NarTestMojo // run if requested if ( test.shouldRun() ) { - String name = getTestTargetDirectory().getPath() + "/bin/" + getAOL() + "/" + test.getName(); - if (!new File(name).exists()) { - getLog().warn( "Skipping non-existing test "+name ); + // NOTE should we use layout here ? + String name = + getTestTargetDirectory().getPath() + File.separator + "bin" + File.separator + getAOL() + + File.separator + test.getName(); + if ( !new File( name ).exists() ) + { + getLog().warn( "Skipping non-existing test " + name ); return; } getLog().info( "Running test " + name ); @@ -105,8 +109,9 @@ public class NarTestMojo new File( getLayout().getBinDirectory( getTargetDirectory(), getMavenProject().getArtifactId(), getMavenProject().getVersion(), getAOL().toString() ), project.getArtifactId() ); - if (!executable.exists()) { - getLog().warn( "Skipping non-existing executable "+executable ); + if ( !executable.exists() ) + { + getLog().warn( "Skipping non-existing executable " + executable ); return; } getLog().info( "Running executable " + executable ); |