gnodet commented on issue #13151: URL: https://github.com/apache/maven/issues/13151#issuecomment-5693518901
Also related to this issue: a tool using the Maven 4 standalone API needs to enable verbose mode on the `RepositorySystemSession` to get the pre-managed version/scope data populated in `DependencyNode.getData()`. Currently this requires importing `DependencyManagerUtils.CONFIG_PROP_VERBOSE` from `maven-resolver-util` (an Aether internal): ```java mutableSession.setConfigProperty(DependencyManagerUtils.CONFIG_PROP_VERBOSE, Boolean.TRUE); ``` It would be useful to expose this as a proper Maven API constant, or — better — have `DependencyResolverRequest` / the `DependencyResolver` service respect a `verbose` flag already (which `DefaultDependencyResolver` does internally when `request.getVerbose()` is set). The issue is that for tools collecting the tree directly via `RepositorySystem.collectDependencies()` (e.g. to avoid full resolution), there is no Maven API way to request verbose mode without reaching into Aether internals. **Proposed addition:** a constant on `DependencyResolverRequest` or on a new `ResolverOptions` type in `maven-api-core`: ```java // in maven-api-core, e.g. on DependencyResolverRequest or a new ResolverVerbosity enum boolean isVerbose(); // already exists on DependencyResolverRequest — but not accessible for raw collectDependencies ``` Or more simply: expose `DependencyManagerUtils.CONFIG_PROP_VERBOSE` as a constant on a Maven API type so tools don't need to depend on `maven-resolver-util` just to set it. _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]
