gnodet commented on issue #11802: URL: https://github.com/apache/maven/issues/11802#issuecomment-4108555613
The classes mentioned (`ModelVersionUtils`, `DomUtils`, `PomDiscovery`, etc.) are all in the `org.apache.maven.cling.invoker.mvnup.goals` package, which lives in the `impl/maven-cli` module. This is an **implementation module**, not part of Maven's public API. Maven's public API is defined as the `org.apache.maven.api.*` packages, located in the `api/` modules. These are the packages we commit to keeping stable and free of third-party type leakage. Implementation modules (`impl/maven-core`, `impl/maven-impl`, `impl/maven-cli`) are, by design, implementation details. For context, third-party types are exposed in public method signatures throughout the implementation modules — this is not unique to domtrip: - **Eclipse Aether** types (`RepositorySystemSession`, `RemoteRepository`, `Artifact`, `DependencyNode`, etc.) are extensively used in `InternalSession`, `AbstractSession`, `MavenSession`, `MavenProject`, `PluginPrefixRequest`, and many more classes in `impl/maven-impl` and `impl/maven-core` - **Plexus** types (`Xpp3Dom`, `ClassRealm`) are exposed in `MojoExecution` and `MavenProject` - **Guice** (`@ScopeAnnotation`, `Module`) is exposed in `@SessionScoped`, `@MojoExecutionScoped`, and `ExtensionConfigurationModule` These are all practical necessities for plugin and extension authors using the implementation layer. Wrapping or hiding all of them would add significant complexity for no real benefit — consumers of these modules already accept the transitive dependency tree. That said, we can reduce the visibility of the mvnup utility classes (e.g., make `DomUtils`, `ModelVersionUtils` package-private) since they are only used within their own package. This would address the specific concern without broader impact. _Claude Code on behalf of Guillaume Nodet_ -- 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]
