From f26589b7df0cc24a61e9a21ac839ffed10e8869e Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Wed, 23 Dec 2009 22:25:05 +0100 Subject: Fixed Windows separator in test --- .../java/org/apache/maven/plugin/nar/NarTestMojo.java | 15 ++++++++++----- 1 file 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 ); -- cgit v1.2.3