bmarwell commented on a change in pull request #21:
URL: https://github.com/apache/maven-jlink-plugin/pull/21#discussion_r537306217



##########
File path: src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
##########
@@ -428,11 +437,12 @@ private JLinkExecutor getExecutor()
         return getJlinkExecutor();
     }
 
-    private boolean projectHasAlreadySetAnArtifact()
+    private boolean projectHasAlreadySetAnArtifact( File 
createZipArchiveFromImage )
     {
-        if ( getProject().getArtifact().getFile() != null )
+        File projectArtifact = getProject().getArtifact().getFile();
+        if ( projectArtifact != null && projectArtifact.isFile() )
         {
-            return getProject().getArtifact().getFile().isFile();
+            return projectArtifact.getName().equals( 
createZipArchiveFromImage.getName() );

Review comment:
       @elharo
   1. I changed it back to a `@Nullable`  File.
   2.  I think I should iterate the Set `getProject().getArtifacts()` here, if 
I am not mistaken? There can be more than one artifact if I read the methods 
correctly.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to