sdedic opened a new pull request, #4184: URL: https://github.com/apache/netbeans/pull/4184
During testing (and usage), it turned out that the newer `DependencyGraphBuilder` does not give out as much information as the older `DependencyTreeBuilder`. Namely duplicated artifacts are omitted from the dependency report and in case of a version clash, the clashing artifact is **removed at all** from the report. So this PR mainly rewrites the maven implementation back to the older API so that more info can be pulled out from maven. I've realized that the client may need to allow artifact fetching (online / offline mode) as well as order to flush caches before running the query. I changed the private API so that `DependencyQuery` object is now used as a parameter (+ added a `Builder` for it). Further extensions should be API-compatible. Strangely enough, our infrastructure (?) sometimes fails to configure the session properly (?) or maybe Maven does not propagate the offline flag everywhere, so our `RepositoryConnector` pulls on an emergency brake and throws `AssertionError` to abort the unexpected and disallowed online operation. I've added a test method to see whether the throwable is an 'offline' exception. I've extended `DependencyTreeFactory` API to allow multiple scopes to be specified; and also wraps maven internal errors into `MavenExecutionException` instead of just returning `null` (which can't be inspected for what happened). The older method variant remains compatible (catches, logs, returns `null`). -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
