mirror of https://github.com/apache/maven.git
[MNG-3769] [regression] Excluding relocated transitive dependencies does not work
o Merged from r736543 git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@801760 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4397321a10
commit
95632cef43
|
@ -382,6 +382,8 @@ public class DefaultLegacyArtifactCollector
|
||||||
{
|
{
|
||||||
fireEvent( ResolutionListener.PROCESS_CHILDREN, listeners, node );
|
fireEvent( ResolutionListener.PROCESS_CHILDREN, listeners, node );
|
||||||
|
|
||||||
|
Artifact parentArtifact = node.getArtifact();
|
||||||
|
|
||||||
for ( Iterator i = node.getChildrenIterator(); i.hasNext(); )
|
for ( Iterator i = node.getChildrenIterator(); i.hasNext(); )
|
||||||
{
|
{
|
||||||
ResolutionNode child = (ResolutionNode) i.next();
|
ResolutionNode child = (ResolutionNode) i.next();
|
||||||
|
@ -493,6 +495,17 @@ public class DefaultLegacyArtifactCollector
|
||||||
}
|
}
|
||||||
while( !childKey.equals( child.getKey() ) );
|
while( !childKey.equals( child.getKey() ) );
|
||||||
|
|
||||||
|
if ( parentArtifact != null && parentArtifact.getDependencyFilter() != null
|
||||||
|
&& !parentArtifact.getDependencyFilter().include( artifact ) )
|
||||||
|
{
|
||||||
|
// MNG-3769: the [probably relocated] artifact is excluded.
|
||||||
|
// We could process exclusions on relocated artifact details in the
|
||||||
|
// MavenMetadataSource.createArtifacts(..) step, BUT that would
|
||||||
|
// require resolving the POM from the repository very early on in
|
||||||
|
// the build.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
artifact.setDependencyTrail( node.getDependencyTrail() );
|
artifact.setDependencyTrail( node.getDependencyTrail() );
|
||||||
|
|
||||||
ResolutionGroup rGroup = source.retrieve( artifact, localRepository, childRemoteRepositories );
|
ResolutionGroup rGroup = source.retrieve( artifact, localRepository, childRemoteRepositories );
|
||||||
|
|
Loading…
Reference in New Issue