mirror of https://github.com/apache/maven.git
Correcting core-library resolution
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@225208 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cfccde2596
commit
3251b41d8e
|
@ -572,7 +572,7 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
unresolved.removeAll( resolved );
|
unresolved.removeAll( resolved );
|
||||||
|
|
||||||
resolveCoreArtifacts( unresolved );
|
resolveCoreArtifacts( unresolved, project.getRemoteArtifactRepositories(), localRepository );
|
||||||
|
|
||||||
List allResolved = new ArrayList( resolved.size() + unresolved.size() );
|
List allResolved = new ArrayList( resolved.size() + unresolved.size() );
|
||||||
|
|
||||||
|
@ -598,8 +598,8 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
private Map resolvedCoreArtifactFiles = new HashMap();
|
private Map resolvedCoreArtifactFiles = new HashMap();
|
||||||
|
|
||||||
private void resolveCoreArtifacts( List unresolved )
|
private void resolveCoreArtifacts( List unresolved, List remoteRepositories, ArtifactRepository localRepository )
|
||||||
throws PluginConfigurationException
|
throws ArtifactResolutionException
|
||||||
{
|
{
|
||||||
for ( Iterator it = unresolved.iterator(); it.hasNext(); )
|
for ( Iterator it = unresolved.iterator(); it.hasNext(); )
|
||||||
{
|
{
|
||||||
|
@ -616,14 +616,28 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
if ( resourceUrl == null )
|
if ( resourceUrl == null )
|
||||||
{
|
{
|
||||||
throw new PluginConfigurationException( "Cannot resolve core artifact: " + artifact.getId() );
|
artifactResolver.resolve( artifact, unresolved, localRepository );
|
||||||
}
|
|
||||||
|
|
||||||
|
artifactFile = artifact.getFile();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
String artifactPath = resourceUrl.getPath();
|
String artifactPath = resourceUrl.getPath();
|
||||||
|
|
||||||
artifactPath = artifactPath.substring( 0, artifactPath.length() - resource.length() );
|
artifactPath = artifactPath.substring( 0, artifactPath.length() - resource.length() );
|
||||||
|
|
||||||
artifactFile = new File( artifactPath );
|
if ( artifactPath.endsWith( "/" ) )
|
||||||
|
{
|
||||||
|
artifactPath = artifactPath.substring( 0, artifactPath.length() - 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( artifactPath.endsWith( "!" ) )
|
||||||
|
{
|
||||||
|
artifactPath = artifactPath.substring( 0, artifactPath.length() - 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
artifactFile = new File( artifactPath ).getAbsoluteFile();
|
||||||
|
}
|
||||||
|
|
||||||
resolvedCoreArtifactFiles.put( artifact.getId(), artifactFile );
|
resolvedCoreArtifactFiles.put( artifact.getId(), artifactFile );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue