summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-16 22:17:42 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-16 22:17:42 +0100
commit9da8be3cb31159c4d44d72f98de663c8350ff770 (patch)
tree2511d33078cae1c2103c716f91c9c48dd17cd2a7 /src/main
parenta0d19af3df01f465aee6c04a8fef4b626fa4eb11 (diff)
downloadmaven-nar-plugin-9da8be3cb31159c4d44d72f98de663c8350ff770.tar.gz
maven-nar-plugin-9da8be3cb31159c4d44d72f98de663c8350ff770.tar.bz2
maven-nar-plugin-9da8be3cb31159c4d44d72f98de663c8350ff770.tar.xz
maven-nar-plugin-9da8be3cb31159c4d44d72f98de663c8350ff770.zip
Cleanup
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/AbstractGnuMojo.java2
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java3
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarManager.java6
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarTestMojo.java3
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarUtil.java2
5 files changed, 6 insertions, 10 deletions
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 );
}