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

Elliotte Rusty Harold commented on MNG-7655:
--------------------------------------------

You're right. You can't (well, shouldn't) change either group ID or artifact ID 
without changing the package or class name as well. General principle of Java: 
do not put the same class in two different jars in the classpath. Maven and 
Gradle can keep this from happening when the different jars have the same group 
ID and artifact ID but not when those are changed. 

In Java 9+ the rules get even stronger. You shouldn't put different classes 
from the same package in two different jars. I'm not sure if the Maven class 
loader will avoid this problem for Maven, but it absolutely does not for any 
other project that does not use the Maven class loader but does depend on these 
artifacts. 

It is not simply the Maven core classloader that is affected here, but every 
project that depends on any of these dependencies, whether it uses Maven or 
not. 

https://jlbp.dev/JLBP-6

> rename Maven core's plexus-utils to more explicit artifactId
> ------------------------------------------------------------
>
>                 Key: MNG-7655
>                 URL: https://issues.apache.org/jira/browse/MNG-7655
>             Project: Maven
>          Issue Type: Task
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Herve Boutemy
>            Priority: Major
>
> in https://github.com/apache/maven/pull/829 , Maven's internal plexus-utils 
> repackaging is used, switching from Plexus original 
> {{org.codehaus.plexus:plexus-utils}} to {{org.apache.maven:plexus-utils}}
> this switch keeping the exact same artifactId but just changing only the 
> groupId is confusing: we need another artifactId
> {{maven-plexus-utils}}?



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

Reply via email to