maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject svn commit: r1802422 - in /maven/plugins/trunk/maven-jlink-plugin: pom.xml src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkMojo.java src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
Date Wed, 19 Jul 2017 18:28:16 GMT
Author: khmarbaise
Date: Wed Jul 19 18:28:16 2017
New Revision: 1802422

URL: http://svn.apache.org/viewvc?rev=1802422&view=rev
Log:
Migrate to get this running on JDK 9+178
and don't fail with IndexOutOfBounceException
which is caused by commons-lang 2.4.

Modified:
    maven/plugins/trunk/maven-jlink-plugin/pom.xml
    maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkMojo.java
    maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java

Modified: maven/plugins/trunk/maven-jlink-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jlink-plugin/pom.xml?rev=1802422&r1=1802421&r2=1802422&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jlink-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-jlink-plugin/pom.xml Wed Jul 19 18:28:16 2017
@@ -92,11 +92,10 @@
       <artifactId>plexus-archiver</artifactId>
       <version>3.4</version>
     </dependency> 
-    
     <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-      <version>2.4</version>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>3.6</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

Modified: maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkMojo.java?rev=1802422&r1=1802421&r2=1802422&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkMojo.java
(original)
+++ maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkMojo.java
Wed Jul 19 18:28:16 2017
@@ -27,7 +27,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.commons.lang.SystemUtils;
+import org.apache.commons.lang3.SystemUtils;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -107,25 +107,7 @@ public abstract class AbstractJLinkMojo
         // By default, System.getProperty( "java.home" ) = JRE_HOME and JRE_HOME
         // should be in the JDK_HOME
         // ----------------------------------------------------------------------
-        // For IBM's JDK 1.2
-        // Really ?
-        if ( SystemUtils.IS_OS_AIX )
-        {
-            jLinkExe =
-                new File( SystemUtils.getJavaHome() + File.separator + ".." + File.separator
+ "sh", jLinkCommand );
-        }
-        // For Apple's JDK 1.6.x (and older?) on Mac OSX
-        // CHECKSTYLE_OFF: MagicNumber
-        else if ( SystemUtils.IS_OS_MAC_OSX && SystemUtils.JAVA_VERSION_FLOAT <
1.7f )
-        // CHECKSTYLE_ON: MagicNumber
-        {
-            jLinkExe = new File( SystemUtils.getJavaHome() + File.separator + "bin", jLinkCommand
);
-        }
-        else
-        {
-            jLinkExe =
-                new File( SystemUtils.getJavaHome() + File.separator + ".." + File.separator
+ "bin", jLinkCommand );
-        }
+        jLinkExe = new File( SystemUtils.getJavaHome() + File.separator + ".." + File.separator
+ "bin", jLinkCommand );
 
         // ----------------------------------------------------------------------
         // Try to find javadocExe from JAVA_HOME environment variable

Modified: maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java?rev=1802422&r1=1802421&r2=1802422&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
(original)
+++ maven/plugins/trunk/maven-jlink-plugin/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
Wed Jul 19 18:28:16 2017
@@ -25,7 +25,6 @@ import java.io.PrintStream;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.lang.SystemUtils;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -547,7 +546,7 @@ public class JLinkMojo
         {
             if ( sb.length() > 0 )
             {
-                sb.append( SystemUtils.PATH_SEPARATOR );
+                sb.append( File.pathSeparator );
             }
             sb.append( module );
         }



Mime
View raw message