From 9da8be3cb31159c4d44d72f98de663c8350ff770 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Mon, 16 Nov 2009 22:17:42 +0100 Subject: Cleanup --- src/main/java/org/apache/maven/plugin/nar/AbstractGnuMojo.java | 2 +- src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java | 3 +-- src/main/java/org/apache/maven/plugin/nar/NarManager.java | 6 ++---- src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java | 3 +-- src/main/java/org/apache/maven/plugin/nar/NarUtil.java | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/apache/maven/plugin/nar/AbstractGnuMojo.java b/src/main/java/org/apache/maven/plugin/nar/AbstractGnuMojo.java index d133389..65c21bc 100644 --- a/src/main/java/org/apache/maven/plugin/nar/AbstractGnuMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/AbstractGnuMojo.java @@ -91,6 +91,6 @@ public abstract class AbstractGnuMojo * @return */ protected boolean useGnu() { - return (gnuUseOnWindows || !NarUtil.getOS( null ).equals( OS.WINDOWS )); + return gnuUseOnWindows || !OS.WINDOWS.equals(NarUtil.getOS( null )); } } diff --git a/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java index 50ba046..5fe3849 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java @@ -81,8 +81,7 @@ public class NarAssemblyMojo // FIXME reported to maven developer list, isSnapshot // changes behaviour // of getBaseVersion, called in pathOf. - if ( dependency.isSnapshot() ) - ; + dependency.isSnapshot(); File srcDir = new File( getLocalRepository().pathOf( dependency ) ); srcDir = new File( getLocalRepository().getBasedir(), srcDir.getParent() ); diff --git a/src/main/java/org/apache/maven/plugin/nar/NarManager.java b/src/main/java/org/apache/maven/plugin/nar/NarManager.java index 6ba9786..39cd096 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarManager.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarManager.java @@ -252,8 +252,7 @@ public class NarManager { // FIXME reported to maven developer list, isSnapshot changes behaviour // of getBaseVersion, called in pathOf. - if ( dependency.isSnapshot() ) - ; + dependency.isSnapshot(); File file = new File( repository.getBasedir(), repository.pathOf( dependency ) ); if (!file.exists()) return null; @@ -294,8 +293,7 @@ public class NarManager { // FIXME reported to maven developer list, isSnapshot changes behaviour // of getBaseVersion, called in pathOf. - if ( dependency.isSnapshot() ) - ; + dependency.isSnapshot(); return new File( repository.getBasedir(), NarUtil.replace( "${aol}", defaultAOL.toString(), repository.pathOf( dependency ) ) ); } 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 79c7a24..d0aecee 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java @@ -150,8 +150,7 @@ public class NarTestMojo // FIXME reported to maven developer list, isSnapshot // changes behaviour // of getBaseVersion, called in pathOf. - if ( dependency.isSnapshot() ) - ; + dependency.isSnapshot(); // FIXME NAR-90 File libDir = new File( getLocalRepository().pathOf( dependency ) ); diff --git a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java index fc6b1bd..049cdde 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java @@ -480,7 +480,7 @@ public class NarUtil outputGobbler.join( 5000 ); return process.exitValue(); } - catch ( Throwable e ) + catch ( Exception e ) { throw new MojoExecutionException( "Could not launch " + cmdLine, e ); } -- cgit v1.2.3