Class DependencyManagerUtils
- java.lang.Object
-
- org.eclipse.aether.util.graph.manager.DependencyManagerUtils
-
public final class DependencyManagerUtils extends java.lang.Object
A utility class assisting in analyzing the effects of dependency management.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_PROP_VERBOSE
The key in the repository session'sconfiguration properties
used to store aBoolean
flag controlling the verbose mode for dependency management.static java.lang.String
NODE_DATA_PREMANAGED_EXCLUSIONS
The key in the dependency node'scustom data
under which the original exclusions are stored.static java.lang.String
NODE_DATA_PREMANAGED_OPTIONAL
The key in the dependency node'scustom data
under which the original optional flag is stored.static java.lang.String
NODE_DATA_PREMANAGED_PROPERTIES
The key in the dependency node'scustom data
under which the original properties are stored.static java.lang.String
NODE_DATA_PREMANAGED_SCOPE
The key in the dependency node'scustom data
under which the original scope is stored.static java.lang.String
NODE_DATA_PREMANAGED_VERSION
The key in the dependency node'scustom data
under which the original version is stored.
-
Constructor Summary
Constructors Constructor Description DependencyManagerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static <T> T
cast(java.lang.Object obj, java.lang.Class<T> type)
static java.util.Collection<Exclusion>
getPremanagedExclusions(DependencyNode node)
Gets theExclusion
s of the specified dependency node before dependency management was applied (if any).static java.lang.Boolean
getPremanagedOptional(DependencyNode node)
Gets the optional flag of the specified dependency node before dependency management was applied (if any).static java.util.Map<java.lang.String,java.lang.String>
getPremanagedProperties(DependencyNode node)
Gets the properties of the specified dependency node before dependency management was applied (if any).static java.lang.String
getPremanagedScope(DependencyNode node)
Gets the scope of the specified dependency node before dependency management was applied (if any).static java.lang.String
getPremanagedVersion(DependencyNode node)
Gets the version or version range of the specified dependency node before dependency management was applied (if any).
-
-
-
Field Detail
-
CONFIG_PROP_VERBOSE
public static final java.lang.String CONFIG_PROP_VERBOSE
The key in the repository session'sconfiguration properties
used to store aBoolean
flag controlling the verbose mode for dependency management. If enabled, the original attributes of a dependency before its update due to dependency managemnent will be recorded * in the node'scustom data
when building a dependency graph.- See Also:
- Constant Field Values
-
NODE_DATA_PREMANAGED_VERSION
public static final java.lang.String NODE_DATA_PREMANAGED_VERSION
The key in the dependency node'scustom data
under which the original version is stored.- See Also:
- Constant Field Values
-
NODE_DATA_PREMANAGED_SCOPE
public static final java.lang.String NODE_DATA_PREMANAGED_SCOPE
The key in the dependency node'scustom data
under which the original scope is stored.- See Also:
- Constant Field Values
-
NODE_DATA_PREMANAGED_OPTIONAL
public static final java.lang.String NODE_DATA_PREMANAGED_OPTIONAL
The key in the dependency node'scustom data
under which the original optional flag is stored.- See Also:
- Constant Field Values
-
NODE_DATA_PREMANAGED_EXCLUSIONS
public static final java.lang.String NODE_DATA_PREMANAGED_EXCLUSIONS
The key in the dependency node'scustom data
under which the original exclusions are stored.- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
NODE_DATA_PREMANAGED_PROPERTIES
public static final java.lang.String NODE_DATA_PREMANAGED_PROPERTIES
The key in the dependency node'scustom data
under which the original properties are stored.- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPremanagedVersion
public static java.lang.String getPremanagedVersion(DependencyNode node)
Gets the version or version range of the specified dependency node before dependency management was applied (if any).- Parameters:
node
- The dependency node to retrieve the premanaged data for, must not benull
.- Returns:
- The node's dependency version before dependency management or
null
if the version was not managed or ifCONFIG_PROP_VERBOSE
was not enabled.
-
getPremanagedScope
public static java.lang.String getPremanagedScope(DependencyNode node)
Gets the scope of the specified dependency node before dependency management was applied (if any).- Parameters:
node
- The dependency node to retrieve the premanaged data for, must not benull
.- Returns:
- The node's dependency scope before dependency management or
null
if the scope was not managed or ifCONFIG_PROP_VERBOSE
was not enabled.
-
getPremanagedOptional
public static java.lang.Boolean getPremanagedOptional(DependencyNode node)
Gets the optional flag of the specified dependency node before dependency management was applied (if any).- Parameters:
node
- The dependency node to retrieve the premanaged data for, must not benull
.- Returns:
- The node's optional flag before dependency management or
null
if the flag was not managed or ifCONFIG_PROP_VERBOSE
was not enabled.
-
getPremanagedExclusions
public static java.util.Collection<Exclusion> getPremanagedExclusions(DependencyNode node)
Gets theExclusion
s of the specified dependency node before dependency management was applied (if any).- Parameters:
node
- The dependency node to retrieve the premanaged data for, must not benull
.- Returns:
- The nodes'
Exclusion
s before dependency management ornull
if exclusions were not managed or ifCONFIG_PROP_VERBOSE
was not enabled. - Since:
- 1.1.0
-
getPremanagedProperties
public static java.util.Map<java.lang.String,java.lang.String> getPremanagedProperties(DependencyNode node)
Gets the properties of the specified dependency node before dependency management was applied (if any).- Parameters:
node
- The dependency node to retrieve the premanaged data for, must not benull
.- Returns:
- The nodes' properties before dependency management or
null
if properties were not managed or ifCONFIG_PROP_VERBOSE
was not enabled. - Since:
- 1.1.0
-
cast
private static <T> T cast(java.lang.Object obj, java.lang.Class<T> type)
-
-