You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/09/11 06:45:42 UTC

[maven-jlink-plugin] 01/01: [MJLINK-28] - Add WARNING in case of duplicate module names

This is an automated email from the ASF dual-hosted git repository.

khmarbaise pushed a commit to branch MJLINK-28
in repository https://gitbox.apache.org/repos/asf/maven-jlink-plugin.git

commit 0225701b2e4f000c93dbee6c1c95e35ecc0a616b
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Tue Sep 11 08:45:37 2018 +0200

    [MJLINK-28] - Add WARNING in case of duplicate module names
---
 src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
index a92a687..3646ef4 100644
--- a/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jlink/JLinkMojo.java
@@ -365,6 +365,10 @@ public class JLinkMojo
                 // Don't warn for automatic modules, let the jlink tool do that
                 getLog().debug( " module: " + entry.getValue().name() + " automatic: "
                     + entry.getValue().isAutomatic() );
+                if ( modulepathElements.containsKey( entry.getValue().name() ) )
+                {
+                    getLog().warn( "The module name " + entry.getValue().name() + " does already exists." );
+                }
                 modulepathElements.put( entry.getValue().name(), entry.getKey() );
             }