slawekjaranowski opened a new pull request, #1043:
URL: https://github.com/apache/maven-enforcer/pull/1043

   Maven 3.10.0 promoted the duplicate dependency declaration check to a POM 
reading error, the same way Maven 4 does. The build now fails while the project 
is being read:
   
   ```
   [ERROR] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must 
be unique:
           ...:menforcer152:jar -> duplicate declaration of version 1.0 @ line 
58
   [ERROR] The build could not read 1 project
   ```
   
   This happens before the enforcer plugin is executed, so the `[ERROR] Rule 0: 
...BanDuplicatePomDependencyVersions failed with message:` assertion in 
`verify.groovy` can never match, and three ITs fail:
   
   - `ban-pom-dependency-version`
   - `ban-pom-dependency-version-utf8-with-bom`
   - `ban-duplicate-dependencies-versions`
   
   These ITs already excluded Maven 4 for exactly this reason; the exclusion is 
extended to `!3.10+,!4+`.
   
   The rule documentation and the class javadoc now mention that the rule is 
only useful with Maven versions older than 3.10.0, which merely warn about 
duplicates.
   
   ## Verification
   
   Built with Maven 3.10.1-SNAPSHOT (`78a8dbf`) and Maven 3.9.16, JDK 26.
   
   | Run | Result |
   | --- | --- |
   | the three ITs, Maven 3.10.1-SNAPSHOT | `Skipped: 3` — "SKIPPED due to 
Maven version" |
   | the three ITs, Maven 3.9.16 | `Passed: 3` — still executed |
   | full `mvn verify -Prun-its`, Maven 3.10.1-SNAPSHOT | plugin `Passed: 150, 
Skipped: 3`, extension `Passed: 2`, BUILD SUCCESS |
   
   Before this change, the full run on Maven 3.10.1-SNAPSHOT ended with 
`Passed: 150, Failed: 3`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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