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

   ## Description
   
   Maven 4's resolver introduced `ArtifactResult$NoRepository` as a new 
repository type. Plugins that walk the dependency tree and inspect artifact 
repositories encounter this type and throw `IllegalArgumentException: 
Unsupported repository type`.
   
   This is one of only **3 genuine ❌ failures** (out of 966 tested Apache 
projects) in the [Maven 4 compatibility 
testing](https://github.com/gnodet/maven4-testing/issues/30310).
   
   ## Affected Plugins
   
   ### 1. camel-spring-boot-generator-maven-plugin
   
   ```
   Failed to execute goal 
org.apache.camel.springboot:camel-spring-boot-generator-maven-plugin:4.22.0-SNAPSHOT:prepare-spring-boot-starter
 (generate)
     on project camel-core-starter: Unable to create starter: Unable to build 
project dependency tree:
     Unsupported repository type: class 
org.eclipse.aether.resolution.ArtifactResult$NoRepository
   ```
   
   Test report: https://github.com/gnodet/maven4-testing/issues/31701
   
   ### 2. cyclonedx-maven-plugin 2.8.1
   
   ```
   Failed to execute goal 
org.cyclonedx:cyclonedx-maven-plugin:2.8.1:makeAggregateBom (generate-sbom)
     on project log4j-jakarta-bom: Execution generate-sbom of goal
     org.cyclonedx:cyclonedx-maven-plugin:2.8.1:makeAggregateBom failed:
     Unsupported repository type: class 
org.eclipse.aether.resolution.ArtifactResult$NoRepository
   ```
   
   Test report: https://github.com/gnodet/maven4-testing/issues/31909
   Filed upstream: 
https://github.com/CycloneDX/cyclonedx-maven-plugin/issues/671
   
   ## Question
   
   Is `NoRepository` an expected part of the public API that plugins need to 
handle? If so, this should be documented in the Maven 4 migration guide. Or 
should Maven ensure `ArtifactResult.getRepository()` never returns an instance 
that downstream code can't handle?
   
   ## Reference
   
   - Full test run summary: 
https://github.com/gnodet/maven4-testing/issues/30310
   - 966 projects tested, only 3 ❌ failures — 2 of which are this same root 
cause


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