summaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-10-13 09:07:52 +0200
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-10-13 09:07:52 +0200
commit006b0bcffd1fde4142360c8fc9d8abf87136f54a (patch)
tree5d8c6f0643393ffde5fce3c2396f0846d2f72469 /src/main/java/org
parentfb8d039ebe7801921fd315d6ce93b3c2384761f5 (diff)
downloadmaven-nar-plugin-006b0bcffd1fde4142360c8fc9d8abf87136f54a.tar.gz
maven-nar-plugin-006b0bcffd1fde4142360c8fc9d8abf87136f54a.tar.bz2
maven-nar-plugin-006b0bcffd1fde4142360c8fc9d8abf87136f54a.tar.xz
maven-nar-plugin-006b0bcffd1fde4142360c8fc9d8abf87136f54a.zip
Fixed NAR-40
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarManager.java2
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarUtil.java11
2 files changed, 7 insertions, 6 deletions
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 087bdee..13a464f 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarManager.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarManager.java
@@ -381,7 +381,7 @@ public class NarManager
try
{
unpackNar( manager, file, narLocation );
- if ( !NarUtil.getOS( os ).equals( "Windows" ) )
+ if ( !NarUtil.getOS( os ).equals( OS.WINDOWS ) )
{
NarUtil.makeExecutable( new File( narLocation, "bin/" + defaultAOL ), log );
// FIXME clumsy
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 323dde7..4012db6 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
@@ -68,11 +68,12 @@ public class NarUtil
if ( os == null )
{
os = System.getProperty( "os.name" );
- if ( os.startsWith( "Windows" ) )
+ String name = os.toLowerCase();
+ if ( name.startsWith( "windows" ) )
os = OS.WINDOWS;
- if ( os.startsWith( "windows" ) )
- os = OS.WINDOWS;
- if ( os.equals( "Mac OS X" ) )
+ if ( name.startsWith( "linux" ) )
+ os = OS.LINUX;
+ if ( name.equals( "mac os x" ) )
os = OS.MACOSX;
}
return os;
@@ -128,7 +129,7 @@ public class NarUtil
if ( javaHome == null )
{
javaHome = new File( System.getProperty( "java.home" ) );
- if ( !getOS( os ).equals( "MacOSX" ) )
+ if ( !getOS( os ).equals( OS.MACOSX ) )
{
javaHome = new File( javaHome, ".." );
}