mirror of https://github.com/apache/maven.git
o Fixed artifact resolver to deliver root artifact first to retain class path order
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@778141 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ca51f586cd
commit
fa03325f35
|
@ -89,6 +89,11 @@ public class ArtifactResolutionResult
|
|||
return ( artifacts != null ) ? artifacts : Collections.<Artifact> emptySet();
|
||||
}
|
||||
|
||||
public void setArtifacts( Set<Artifact> artifacts )
|
||||
{
|
||||
this.artifacts = artifacts;
|
||||
}
|
||||
|
||||
public void addRequestedArtifact( Artifact artifact )
|
||||
{
|
||||
if ( requestedArtifacts == null )
|
||||
|
|
|
@ -515,8 +515,11 @@ public class DefaultArtifactResolver
|
|||
// have been resolved.
|
||||
if ( request.isResolveRoot() && !isDummy( request ) )
|
||||
{
|
||||
// Add the root artifact
|
||||
result.addArtifact( rootArtifact );
|
||||
// Add the root artifact (as the first artifact to retain logical order of class path!)
|
||||
Set<Artifact> allArtifacts = new LinkedHashSet<Artifact>();
|
||||
allArtifacts.add( rootArtifact );
|
||||
allArtifacts.addAll( result.getArtifacts() );
|
||||
result.setArtifacts( allArtifacts );
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue