[ 
https://issues.apache.org/jira/browse/MJLINK-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17902375#comment-17902375
 ] 

ASF GitHub Bot commented on MJLINK-84:
--------------------------------------

elharo commented on code in PR #211:
URL: 
https://github.com/apache/maven-jlink-plugin/pull/211#discussion_r1866304579


##########
src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkToolchainExecutor.java:
##########
@@ -172,7 +169,7 @@ private int executeCommand(Commandline cmd) throws 
MojoExecutionException {
 
                 StringBuilder msg = new StringBuilder("\nExit code: ");
                 msg.append(exitCode);
-                if (StringUtils.isNotEmpty(err.getOutput())) {
+                if (!err.getOutput().isBlank()) {

Review Comment:
   This requires Java 11. I think we want to allow Java 8.



##########
src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkToolchainExecutor.java:
##########
@@ -193,4 +190,18 @@ private int executeCommand(Commandline cmd) throws 
MojoExecutionException {
             throw new MojoExecutionException("Unable to execute jlink command: 
" + e.getMessage(), e);
         }
     }
+
+    private static boolean isOSWindows() {
+        String osName;

Review Comment:
   Move this and more into the try block





> apache commons lang3 was removed but still required
> ---------------------------------------------------
>
>                 Key: MJLINK-84
>                 URL: https://issues.apache.org/jira/browse/MJLINK-84
>             Project: Maven JLink Plugin
>          Issue Type: Bug
>    Affects Versions: 3.2.0
>            Reporter: Marios Trivyzas
>            Priority: Critical
>
> {{[ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-jlink-plugin:3.2.0:jlink (default-jlink) on 
> project jlink-jdk: Execution default-jlink of goal 
> org.apache.maven.plugins:maven-jlink-plugin:3.2.0:jlink failed: A required 
> class was missing while executing 
> org.apache.maven.plugins:maven-jlink-plugin:3.2.0:jlink: 
> org/apache/commons/lang3/SystemUtils}}
> {{[ERROR] -----------------------------------------------------}}
> {{[ERROR] realm =    
> extension>org.apache.maven.plugins:maven-jlink-plugin:3.2.0}}
> {{[ERROR] strategy = 
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy}}
> {{[ERROR] urls[0] = 
> file:/Users/matriv/.m2/repository/org/apache/maven/plugins/maven-jlink-plugin/3.2.0/maven-jlink-plugin-3.2.0.jar}}
> {{[ERROR] urls[1] = 
> file:/Users/matriv/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.4.2/maven-shared-utils-3.4.2.jar}}
> {{[ERROR] urls[2] = 
> file:/Users/matriv/.m2/repository/org/apache/maven/maven-archiver/3.6.1/maven-archiver-3.6.1.jar}}
> {{[ERROR] urls[3] = 
> file:/Users/matriv/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26.jar}}
> {{[ERROR] urls[4] = 
> file:/Users/matriv/.m2/repository/org/codehaus/plexus/plexus-archiver/4.9.1/plexus-archiver-4.9.1.jar}}
> {{[ERROR] urls[5] = 
> file:/Users/matriv/.m2/repository/org/codehaus/plexus/plexus-utils/4.0.0/plexus-utils-4.0.0.jar}}
> {{[ERROR] urls[6] = 
> file:/Users/matriv/.m2/repository/org/codehaus/plexus/plexus-io/3.4.1/plexus-io-3.4.1.jar}}
> {{[ERROR] urls[7] = 
> file:/Users/matriv/.m2/repository/org/apache/commons/commons-compress/1.25.0/commons-compress-1.25.0.jar}}
> {{[ERROR] urls[8] = 
> file:/Users/matriv/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar}}
> {{[ERROR] urls[9] = 
> file:/Users/matriv/.m2/repository/org/tukaani/xz/1.9/xz-1.9.jar}}
> {{[ERROR] urls[10] = 
> file:/Users/matriv/.m2/repository/com/github/luben/zstd-jni/1.5.5-11/zstd-jni-1.5.5-11.jar}}
> {{[ERROR] urls[11] = 
> file:/Users/matriv/.m2/repository/org/codehaus/plexus/plexus-java/1.2.0/plexus-java-1.2.0.jar}}
> {{[ERROR] urls[12] = 
> file:/Users/matriv/.m2/repository/org/ow2/asm/asm/9.6/asm-9.6.jar}}
> {{[ERROR] urls[13] = 
> file:/Users/matriv/.m2/repository/com/thoughtworks/qdox/qdox/2.0.3/qdox-2.0.3.jar}}
> {{[ERROR] urls[14] = 
> file:/Users/matriv/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar}}
> {{[ERROR] Number of foreign imports: 1}}
> {{[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: 
> null]]}}
> {{[ERROR]}}
> {{[ERROR] -----------------------------------------------------}}
> {{[ERROR] : org.apache.commons.lang3.SystemUtils}}
> {{[ERROR] -> }}
> {{[Help 1]}}
>  
> {{apache commons lang3 dependency was removed with: 
> https://github.com/apache/maven-jlink-plugin/pull/167}}
> {{but is still being used by: 
> https://github.com/apache/maven-jlink-plugin/blob/master/src/main/java/org/apache/maven/plugins/jlink/AbstractJLinkToolchainExecutor.java#L45}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to