Author: jdcasey
Date: Mon Jul 25 16:50:13 2005
New Revision: 225208
URL: http://svn.apache.org/viewcvs?rev=225208&view=rev
Log:
Correcting core-library resolution
Modified:
maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
Modified:
maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
URL:
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java?rev=225208&r1=225207&r2=225208&view=diff
==============================================================================
---
maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
(original)
+++
maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
Mon Jul 25 16:50:13 2005
@@ -572,7 +572,7 @@
unresolved.removeAll( resolved );
- resolveCoreArtifacts( unresolved );
+ resolveCoreArtifacts( unresolved,
project.getRemoteArtifactRepositories(), localRepository );
List allResolved = new ArrayList( resolved.size() +
unresolved.size() );
@@ -598,8 +598,8 @@
private Map resolvedCoreArtifactFiles = new HashMap();
- private void resolveCoreArtifacts( List unresolved )
- throws PluginConfigurationException
+ private void resolveCoreArtifacts( List unresolved, List
remoteRepositories, ArtifactRepository localRepository )
+ throws ArtifactResolutionException
{
for ( Iterator it = unresolved.iterator(); it.hasNext(); )
{
@@ -616,14 +616,28 @@
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() );
+
+ if ( artifactPath.endsWith( "/" ) )
+ {
+ artifactPath = artifactPath.substring( 0,
artifactPath.length() - 1 );
+ }
+
+ if ( artifactPath.endsWith( "!" ) )
+ {
+ artifactPath = artifactPath.substring( 0,
artifactPath.length() - 1 );
+ }
- artifactFile = new File( artifactPath );
+ artifactFile = new File( artifactPath ).getAbsoluteFile();
+ }
resolvedCoreArtifactFiles.put( artifact.getId(), artifactFile
);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]