diff --git a/maven-resolver-api/pom.xml b/maven-resolver-api/pom.xml
index 9298d4562..cc50042bf 100644
--- a/maven-resolver-api/pom.xml
+++ b/maven-resolver-api/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-api
diff --git a/maven-resolver-api/src/main/java/org/eclipse/aether/collection/DependencyManagement.java b/maven-resolver-api/src/main/java/org/eclipse/aether/collection/DependencyManagement.java
index 054bfe01b..42ecc2585 100644
--- a/maven-resolver-api/src/main/java/org/eclipse/aether/collection/DependencyManagement.java
+++ b/maven-resolver-api/src/main/java/org/eclipse/aether/collection/DependencyManagement.java
@@ -27,7 +27,7 @@
/**
* The management updates to apply to a dependency.
- *
+ *
* @see DependencyManager#manageDependency(Dependency)
*/
public final class DependencyManagement
@@ -35,27 +35,53 @@ public final class DependencyManagement
private String version;
+ /**
+ * @since 1.2.0
+ */
+ private String versionSourceHint;
+
private String scope;
+ /**
+ * @since 1.2.0
+ */
+ private String scopeSourceHint;
+
private Boolean optional;
+ /**
+ * @since 1.2.0
+ */
+ private String optionalSourceHint;
+
private Collection exclusions;
+ /**
+ * @since 1.2.0
+ */
+ private String exclusionsSourceHint;
+
private Map properties;
+ /**
+ * @since 1.2.0
+ */
+ private String propertiesSourceHint;
+
/**
* Creates an empty management update.
*/
public DependencyManagement()
{
// enables default constructor
+ super();
}
/**
* Gets the new version to apply to the dependency.
- *
+ *
* @return The new version or {@code null} if the version is not managed and the existing dependency version should
- * remain unchanged.
+ * remain unchanged.
*/
public String getVersion()
{
@@ -64,7 +90,7 @@ public String getVersion()
/**
* Sets the new version to apply to the dependency.
- *
+ *
* @param version The new version, may be {@code null} if the version is not managed.
* @return This management update for chaining, never {@code null}.
*/
@@ -74,11 +100,33 @@ public DependencyManagement setVersion( String version )
return this;
}
+ /**
+ * Gets an informational hint describing the source declaring the version management.
+ * @return An informational hint describing the source declaring the version management or {@code null}.
+ * @since 1.2.0
+ */
+ public String getVersionSourceHint()
+ {
+ return this.versionSourceHint;
+ }
+
+ /**
+ * Sets the informational hint describing the source declaring the version management.
+ * @param value The new informational hint decsribing the source declaring the version management or {@code null}.
+ * @return This management update for chaining, never {@code null}.
+ * @since 1.2.0
+ */
+ public DependencyManagement setVersionSourceHint( final String value )
+ {
+ this.versionSourceHint = value;
+ return this;
+ }
+
/**
* Gets the new scope to apply to the dependency.
- *
+ *
* @return The new scope or {@code null} if the scope is not managed and the existing dependency scope should remain
- * unchanged.
+ * unchanged.
*/
public String getScope()
{
@@ -87,7 +135,7 @@ public String getScope()
/**
* Sets the new scope to apply to the dependency.
- *
+ *
* @param scope The new scope, may be {@code null} if the scope is not managed.
* @return This management update for chaining, never {@code null}.
*/
@@ -97,11 +145,33 @@ public DependencyManagement setScope( String scope )
return this;
}
+ /**
+ * Gets an informational hint describing the source declaring the scope management.
+ * @return An informational hint describing the source declaring the scope management or {@code null}.
+ * @since 1.2.0
+ */
+ public String getScopeSourceHint()
+ {
+ return this.scopeSourceHint;
+ }
+
+ /**
+ * Sets the informational hint describing the source declaring the scope management.
+ * @param value The new informational hint decsribing the source declaring the scope management or {@code null}.
+ * @return This management update for chaining, never {@code null}.
+ * @since 1.2.0
+ */
+ public DependencyManagement setScopeSourceHint( final String value )
+ {
+ this.scopeSourceHint = value;
+ return this;
+ }
+
/**
* Gets the new optional flag to apply to the dependency.
- *
+ *
* @return The new optional flag or {@code null} if the flag is not managed and the existing optional flag of the
- * dependency should remain unchanged.
+ * dependency should remain unchanged.
*/
public Boolean getOptional()
{
@@ -110,7 +180,7 @@ public Boolean getOptional()
/**
* Sets the new optional flag to apply to the dependency.
- *
+ *
* @param optional The optional flag, may be {@code null} if the flag is not managed.
* @return This management update for chaining, never {@code null}.
*/
@@ -120,13 +190,36 @@ public DependencyManagement setOptional( Boolean optional )
return this;
}
+ /**
+ * Gets an informational hint describing the source declaring the optionality management.
+ * @return An informational hint describing the source declaring the optionality management or {@code null}.
+ * @since 1.2.0
+ */
+ public String getOptionalitySourceHint()
+ {
+ return this.optionalSourceHint;
+ }
+
+ /**
+ * Sets the informational hint describing the source declaring the optionality management.
+ * @param value The new informational hint decsribing the source declaring the optionality management or
+ * {@code null}.
+ * @return This management update for chaining, never {@code null}.
+ * @since 1.2.0
+ */
+ public DependencyManagement setOptionalitySourceHint( final String value )
+ {
+ this.optionalSourceHint = value;
+ return this;
+ }
+
/**
* Gets the new exclusions to apply to the dependency. Note that this collection denotes the complete set of
* exclusions for the dependency, i.e. the dependency manager controls whether any existing exclusions get merged
* with information from dependency management or overridden by it.
- *
+ *
* @return The new exclusions or {@code null} if the exclusions are not managed and the existing dependency
- * exclusions should remain unchanged.
+ * exclusions should remain unchanged.
*/
public Collection getExclusions()
{
@@ -137,7 +230,7 @@ public Collection getExclusions()
* Sets the new exclusions to apply to the dependency. Note that this collection denotes the complete set of
* exclusions for the dependency, i.e. the dependency manager controls whether any existing exclusions get merged
* with information from dependency management or overridden by it.
- *
+ *
* @param exclusions The new exclusions, may be {@code null} if the exclusions are not managed.
* @return This management update for chaining, never {@code null}.
*/
@@ -147,13 +240,36 @@ public DependencyManagement setExclusions( Collection exclusions )
return this;
}
+ /**
+ * Gets an informational hint describing the source declaring the exclusions management.
+ * @return An informational hint describing the source declaring the exclusions management or {@code null}.
+ * @since 1.2.0
+ */
+ public String getExclusionsSourceHint()
+ {
+ return this.exclusionsSourceHint;
+ }
+
+ /**
+ * Sets the informational hint describing the source declaring the exclusions management.
+ * @param value The new informational hint decsribing the source declaring the exclusions management or
+ * {@code null}.
+ * @return This management update for chaining, never {@code null}.
+ * @since 1.2.0
+ */
+ public DependencyManagement setExclusionsSourceHint( final String value )
+ {
+ this.exclusionsSourceHint = value;
+ return this;
+ }
+
/**
* Gets the new properties to apply to the dependency. Note that this map denotes the complete set of properties,
* i.e. the dependency manager controls whether any existing properties get merged with the information from
* dependency management or overridden by it.
- *
+ *
* @return The new artifact properties or {@code null} if the properties are not managed and the existing properties
- * should remain unchanged.
+ * should remain unchanged.
*/
public Map getProperties()
{
@@ -164,7 +280,7 @@ public Map getProperties()
* Sets the new properties to apply to the dependency. Note that this map denotes the complete set of properties,
* i.e. the dependency manager controls whether any existing properties get merged with the information from
* dependency management or overridden by it.
- *
+ *
* @param properties The new artifact properties, may be {@code null} if the properties are not managed.
* @return This management update for chaining, never {@code null}.
*/
@@ -174,4 +290,27 @@ public DependencyManagement setProperties( Map properties )
return this;
}
+ /**
+ * Gets an informational hint describing the source declaring the properties management.
+ * @return An informational hint describing the source declaring the properties management or {@code null}.
+ * @since 1.2.0
+ */
+ public String getPropertiesSourceHint()
+ {
+ return this.propertiesSourceHint;
+ }
+
+ /**
+ * Sets the informational hint describing the source declaring the properties management.
+ * @param value The new informational hint decsribing the source declaring the properties management or
+ * {@code null}.
+ * @return This management update for chaining, never {@code null}.
+ * @since 1.2.0
+ */
+ public DependencyManagement setPropertiesSourceHint( final String value )
+ {
+ this.propertiesSourceHint = value;
+ return this;
+ }
+
}
diff --git a/maven-resolver-api/src/main/java/org/eclipse/aether/graph/Dependency.java b/maven-resolver-api/src/main/java/org/eclipse/aether/graph/Dependency.java
index 2e1a78b6f..d4861c94d 100644
--- a/maven-resolver-api/src/main/java/org/eclipse/aether/graph/Dependency.java
+++ b/maven-resolver-api/src/main/java/org/eclipse/aether/graph/Dependency.java
@@ -45,9 +45,14 @@ public final class Dependency
private final Set exclusions;
+ /**
+ * @since 1.2.0
+ */
+ private final String sourceHint;
+
/**
* Creates a mandatory dependency on the specified artifact with the given scope.
- *
+ *
* @param artifact The artifact being depended on, must not be {@code null}.
* @param scope The scope of the dependency, may be {@code null}.
*/
@@ -58,7 +63,7 @@ public Dependency( Artifact artifact, String scope )
/**
* Creates a dependency on the specified artifact with the given scope.
- *
+ *
* @param artifact The artifact being depended on, must not be {@code null}.
* @param scope The scope of the dependency, may be {@code null}.
* @param optional A flag whether the dependency is optional or mandatory, may be {@code null}.
@@ -70,7 +75,7 @@ public Dependency( Artifact artifact, String scope, Boolean optional )
/**
* Creates a dependency on the specified artifact with the given scope and exclusions.
- *
+ *
* @param artifact The artifact being depended on, must not be {@code null}.
* @param scope The scope of the dependency, may be {@code null}.
* @param optional A flag whether the dependency is optional or mandatory, may be {@code null}.
@@ -78,21 +83,65 @@ public Dependency( Artifact artifact, String scope, Boolean optional )
*/
public Dependency( Artifact artifact, String scope, Boolean optional, Collection exclusions )
{
- this( artifact, scope, Exclusions.copy( exclusions ), optional );
+ this( null, artifact, scope, Exclusions.copy( exclusions ), optional );
+ }
+
+ /**
+ * Creates a dependency on the specified artifact.
+ *
+ * @param sourceHint An informational hint describing the source declaring the dependency, may be {@code null}.
+ * @param artifact The artifact being depended on, must not be {@code null}.
+ * @param scope The scope of the dependency, may be {@code null}.
+ * @param optional A flag whether the dependency is optional or mandatory, may be {@code null}.
+ * @param exclusions The exclusions that apply to transitive dependencies, may be {@code null} if none.
+ * @since 1.2.0
+ */
+ public Dependency( String sourceHint, Artifact artifact, String scope, Boolean optional,
+ Collection exclusions )
+ {
+ this( sourceHint, artifact, scope, Exclusions.copy( exclusions ), optional );
}
- private Dependency( Artifact artifact, String scope, Set exclusions, Boolean optional )
+ private Dependency( String sourceHint, Artifact artifact, String scope, Set exclusions,
+ Boolean optional )
{
// NOTE: This constructor assumes immutability of the provided exclusion collection, for internal use only
this.artifact = requireNonNull( artifact, "artifact cannot be null" );
this.scope = ( scope != null ) ? scope : "";
this.optional = optional;
this.exclusions = exclusions;
+ this.sourceHint = sourceHint;
+ }
+
+ /**
+ * Gets an informational hint describing the source declaring the dependency.
+ *
+ * @return An informational hint describing the source declaring the dependency or {@code null}.
+ * @since 1.2.0
+ */
+ public String getSourceHint()
+ {
+ return this.sourceHint;
+ }
+
+ /**
+ * Sets the informational hint describing the source declaring the dependency.
+ * @param value The new informational hint describing the source declaring the dependency or {@code null}.
+ * @return The new dependency, never {@code null}.
+ * @since 1.2.0
+ */
+ public Dependency setSourceHint( final String value )
+ {
+ return ( this.sourceHint != null && this.sourceHint.equals( value ) )
+ || ( this.sourceHint == value )
+ ? this
+ : new Dependency( value, artifact, scope, exclusions, optional );
+
}
/**
* Gets the artifact being depended on.
- *
+ *
* @return The artifact, never {@code null}.
*/
public Artifact getArtifact()
@@ -102,7 +151,7 @@ public Artifact getArtifact()
/**
* Sets the artifact being depended on.
- *
+ *
* @param artifact The artifact, must not be {@code null}.
* @return The new dependency, never {@code null}.
*/
@@ -112,12 +161,12 @@ public Dependency setArtifact( Artifact artifact )
{
return this;
}
- return new Dependency( artifact, scope, exclusions, optional );
+ return new Dependency( sourceHint, artifact, scope, exclusions, optional );
}
/**
* Gets the scope of the dependency. The scope defines in which context this dependency is relevant.
- *
+ *
* @return The scope or an empty string if not set, never {@code null}.
*/
public String getScope()
@@ -127,7 +176,7 @@ public String getScope()
/**
* Sets the scope of the dependency, e.g. "compile".
- *
+ *
* @param scope The scope of the dependency, may be {@code null}.
* @return The new dependency, never {@code null}.
*/
@@ -137,12 +186,12 @@ public Dependency setScope( String scope )
{
return this;
}
- return new Dependency( artifact, scope, exclusions, optional );
+ return new Dependency( sourceHint, artifact, scope, exclusions, optional );
}
/**
* Indicates whether this dependency is optional or not. Optional dependencies can be ignored in some contexts.
- *
+ *
* @return {@code true} if the dependency is (definitively) optional, {@code false} otherwise.
*/
public boolean isOptional()
@@ -153,7 +202,7 @@ public boolean isOptional()
/**
* Gets the optional flag for the dependency. Note: Most clients will usually call {@link #isOptional()} to
* determine the optional flag, this method is for advanced use cases where three-valued logic is required.
- *
+ *
* @return The optional flag or {@code null} if unspecified.
*/
public Boolean getOptional()
@@ -163,9 +212,9 @@ public Boolean getOptional()
/**
* Sets the optional flag for the dependency.
- *
+ *
* @param optional {@code true} if the dependency is optional, {@code false} if the dependency is mandatory, may be
- * {@code null} if unspecified.
+ * {@code null} if unspecified.
* @return The new dependency, never {@code null}.
*/
public Dependency setOptional( Boolean optional )
@@ -174,13 +223,13 @@ public Dependency setOptional( Boolean optional )
{
return this;
}
- return new Dependency( artifact, scope, exclusions, optional );
+ return new Dependency( sourceHint, artifact, scope, exclusions, optional );
}
/**
* Gets the exclusions for this dependency. Exclusions can be used to remove transitive dependencies during
* resolution.
- *
+ *
* @return The (read-only) exclusions, never {@code null}.
*/
public Collection getExclusions()
@@ -190,7 +239,7 @@ public Collection getExclusions()
/**
* Sets the exclusions for the dependency.
- *
+ *
* @param exclusions The exclusions, may be {@code null}.
* @return The new dependency, never {@code null}.
*/
@@ -200,7 +249,7 @@ public Dependency setExclusions( Collection exclusions )
{
return this;
}
- return new Dependency( artifact, scope, optional, exclusions );
+ return new Dependency( sourceHint, artifact, scope, optional, exclusions );
}
private boolean hasEquivalentExclusions( Collection exclusions )
@@ -214,7 +263,7 @@ private boolean hasEquivalentExclusions( Collection exclusions )
return this.exclusions.equals( exclusions );
}
return exclusions.size() >= this.exclusions.size() && this.exclusions.containsAll( exclusions )
- && exclusions.containsAll( this.exclusions );
+ && exclusions.containsAll( this.exclusions );
}
@Override
@@ -238,7 +287,7 @@ else if ( obj == null || !getClass().equals( obj.getClass() ) )
Dependency that = (Dependency) obj;
return artifact.equals( that.artifact ) && scope.equals( that.scope ) && eq( optional, that.optional )
- && exclusions.equals( that.exclusions );
+ && exclusions.equals( that.exclusions );
}
private static boolean eq( T o1, T o2 )
@@ -278,7 +327,7 @@ private Exclusions( Collection exclusions )
{
exclusions = new LinkedHashSet( exclusions );
}
- this.exclusions = exclusions.toArray( new Exclusion[exclusions.size()] );
+ this.exclusions = exclusions.toArray( new Exclusion[ exclusions.size() ] );
}
@Override
diff --git a/maven-resolver-connector-basic/pom.xml b/maven-resolver-connector-basic/pom.xml
index 5633967e9..87b5d7786 100644
--- a/maven-resolver-connector-basic/pom.xml
+++ b/maven-resolver-connector-basic/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-connector-basic
diff --git a/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml b/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml
index 1b5c0700d..44a209322 100644
--- a/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml
+++ b/maven-resolver-demos/maven-resolver-demo-maven-plugin/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver-demos
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-demo-maven-plugin
diff --git a/maven-resolver-demos/maven-resolver-demo-snippets/pom.xml b/maven-resolver-demos/maven-resolver-demo-snippets/pom.xml
index d70901530..325012898 100644
--- a/maven-resolver-demos/maven-resolver-demo-snippets/pom.xml
+++ b/maven-resolver-demos/maven-resolver-demo-snippets/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver-demos
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-demo-snippets
diff --git a/maven-resolver-demos/pom.xml b/maven-resolver-demos/pom.xml
index 0a9ed508a..dc3abcbf6 100644
--- a/maven-resolver-demos/pom.xml
+++ b/maven-resolver-demos/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-demos
diff --git a/maven-resolver-impl/pom.xml b/maven-resolver-impl/pom.xml
index 6c52bf92f..ae90d91ff 100644
--- a/maven-resolver-impl/pom.xml
+++ b/maven-resolver-impl/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-impl
diff --git a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
index 074b83c60..2e678402f 100644
--- a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
+++ b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultDependencyCollector.java
@@ -124,7 +124,8 @@ public DefaultDependencyCollector setLoggerFactory( LoggerFactory loggerFactory
public DefaultDependencyCollector setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager )
{
- this.remoteRepositoryManager = requireNonNull( remoteRepositoryManager, "remote repository provider cannot be null" );
+ this.remoteRepositoryManager = requireNonNull( remoteRepositoryManager,
+ "remote repository provider cannot be null" );
return this;
}
@@ -704,8 +705,8 @@ static class Args
final CollectRequest request;
Args( RepositorySystemSession session, RequestTrace trace, DataPool pool, NodeStack nodes,
- DefaultDependencyCollectionContext collectionContext, DefaultVersionFilterContext versionContext,
- CollectRequest request )
+ DefaultDependencyCollectionContext collectionContext, DefaultVersionFilterContext versionContext,
+ CollectRequest request )
{
this.session = session;
this.request = request;
@@ -783,43 +784,77 @@ static class PremanagedDependency
final String premanagedVersion;
+ /**
+ * @since 1.2.0
+ */
+ final String versionManagementSourceHint;
+
final String premanagedScope;
+ /**
+ * @since 1.2.0
+ */
+ final String scopeManagementSourceHint;
+
final Boolean premanagedOptional;
+ /**
+ * @since 1.2.0
+ */
+ final String optionalityManagementSourceHint;
+
/**
* @since 1.1.0
*/
final Collection premanagedExclusions;
+ /**
+ * @since 1.2.0
+ */
+ final String exclusionsManagementSourceHint;
+
/**
* @since 1.1.0
*/
final Map premanagedProperties;
+ /**
+ * @since 1.2.0
+ */
+ final String propertiesManagementSourceHint;
+
final int managedBits;
final Dependency managedDependency;
final boolean premanagedState;
- PremanagedDependency( String premanagedVersion, String premanagedScope, Boolean premanagedOptional,
- Collection premanagedExclusions, Map premanagedProperties,
+ PremanagedDependency( String premanagedVersion, String versionManagementSourceHint,
+ String premanagedScope, String scopeManagementSourceHint,
+ Boolean premanagedOptional, String optionalityManagementSourceHint,
+ Collection premanagedExclusions, String exclusionsManagementSourceHint,
+ Map premanagedProperties, String propertiesManagementSourceHint,
int managedBits, Dependency managedDependency, boolean premanagedState )
{
this.premanagedVersion = premanagedVersion;
+ this.versionManagementSourceHint = versionManagementSourceHint;
this.premanagedScope = premanagedScope;
+ this.scopeManagementSourceHint = scopeManagementSourceHint;
this.premanagedOptional = premanagedOptional;
+ this.optionalityManagementSourceHint = optionalityManagementSourceHint;
this.premanagedExclusions =
premanagedExclusions != null
? Collections.unmodifiableCollection( new ArrayList( premanagedExclusions ) )
: null;
+ this.exclusionsManagementSourceHint = exclusionsManagementSourceHint;
+
this.premanagedProperties =
premanagedProperties != null
? Collections.unmodifiableMap( new HashMap( premanagedProperties ) )
: null;
+ this.propertiesManagementSourceHint = propertiesManagementSourceHint;
this.managedBits = managedBits;
this.managedDependency = managedDependency;
this.premanagedState = premanagedState;
@@ -832,10 +867,15 @@ static PremanagedDependency create( DependencyManager depManager, Dependency dep
int managedBits = 0;
String premanagedVersion = null;
+ String versionSourceHint = null;
String premanagedScope = null;
+ String scopeSourceHint = null;
Boolean premanagedOptional = null;
+ String optionalitySourceHint = null;
Collection premanagedExclusions = null;
+ String exclusionsSourceHint = null;
Map premanagedProperties = null;
+ String propertiesSourceHint = null;
if ( depMngt != null )
{
@@ -843,6 +883,7 @@ static PremanagedDependency create( DependencyManager depManager, Dependency dep
{
Artifact artifact = dependency.getArtifact();
premanagedVersion = artifact.getVersion();
+ versionSourceHint = depMngt.getVersionSourceHint();
dependency = dependency.setArtifact( artifact.setVersion( depMngt.getVersion() ) );
managedBits |= DependencyNode.MANAGED_VERSION;
}
@@ -850,30 +891,38 @@ static PremanagedDependency create( DependencyManager depManager, Dependency dep
{
Artifact artifact = dependency.getArtifact();
premanagedProperties = artifact.getProperties();
+ propertiesSourceHint = depMngt.getPropertiesSourceHint();
dependency = dependency.setArtifact( artifact.setProperties( depMngt.getProperties() ) );
managedBits |= DependencyNode.MANAGED_PROPERTIES;
}
if ( depMngt.getScope() != null )
{
premanagedScope = dependency.getScope();
+ scopeSourceHint = depMngt.getScopeSourceHint();
dependency = dependency.setScope( depMngt.getScope() );
managedBits |= DependencyNode.MANAGED_SCOPE;
}
if ( depMngt.getOptional() != null )
{
premanagedOptional = dependency.isOptional();
+ optionalitySourceHint = depMngt.getOptionalitySourceHint();
dependency = dependency.setOptional( depMngt.getOptional() );
managedBits |= DependencyNode.MANAGED_OPTIONAL;
}
if ( depMngt.getExclusions() != null )
{
premanagedExclusions = dependency.getExclusions();
+ exclusionsSourceHint = depMngt.getExclusionsSourceHint();
dependency = dependency.setExclusions( depMngt.getExclusions() );
managedBits |= DependencyNode.MANAGED_EXCLUSIONS;
}
}
- return new PremanagedDependency( premanagedVersion, premanagedScope, premanagedOptional,
- premanagedExclusions, premanagedProperties, managedBits, dependency,
+ return new PremanagedDependency( premanagedVersion, versionSourceHint,
+ premanagedScope, scopeSourceHint,
+ premanagedOptional, optionalitySourceHint,
+ premanagedExclusions, exclusionsSourceHint,
+ premanagedProperties, propertiesSourceHint,
+ managedBits, dependency,
premanagedState );
}
@@ -884,10 +933,25 @@ public void applyTo( DefaultDependencyNode child )
if ( premanagedState )
{
child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_VERSION, premanagedVersion );
+ child.setData( DependencyManagerUtils.NODE_DATA_VERSION_MANAGEMENT_SOURCE_HINT,
+ versionManagementSourceHint );
+
child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_SCOPE, premanagedScope );
+ child.setData( DependencyManagerUtils.NODE_DATA_SCOPE_MANAGEMENT_SOURCE_HINT,
+ scopeManagementSourceHint );
+
child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_OPTIONAL, premanagedOptional );
+ child.setData( DependencyManagerUtils.NODE_DATA_OPTIONALITY_MANAGEMENT_SOURCE_HINT,
+ optionalityManagementSourceHint );
+
child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_EXCLUSIONS, premanagedExclusions );
+ child.setData( DependencyManagerUtils.NODE_DATA_EXCLUSIONS_MANAGEMENT_SOURCE_HINT,
+ exclusionsManagementSourceHint );
+
child.setData( DependencyManagerUtils.NODE_DATA_PREMANAGED_PROPERTIES, premanagedProperties );
+ child.setData( DependencyManagerUtils.NODE_DATA_PROPERTIES_MANAGEMENT_SOURCE_HINT,
+ propertiesManagementSourceHint );
+
}
}
diff --git a/maven-resolver-spi/pom.xml b/maven-resolver-spi/pom.xml
index 6754b17ba..e67b7766e 100644
--- a/maven-resolver-spi/pom.xml
+++ b/maven-resolver-spi/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-spi
diff --git a/maven-resolver-test-util/pom.xml b/maven-resolver-test-util/pom.xml
index e8e274bc0..40b8c7230 100644
--- a/maven-resolver-test-util/pom.xml
+++ b/maven-resolver-test-util/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-test-util
diff --git a/maven-resolver-transport-classpath/pom.xml b/maven-resolver-transport-classpath/pom.xml
index d0d7159a0..83af17e2c 100644
--- a/maven-resolver-transport-classpath/pom.xml
+++ b/maven-resolver-transport-classpath/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-transport-classpath
diff --git a/maven-resolver-transport-file/pom.xml b/maven-resolver-transport-file/pom.xml
index c020beda0..0505eb436 100644
--- a/maven-resolver-transport-file/pom.xml
+++ b/maven-resolver-transport-file/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-transport-file
diff --git a/maven-resolver-transport-http/pom.xml b/maven-resolver-transport-http/pom.xml
index f1bae2559..602f260b2 100644
--- a/maven-resolver-transport-http/pom.xml
+++ b/maven-resolver-transport-http/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-transport-http
diff --git a/maven-resolver-transport-wagon/pom.xml b/maven-resolver-transport-wagon/pom.xml
index a513f32b3..c2cecfaa9 100644
--- a/maven-resolver-transport-wagon/pom.xml
+++ b/maven-resolver-transport-wagon/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-transport-wagon
diff --git a/maven-resolver-util/pom.xml b/maven-resolver-util/pom.xml
index de5bdb1f7..37202805a 100644
--- a/maven-resolver-util/pom.xml
+++ b/maven-resolver-util/pom.xml
@@ -25,7 +25,7 @@
org.apache.maven.resolvermaven-resolver
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTmaven-resolver-util
diff --git a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/ClassicDependencyManager.java b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/ClassicDependencyManager.java
index 88c5d62d0..4273a9de5 100644
--- a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/ClassicDependencyManager.java
+++ b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/ClassicDependencyManager.java
@@ -45,14 +45,39 @@ public final class ClassicDependencyManager
private final Map