*** empty log message ***

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-08-10 00:30:25 +00:00
parent 5812befc4d
commit 8b4d55e55d
2 changed files with 20 additions and 22 deletions

View File

@ -4,6 +4,7 @@ import org.apache.maven.artifact.AbstractArtifactComponent;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.wagon.TransferFailedException;
@ -115,24 +116,26 @@ public class DefaultArtifactResolver
ArtifactMetadataSource source )
throws ArtifactResolutionException
{
ArtifactResolutionResult artifactResolutionResult;
try
{
ArtifactResolutionResult artifactResolutionResult = collect( artifacts,
localRepository,
remoteRepositories,
source );
for ( Iterator i = artifactResolutionResult.getArtifacts().values().iterator(); i.hasNext(); )
{
resolve( (Artifact) i.next(), remoteRepositories, localRepository );
}
return artifactResolutionResult;
artifactResolutionResult = collect( artifacts,
localRepository,
remoteRepositories,
source );
}
catch ( ArtifactCollectionException e )
catch ( TransitiveArtifactResolutionException e )
{
throw new ArtifactResolutionException( "Error while resolving transitive dependencies: ", e );
throw new ArtifactResolutionException( "Error transitively resolving artifacts: ", e );
}
for ( Iterator i = artifactResolutionResult.getArtifacts().values().iterator(); i.hasNext(); )
{
resolve( (Artifact) i.next(), remoteRepositories, localRepository );
}
return artifactResolutionResult;
}
public ArtifactResolutionResult resolveTransitively( Artifact artifact,
@ -157,7 +160,7 @@ public class DefaultArtifactResolver
ArtifactRepository localRepository,
Set remoteRepositories,
ArtifactMetadataSource source )
throws ArtifactCollectionException
throws TransitiveArtifactResolutionException
{
ArtifactResolutionResult result = new ArtifactResolutionResult();
@ -187,13 +190,7 @@ public class DefaultArtifactResolver
if ( !newVersion.equals( knownVersion ) )
{
/*
getLogger().warn( "Version conflict: " + id + ", " +
"using version: " + knownArtifact.getVersion() + ", " +
"found version: " + newArtifact.getVersion() );
addConflict( result, knownArtifact, newArtifact );
*/
}
}
else
@ -207,9 +204,9 @@ public class DefaultArtifactResolver
{
referencedDependencies = source.retrieve( newArtifact );
}
catch ( Exception e )
catch ( ArtifactMetadataRetrievalException e )
{
throw new ArtifactCollectionException( "Problem building project: ", e );
throw new TransitiveArtifactResolutionException( "Error retrieving metadata: ", e );
}
// the pom for given dependency exisit we will add it to the queue

View File

@ -4,6 +4,7 @@ import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;