Class ResolverUtil
- java.lang.Object
-
- org.apache.maven.enforcer.rules.dependency.ResolverUtil
-
@Named class ResolverUtil extends java.lang.ObjectResolver helper class.
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.aether.RepositorySystemrepositorySystemprivate org.apache.maven.execution.MavenSessionsession
-
Constructor Summary
Constructors Constructor Description ResolverUtil(org.eclipse.aether.RepositorySystem repositorySystem, org.apache.maven.execution.MavenSession session)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequencedumpTree(org.eclipse.aether.graph.DependencyNode rootNode)Dump aDependencyNodeas a tree.(package private) org.eclipse.aether.graph.DependencyNoderesolveTransitiveDependencies()Retrieves theDependencyNodeinstance containing the result of the transitive dependency for the currentMavenProject.(package private) org.eclipse.aether.graph.DependencyNoderesolveTransitiveDependencies(boolean verbose, boolean excludeOptional, java.util.List<java.lang.String> excludedScopes)(package private) org.eclipse.aether.graph.DependencyNoderesolveTransitiveDependencies(boolean excludeOptional, java.util.List<java.lang.String> excludedScopes)Retrieves theDependencyNodeinstance containing the result of the transitive dependency for the currentMavenProject.(package private) org.eclipse.aether.graph.DependencyNoderesolveTransitiveDependenciesVerbose(java.util.List<java.lang.String> excludedScopes)Retrieves theDependencyNodeinstance containing the result of the transitive dependency for the currentMavenProjectin verbose mode.
-
-
-
Method Detail
-
resolveTransitiveDependenciesVerbose
org.eclipse.aether.graph.DependencyNode resolveTransitiveDependenciesVerbose(java.util.List<java.lang.String> excludedScopes) throws EnforcerRuleExceptionRetrieves theDependencyNodeinstance containing the result of the transitive dependency for the currentMavenProjectin verbose mode.In verbose mode all nodes participating in a conflict are retained.
Please consult
ConflictResolverandDependencyManagerUtils>- Parameters:
excludedScopes- the scopes of direct dependencies to ignore- Returns:
- a Dependency Node which is the root of the project's dependency tree
- Throws:
EnforcerRuleException- thrown if the lookup fails
-
resolveTransitiveDependencies
org.eclipse.aether.graph.DependencyNode resolveTransitiveDependencies() throws EnforcerRuleExceptionRetrieves theDependencyNodeinstance containing the result of the transitive dependency for the currentMavenProject.- Returns:
- a Dependency Node which is the root of the project's dependency tree
- Throws:
EnforcerRuleException- thrown if the lookup fails
-
resolveTransitiveDependencies
org.eclipse.aether.graph.DependencyNode resolveTransitiveDependencies(boolean excludeOptional, java.util.List<java.lang.String> excludedScopes) throws EnforcerRuleExceptionRetrieves theDependencyNodeinstance containing the result of the transitive dependency for the currentMavenProject.- Parameters:
excludeOptional- ignore optional project artifactsexcludedScopes- the scopes of direct dependencies to ignore- Returns:
- a Dependency Node which is the root of the project's dependency tree
- Throws:
EnforcerRuleException- thrown if the lookup fails
-
resolveTransitiveDependencies
org.eclipse.aether.graph.DependencyNode resolveTransitiveDependencies(boolean verbose, boolean excludeOptional, java.util.List<java.lang.String> excludedScopes) throws EnforcerRuleException- Throws:
EnforcerRuleException
-
dumpTree
public java.lang.CharSequence dumpTree(org.eclipse.aether.graph.DependencyNode rootNode)
Dump aDependencyNodeas a tree.- Parameters:
rootNode- node to inspect- Returns:
- dependency tree as String
-
-