summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-12-23 22:25:05 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-12-23 22:25:05 +0100
commitf26589b7df0cc24a61e9a21ac839ffed10e8869e (patch)
treea0133fc38d772dfe2e2e19cec5a474d5206b9dea /src
parent5d9bae32de9a7370f336dc3ed38bbe65428a024c (diff)
downloadmaven-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')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java15
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 );