jtnord opened a new issue, #12428:
URL: https://github.com/apache/maven/issues/12428

   ### New feature, improvement proposal
   
   currently it is possible to add any `groupId`/`artifactId` inside an 
`exclusion` for a given dependency.
   
   However if that exclusion is not within the dependency chain of the 
specified dependency then no warning is emmited by maven.
   
   Over time this can lead to accumulation of no longer needed exclusions.  It 
would be useful if Maven emitted a log (warning?) about exclusions for a 
dependency that have no impact.
   
   e.g. given the following `pom.xml`
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
     <modelVersion>4.0.0</modelVersion>
   
     <groupId>test</groupId>
     <artifactId>test</artifactId>
     <version>1.0-SNAPSHOT</version>
   
     <dependencies>
       <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-api</artifactId>
         <version>5.11.0</version>
         <exclusions>
           <exclusion>
             <groupId>org.apache.continuum</groupId>
             <artifactId>continuum-core</artifactId>
           </exclusion>
         </exclusions>
       </dependency>
     </dependencies>
   
   </project>
   ```
   
   running `mvn package -DskipTests` results in no warnings that the apache 
continuum exclusion is not needed.
   
   it would be nice to have an entry like
   
   `[WARNING] exclusion of org.apache.continuum:continuum-core for 
org.junit.jupiter:junit-jupiter-api in test:test is obsolete - there is no 
dependency on this exclusion`
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to