mirror of https://github.com/apache/maven.git
use managed versions when resolving project dependencies from the plugin manager before executing a mojo, and include system path in system-scoped artifacts within the managed version map.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@588326 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b0cc7be1ac
commit
bcb1ebe0e0
|
@ -1385,7 +1385,7 @@ private void resolveTransitiveDependencies( MavenSession context,
|
|||
ArtifactResolutionResult result = artifactResolver.resolveTransitively(
|
||||
project.getDependencyArtifacts(),
|
||||
artifact,
|
||||
Collections.EMPTY_MAP,
|
||||
project.getManagedVersionMap(),
|
||||
context.getLocalRepository(),
|
||||
project.getRemoteArtifactRepositories(),
|
||||
artifactMetadataSource,
|
||||
|
@ -1424,7 +1424,7 @@ public Object getPluginComponent( Plugin plugin,
|
|||
if ( pluginRealm == null )
|
||||
{
|
||||
getLogger().warn( "getPluginComponent(" + plugin + ", " + role + "): descriptor is missing classRealm" );
|
||||
|
||||
|
||||
pluginRealm = container.getLookupRealm();
|
||||
}
|
||||
|
||||
|
|
|
@ -340,6 +340,11 @@ private Map createManagedVersionMap( String projectId,
|
|||
Artifact artifact = artifactFactory.createDependencyArtifact( d.getGroupId(), d.getArtifactId(), versionRange, d.getType(),
|
||||
d.getClassifier(), d.getScope(), d.isOptional() );
|
||||
|
||||
if ( Artifact.SCOPE_SYSTEM.equals( d.getScope() ) && ( d.getSystemPath() != null ) )
|
||||
{
|
||||
artifact.setFile( new File( d.getSystemPath() ) );
|
||||
}
|
||||
|
||||
if ( getLogger().isDebugEnabled() )
|
||||
{
|
||||
getLogger().debug( " " + artifact );
|
||||
|
@ -1090,7 +1095,7 @@ protected Set createPluginArtifacts( String projectId,
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param projectId
|
||||
* @param plugins
|
||||
* @param pomLocation pom file
|
||||
|
|
Loading…
Reference in New Issue