maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r659116 [1/2] - in /maven/artifact/trunk/src/main/java/org/apache/maven/artifact: ./ deployer/ handler/manager/ installer/ manager/ metadata/ repository/metadata/ resolver/ resolver/conflict/ resolver/filter/ resolver/metadata/ transform/ v...
Date Thu, 22 May 2008 14:20:18 GMT
Author: jvanzyl
Date: Thu May 22 07:20:14 2008
New Revision: 659116

URL: http://svn.apache.org/viewvc?rev=659116&view=rev
Log:
MARTIFACT-17: Adding more Java 1.5
Submitted by: Jason Dillon

Modified:
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/Artifact.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/ArtifactStatus.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultUpdateCheckManager.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/WagonManager.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListener.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/conflict/DefaultConflictResolver.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataGraph.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolutionResult.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolver.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataRetrievalException.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataSource.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/transform/ClasspathContainer.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/transform/ClasspathTransformation.java
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/Artifact.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/Artifact.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/Artifact.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/Artifact.java Thu May 22 07:20:14 2008
@@ -160,9 +160,9 @@
 
     void setRelease( boolean release );
 
-    List getAvailableVersions();
+    List<ArtifactVersion> getAvailableVersions();
 
-    void setAvailableVersions( List versions );
+    void setAvailableVersions( List<ArtifactVersion> versions );
 
     boolean isOptional();
 

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/ArtifactStatus.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/ArtifactStatus.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/ArtifactStatus.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/ArtifactStatus.java Thu May 22 07:20:14 2008
@@ -53,7 +53,7 @@
 
     private final String key;
 
-    private static Map map;
+    private static Map<String,ArtifactStatus> map;
 
     private ArtifactStatus( String key,
                             int rank )
@@ -63,7 +63,7 @@
 
         if ( map == null )
         {
-            map = new HashMap();
+            map = new HashMap<String,ArtifactStatus>();
         }
         map.put( key, this );
     }
@@ -74,7 +74,7 @@
 
         if ( status != null )
         {
-            retVal = (ArtifactStatus) map.get( status );
+            retVal = map.get( status );
         }
 
         return retVal != null ? retVal : NONE;

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/DefaultArtifact.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/DefaultArtifact.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/DefaultArtifact.java Thu May 22 07:20:14 2008
@@ -82,7 +82,7 @@
 
     private boolean release;
 
-    private List availableVersions;
+    private List<ArtifactVersion> availableVersions;
 
     private Map<Object,ArtifactMetadata> metadataMap;
 
@@ -543,14 +543,7 @@
 
     public boolean isSnapshot()
     {
-        if ( getBaseVersion() != null )
-        {
-            return getBaseVersion().endsWith( SNAPSHOT_VERSION ) || getBaseVersion().equals( LATEST_VERSION );
-        }
-        else
-        {
-            return false;
-        }
+        return getBaseVersion() != null && (getBaseVersion().endsWith(SNAPSHOT_VERSION) || getBaseVersion().equals(LATEST_VERSION));
     }
 
     public void setResolved( boolean resolved )
@@ -584,12 +577,12 @@
         return release;
     }
 
-    public List getAvailableVersions()
+    public List<ArtifactVersion> getAvailableVersions()
     {
         return availableVersions;
     }
 
-    public void setAvailableVersions( List availableVersions )
+    public void setAvailableVersions( List<ArtifactVersion> availableVersions )
     {
         this.availableVersions = availableVersions;
     }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java Thu May 22 07:20:14 2008
@@ -40,6 +40,7 @@
      * @throws ArtifactDeploymentException if an error occurred deploying the artifact
      * @deprecated to be removed before 2.0 after the instlal/deploy plugins use the alternate method
      */
+    @Deprecated
     void deploy( String basedir,
                  String finalName,
                  Artifact artifact,

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java Thu May 22 07:20:14 2008
@@ -64,6 +64,7 @@
     private ArtifactRepositoryLayout defaultLayout;
 
     /** @deprecated we want to use the artifact method only, and ensure artifact.file is set correctly. */
+    @Deprecated
     public void deploy( String basedir,
                         String finalName,
                         Artifact artifact,

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.java Thu May 22 07:20:14 2008
@@ -33,5 +33,5 @@
 
     ArtifactHandler getArtifactHandler( String type );
 
-    void addHandlers( Map handlers );
+    void addHandlers( Map<String,ArtifactHandler> handlers );
 }
\ No newline at end of file

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/handler/manager/DefaultArtifactHandlerManager.java Thu May 22 07:20:14 2008
@@ -34,11 +34,11 @@
     implements ArtifactHandlerManager
 {
     /** @plexus.requirement role="org.apache.maven.artifact.handler.ArtifactHandler" */
-    private Map artifactHandlers;
+    private Map<String,ArtifactHandler> artifactHandlers;
 
     public ArtifactHandler getArtifactHandler( String type )
     {
-        ArtifactHandler handler = (ArtifactHandler) artifactHandlers.get( type );
+        ArtifactHandler handler = artifactHandlers.get( type );
 
         if ( handler == null )
         {
@@ -48,12 +48,12 @@
         return handler;
     }
 
-    public void addHandlers( Map handlers )
+    public void addHandlers( Map<String,ArtifactHandler> handlers )
     {
         artifactHandlers.putAll( handlers );
     }
 
-    public Set getHandlerTypes()
+    public Set<String> getHandlerTypes()
     {
         return artifactHandlers.keySet();
     }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java Thu May 22 07:20:14 2008
@@ -43,6 +43,7 @@
      * @throws ArtifactInstallationException if an error occurred installing the artifact
      * @deprecated to be removed before 2.0 after the instlal/deploy plugins use the alternate method
      */
+    @Deprecated
     void install( String basedir,
                   String finalName,
                   Artifact artifact,

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java Thu May 22 07:20:14 2008
@@ -47,6 +47,7 @@
     private RepositoryMetadataManager repositoryMetadataManager;
 
     /** @deprecated we want to use the artifact method only, and ensure artifact.file is set correctly. */
+    @Deprecated
     public void install( String basedir,
                          String finalName,
                          Artifact artifact,

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultUpdateCheckManager.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultUpdateCheckManager.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultUpdateCheckManager.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultUpdateCheckManager.java Thu May 22 07:20:14 2008
@@ -338,8 +338,7 @@
             sb.append( '-' ).append( artifact.getClassifier() );
         }
         sb.append( '.' ).append( artifact.getType() ).append( LAST_UPDATE_TAG );
-        File touchfile = new File( artifact.getFile().getParentFile(), sb.toString() );
-        return touchfile;
+        return new File( artifact.getFile().getParentFile(), sb.toString() );
     }
 
     public File getTouchfile( RepositoryMetadata metadata, File file )

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java Thu May 22 07:20:14 2008
@@ -45,7 +45,6 @@
 import org.codehaus.plexus.component.configurator.ComponentConfigurator;
 import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.context.ContextException;
@@ -61,7 +60,6 @@
 import java.security.NoSuchAlgorithmException;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -86,17 +84,17 @@
 
     // TODO: proxies, authentication and mirrors are via settings, and should come in via an alternate method - perhaps
     // attached to ArtifactRepository before the method is called (so AR would be composed of WR, not inherit it)
-    private Map proxies = new HashMap();
+    private Map<String,ProxyInfo> proxies = new HashMap<String,ProxyInfo>();
 
-    private Map authenticationInfoMap = new HashMap();
+    private Map<String,AuthenticationInfo> authenticationInfoMap = new HashMap<String,AuthenticationInfo>();
 
-    private Map serverPermissionsMap = new HashMap();
+    private Map<String,RepositoryPermissions> serverPermissionsMap = new HashMap<String,RepositoryPermissions>();
 
     //used LinkedMap to preserve the order.
-    private Map mirrors = new LinkedHashMap();
+    private Map<String,ArtifactRepository> mirrors = new LinkedHashMap<String,ArtifactRepository>();
 
     /** Map( String, XmlPlexusConfiguration ) with the repository id and the wagon configuration */
-    private Map serverConfigurationMap = new HashMap();
+    private Map<String,XmlPlexusConfiguration> serverConfigurationMap = new HashMap<String,XmlPlexusConfiguration>();
 
     private TransferListener downloadMonitor;
 
@@ -198,9 +196,9 @@
             wagon.addTransferListener( downloadMonitor );
         }
 
-        Map checksums = new HashMap( 2 );
+        Map<String,ChecksumObserver> checksums = new HashMap<String,ChecksumObserver>( 2 );
 
-        Map sums = new HashMap( 2 );
+        Map<String,String> sums = new HashMap<String,String>( 2 );
 
         // TODO: configure these on the repository
         for ( int i = 0; i < CHECKSUM_IDS.length; i++ )
@@ -216,8 +214,7 @@
 
                 if ( serverPermissionsMap.containsKey( repository.getId() ) )
                 {
-                    RepositoryPermissions perms = (RepositoryPermissions) serverPermissionsMap.get(
-                        repository.getId() );
+                    RepositoryPermissions perms = serverPermissionsMap.get( repository.getId() );
 
                     getLogger().debug(
                         "adding permissions to wagon connection: " + perms.getFileMode() + " " + perms.getDirectoryMode() );
@@ -248,24 +245,19 @@
             }
 
             // Pre-store the checksums as any future puts will overwrite them
-            for ( Iterator i = checksums.keySet().iterator(); i.hasNext(); )
-            {
-                String extension = (String) i.next();
-                ChecksumObserver observer = (ChecksumObserver) checksums.get( extension );
-                sums.put( extension, observer.getActualChecksum() );
+            for (String extension : checksums.keySet()) {
+                ChecksumObserver observer = checksums.get(extension);
+                sums.put(extension, observer.getActualChecksum());
             }
 
             // We do this in here so we can checksum the artifact metadata too, otherwise it could be metadata itself
-            for ( Iterator i = checksums.keySet().iterator(); i.hasNext(); )
-            {
-                String extension = (String) i.next();
-
+            for (String extension : checksums.keySet()) {
                 // TODO: shouldn't need a file intermediatary - improve wagon to take a stream
-                File temp = File.createTempFile( "maven-artifact", null );
+                File temp = File.createTempFile("maven-artifact", null);
                 temp.deleteOnExit();
-                FileUtils.fileWrite( temp.getAbsolutePath(), (String) sums.get( extension ) );
+                FileUtils.fileWrite(temp.getAbsolutePath(), sums.get(extension));
 
-                wagon.put( temp, remotePath + "." + extension );
+                wagon.put(temp, remotePath + "." + extension);
             }
         }
         catch ( ConnectionException e )
@@ -291,12 +283,10 @@
         finally
         {
             // Remove every checksum listener
-            for ( int i = 0; i < CHECKSUM_IDS.length; i++ )
-            {
-                TransferListener checksumListener = (TransferListener) checksums.get( CHECKSUM_IDS[i] );
-                if ( checksumListener != null )
-                {
-                    wagon.removeTransferListener( checksumListener );
+            for (String aCHECKSUM_IDS : CHECKSUM_IDS) {
+                TransferListener checksumListener = checksums.get(aCHECKSUM_IDS);
+                if (checksumListener != null) {
+                    wagon.removeTransferListener(checksumListener);
                 }
             }
 
@@ -326,23 +316,20 @@
     // NOTE: It is not possible that this method throws TransferFailedException under current conditions.
     // FIXME: Change the throws clause to reflect the fact that we're never throwing TransferFailedException
     public void getArtifact( Artifact artifact,
-                             List remoteRepositories  )
+                             List<ArtifactRepository> remoteRepositories  )
         throws TransferFailedException, ResourceDoesNotExistException
 	{
     	getArtifact( artifact, remoteRepositories, true );
 	}
 
     public void getArtifact( Artifact artifact,
-                             List remoteRepositories,
+                             List<ArtifactRepository> remoteRepositories,
                              boolean force )
         throws TransferFailedException, ResourceDoesNotExistException
     {
         boolean successful = false;
 
-        for ( Iterator i = remoteRepositories.iterator(); i.hasNext() && !successful; )
-        {
-            ArtifactRepository repository = (ArtifactRepository) i.next();
-
+        for (ArtifactRepository repository : remoteRepositories) {
             try
             {
                 getArtifact( artifact, repository, force );
@@ -811,16 +798,15 @@
 
     public ProxyInfo getProxy( String protocol )
     {
-        return (ProxyInfo) proxies.get( protocol );
+        return proxies.get( protocol );
     }
 
     public AuthenticationInfo getAuthenticationInfo( String id )
         throws CredentialsDataSourceException
     {
         return credentialsDataSource == null
-            ? (AuthenticationInfo) authenticationInfoMap.get( id )
-            : credentialsDataSource.get( id )
-            ;
+            ? authenticationInfoMap.get( id )
+            : credentialsDataSource.get( id );
     }
 
     /**
@@ -832,20 +818,16 @@
      */
     public ArtifactRepository getMirror( ArtifactRepository originalRepository )
     {
-        ArtifactRepository selectedMirror = (ArtifactRepository) mirrors.get( originalRepository.getId() );
+        ArtifactRepository selectedMirror = mirrors.get( originalRepository.getId() );
         if ( null == selectedMirror )
         {
             // Process the patterns in order. First one that matches wins.
-            Set keySet = mirrors.keySet();
+            Set<String> keySet = mirrors.keySet();
             if ( keySet != null )
             {
-                Iterator iter = keySet.iterator();
-                while ( iter.hasNext() )
-                {
-                    String pattern = (String) iter.next();
-                    if ( matchPattern( originalRepository, pattern ) )
-                    {
-                        selectedMirror = (ArtifactRepository) mirrors.get( pattern );
+                for (String pattern : keySet) {
+                    if (matchPattern(originalRepository, pattern)) {
+                        selectedMirror = mirrors.get(pattern);
                     }
                 }
             }
@@ -880,34 +862,25 @@
         {
             // process the list
             String[] repos = pattern.split( "," );
-            for ( int i = 0; i < repos.length; i++ )
-            {
-                String repo = repos[i];
-
+            for (String repo : repos) {
                 // see if this is a negative match
-                if ( repo.length() > 1 && repo.startsWith( "!" ) )
-                {
-                    if ( originalId.equals( repo.substring( 1 ) ) )
-                    {
+                if (repo.length() > 1 && repo.startsWith("!")) {
+                    if (originalId.equals(repo.substring(1))) {
                         // explicitly exclude. Set result and stop processing.
                         result = false;
                         break;
                     }
                 }
                 // check for exact match
-                else if ( originalId.equals( repo ) )
-                {
+                else if (originalId.equals(repo)) {
                     result = true;
                     break;
                 }
                 // check for external:*
-                else if ( EXTERNAL_WILDCARD.equals( repo ) && isExternalRepo( originalRepository ) )
-                {
+                else if (EXTERNAL_WILDCARD.equals(repo) && isExternalRepo(originalRepository)) {
                     result = true;
                     // don't stop processing in case a future segment explicitly excludes this repo
-                }
-                else if ( WILDCARD.equals( repo ) )
-                {
+                } else if (WILDCARD.equals(repo)) {
                     result = true;
                     // don't stop processing in case a future segment explicitly excludes this repo
                 }
@@ -927,8 +900,7 @@
         try
         {
             URL url = new URL( originalRepository.getUrl() );
-            return !( url.getHost().equals( "localhost" ) || url.getHost().equals( "127.0.0.1" ) || url.getProtocol().equals(
-                                                                                                                              "file" ) );
+            return !( url.getHost().equals( "localhost" ) || url.getHost().equals( "127.0.0.1" ) || url.getProtocol().equals("file" ) );
         }
         catch ( MalformedURLException e )
         {
@@ -982,14 +954,10 @@
     // We are leaving this method here so that we can attempt to use the new maven-artifact
     // library from the 2.0.x code so that we aren't maintaining two lines of code
     // for the artifact management.
-    public void addAuthenticationInfo( String repositoryId
-        ,
-                                       String username
-        ,
-                                       String password
-        ,
-                                       String privateKey
-        ,
+    public void addAuthenticationInfo( String repositoryId,
+                                       String username,
+                                       String password,
+                                       String privateKey,
                                        String passphrase
     )
     {
@@ -1004,14 +972,10 @@
 
     // This is the new way of handling authentication that will allow us to help users setup
     // authentication requirements.
-    public void addAuthenticationCredentials( String repositoryId
-        ,
-                                              String username
-        ,
-                                              String password
-        ,
-                                              String privateKey
-        ,
+    public void addAuthenticationCredentials( String repositoryId,
+                                              String username,
+                                              String password,
+                                              String privateKey,
                                               String passphrase
     )
         throws CredentialsDataSourceException
@@ -1129,8 +1093,8 @@
             {
                 componentConfigurator = new BasicComponentConfigurator();
 
-                componentConfigurator.configureComponent( wagon, (PlexusConfiguration) serverConfigurationMap
-                    .get( repositoryId ), container.getContainerRealm() );
+                componentConfigurator.configureComponent( wagon,
+                        serverConfigurationMap.get( repositoryId ), container.getContainerRealm() );
             }
             catch ( ComponentConfigurationException e )
             {
@@ -1176,6 +1140,4 @@
     {
         credentialsDataSource = cds;
     }
-
-
 }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/WagonManager.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/WagonManager.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/WagonManager.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/manager/WagonManager.java Thu May 22 07:20:14 2008
@@ -73,11 +73,11 @@
         throws UnsupportedProtocolException, WagonConfigurationException;
 
     void getArtifact( Artifact artifact,
-                      List remoteRepositories )
+                      List<ArtifactRepository> remoteRepositories )
         throws TransferFailedException, ResourceDoesNotExistException;
 
     void getArtifact( Artifact artifact,
-                      List remoteRepositories,
+                      List<ArtifactRepository> remoteRepositories,
                       boolean forceUpdateCheck )
     	throws TransferFailedException, ResourceDoesNotExistException;
 
@@ -162,6 +162,7 @@
 
     void setInteractive( boolean interactive );
 
+    @Deprecated
     void registerWagons( Collection wagons,
                          PlexusContainer extensionContainer );
 

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataRetrievalException.java Thu May 22 07:20:14 2008
@@ -30,22 +30,24 @@
 public class ArtifactMetadataRetrievalException
     extends Exception
 {
-
     private Artifact artifact;
 
     /** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */
+    @Deprecated
     public ArtifactMetadataRetrievalException( String message )
     {
         this( message, null, null );
     }
 
     /** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */
+    @Deprecated
     public ArtifactMetadataRetrievalException( Throwable cause )
     {
         this( null, cause, null );
     }
 
     /** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */
+    @Deprecated
     public ArtifactMetadataRetrievalException( String message,
                                                Throwable cause )
     {

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java Thu May 22 07:20:14 2008
@@ -38,7 +38,7 @@
 
     ResolutionGroup retrieve( Artifact artifact,
                               ArtifactRepository localRepository,
-                              List remoteRepositories )
+                              List<ArtifactRepository> remoteRepositories )
         throws ArtifactMetadataRetrievalException;
 
     /**
@@ -53,8 +53,8 @@
      * @throws ArtifactMetadataRetrievalException
      *          in case of error while retrieving repository metadata from the repository.
      */
-    List retrieveAvailableVersions( Artifact artifact,
+    List<ArtifactVersion> retrieveAvailableVersions( Artifact artifact,
                                     ArtifactRepository localRepository,
-                                    List remoteRepositories )
+                                    List<ArtifactRepository> remoteRepositories )
         throws ArtifactMetadataRetrievalException;
 }
\ No newline at end of file

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/metadata/ResolutionGroup.java Thu May 22 07:20:14 2008
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 
 import java.util.List;
 import java.util.Set;
@@ -27,15 +28,15 @@
 public class ResolutionGroup
 {
 
-    private final Set artifacts;
+    private final Set<Artifact> artifacts;
 
-    private final List resolutionRepositories;
+    private final List<ArtifactRepository> resolutionRepositories;
 
     private final Artifact pomArtifact;
 
     public ResolutionGroup( Artifact pomArtifact,
-                            Set artifacts,
-                            List resolutionRepositories )
+                            Set<Artifact> artifacts,
+                            List<ArtifactRepository> resolutionRepositories )
     {
         this.pomArtifact = pomArtifact;
         this.artifacts = artifacts;
@@ -47,12 +48,12 @@
         return pomArtifact;
     }
 
-    public Set getArtifacts()
+    public Set<Artifact> getArtifacts()
     {
         return artifacts;
     }
 
-    public List getResolutionRepositories()
+    public List<ArtifactRepository> getResolutionRepositories()
     {
         return resolutionRepositories;
     }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java Thu May 22 07:20:14 2008
@@ -24,7 +24,6 @@
 import java.io.IOException;
 import java.io.Reader;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -145,7 +144,7 @@
         // TODO: this needs to be repeated here so the merging doesn't interfere with the written metadata
         //  - we'd be much better having a pristine input, and an ongoing metadata for merging instead
 
-        Map previousMetadata = new HashMap();
+        Map<ArtifactRepository,Metadata> previousMetadata = new HashMap<ArtifactRepository,Metadata>();
         ArtifactRepository selected = null;
         for (ArtifactRepository repository : remoteRepositories) {
             ArtifactRepositoryPolicy policy =
@@ -167,7 +166,7 @@
     }
 
     private void updateSnapshotMetadata( RepositoryMetadata metadata,
-                                         Map previousMetadata,
+                                         Map<ArtifactRepository,Metadata> previousMetadata,
                                          ArtifactRepository selected,
                                          ArtifactRepository localRepository )
         throws RepositoryMetadataStoreException
@@ -177,30 +176,22 @@
         {
             Metadata prevMetadata = metadata.getMetadata();
 
-            for ( Iterator i = previousMetadata.keySet().iterator(); i.hasNext(); )
-            {
-                ArtifactRepository repository = (ArtifactRepository) i.next();
-                Metadata m = (Metadata) previousMetadata.get( repository );
-                if ( repository.equals( selected ) )
-                {
-                    if ( m.getVersioning() == null )
-                    {
-                        m.setVersioning( new Versioning() );
+            for (ArtifactRepository repository : previousMetadata.keySet()) {
+                Metadata m = previousMetadata.get(repository);
+                if (repository.equals(selected)) {
+                    if (m.getVersioning() == null) {
+                        m.setVersioning(new Versioning());
                     }
 
-                    if ( m.getVersioning().getSnapshot() == null )
-                    {
-                        m.getVersioning().setSnapshot( new Snapshot() );
+                    if (m.getVersioning().getSnapshot() == null) {
+                        m.getVersioning().setSnapshot(new Snapshot());
                     }
-                }
-                else
-                {
-                    if ( ( m.getVersioning() != null ) && ( m.getVersioning().getSnapshot() != null ) &&
-                        m.getVersioning().getSnapshot().isLocalCopy() )
-                    {
-                        m.getVersioning().getSnapshot().setLocalCopy( false );
-                        metadata.setMetadata( m );
-                        metadata.storeInLocalRepository( localRepository, repository );
+                } else {
+                    if ((m.getVersioning() != null) && (m.getVersioning().getSnapshot() != null) &&
+                            m.getVersioning().getSnapshot().isLocalCopy()) {
+                        m.getVersioning().getSnapshot().setLocalCopy(false);
+                        metadata.setMetadata(m);
+                        metadata.storeInLocalRepository(localRepository, repository);
                     }
                 }
             }
@@ -212,7 +203,7 @@
     private boolean loadMetadata( RepositoryMetadata repoMetadata,
                                   ArtifactRepository remoteRepository,
                                   ArtifactRepository localRepository,
-                                  Map previousMetadata )
+                                  Map<ArtifactRepository,Metadata> previousMetadata )
         throws RepositoryMetadataReadException
     {
         boolean setRepository = false;

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java Thu May 22 07:20:14 2008
@@ -47,7 +47,7 @@
 
     private Artifact artifact; 
 
-    private List remoteRepositories;
+    private List<ArtifactRepository> remoteRepositories;
 
     private final String originalMessage;
 
@@ -61,7 +61,7 @@
                                                    String version,
                                                    String type,
                                                    String classifier,
-                                                   List remoteRepositories,
+                                                   List<ArtifactRepository> remoteRepositories,
                                                    List path )
     {
         this( message, groupId, artifactId, version, type, classifier, remoteRepositories, path, null );
@@ -73,7 +73,7 @@
                                                    String version,
                                                    String type,
                                                    String classifier,
-                                                   List remoteRepositories,
+                                                   List<ArtifactRepository> remoteRepositories,
                                                    List path,
                                                    Throwable t )
     {
@@ -97,14 +97,14 @@
 
     protected AbstractArtifactResolutionException( String message,
                                                    Artifact artifact,
-                                                   List remoteRepositories )
+                                                   List<ArtifactRepository> remoteRepositories )
     {
         this( message, artifact, remoteRepositories, null );
     }
 
     protected AbstractArtifactResolutionException( String message,
                                                    Artifact artifact,
-                                                   List remoteRepositories,
+                                                   List<ArtifactRepository> remoteRepositories,
                                                    Throwable t )
     {
         this( message, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(),

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java Thu May 22 07:20:14 2008
@@ -21,7 +21,7 @@
 {
     private Artifact artifact;
 
-    private Set artifactDependencies;
+    private Set<Artifact> artifactDependencies;
 
     private String groupId;
 
@@ -61,14 +61,14 @@
         return artifact != null;
     }
 
-    public ArtifactResolutionRequest setArtifactDependencies( Set artifactDependencies )
+    public ArtifactResolutionRequest setArtifactDependencies( Set<Artifact> artifactDependencies )
     {
         this.artifactDependencies = artifactDependencies;
 
         return this;
     }
 
-    public Set getArtifactDependencies()
+    public Set<Artifact> getArtifactDependencies()
     {
         return artifactDependencies;
     }
@@ -136,7 +136,7 @@
         return this;
     }
 
-    public List getRemoteRepostories()
+    public List<ArtifactRepository> getRemoteRepostories()
     {
         return remoteRepostories;
     }
@@ -160,7 +160,7 @@
         return this;
     }
 
-    public List getListeners()
+    public List<ResolutionListener> getListeners()
     {
         return listeners;
     }
@@ -215,9 +215,11 @@
     public String toString()
     {
         StringBuffer sb = new StringBuffer()
-                .append("groupId = ").append(getGroupId())
-                .append("artifactId = ").append(getArtifactId())
-                .append("version = ").append(getVersion());
+                .append(getGroupId())
+                .append(":")
+                .append(getArtifactId())
+                .append(":")
+                .append(getVersion());
 
         return sb.toString();
     }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java Thu May 22 07:20:14 2008
@@ -93,9 +93,13 @@
         return artifacts;
     }
 
-    public Set getArtifactResolutionNodes()
+    public Set<ResolutionNode> getArtifactResolutionNodes()
     {
-        return resolutionNodes == null ? Collections.EMPTY_SET : resolutionNodes;
+        if (resolutionNodes == null) {
+            return Collections.emptySet();
+        }
+
+        return resolutionNodes;
     }
 
     public ArtifactResolutionResult setArtifactResolutionNodes( final Set<ResolutionNode> resolutionNodes )

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java Thu May 22 07:20:14 2008
@@ -43,12 +43,14 @@
     String ROLE = ArtifactResolver.class.getName();
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     void resolve( Artifact artifact,
-                  List remoteRepositories,
+                  List<ArtifactRepository> remoteRepositories,
                   ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   List<ArtifactRepository> remoteRepositories,
@@ -57,6 +59,7 @@
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   List<ArtifactRepository> remoteRepositories,
@@ -66,6 +69,7 @@
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   ArtifactRepository localRepository,
@@ -75,6 +79,7 @@
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   Map managedVersions,
@@ -84,6 +89,7 @@
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   Map managedVersions,
@@ -94,6 +100,7 @@
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   Map managedVersions,
@@ -108,6 +115,7 @@
      * @since 3.0
      * @deprecated use {@link #resolve(ArtifactResolutionRequest)}
      */
+    @Deprecated
     ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   Map managedVersions,
@@ -120,6 +128,7 @@
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
     /** @deprecated use {@link #resolve(ArtifactResolutionRequest)} */
+    @Deprecated
     void resolveAlways( Artifact artifact,
                         List<ArtifactRepository> remoteRepositories,
                         ArtifactRepository localRepository )

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java Thu May 22 07:20:14 2008
@@ -33,8 +33,7 @@
  * @version $Id$
  */
 public class DebugResolutionListener
-    implements ResolutionListener,
-    ResolutionListenerForDepMgmt
+    implements ResolutionListener, ResolutionListenerForDepMgmt
 {
     private Logger logger;
 

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java Thu May 22 07:20:14 2008
@@ -64,40 +64,40 @@
     private ConflictResolver defaultConflictResolver;
     private Logger logger;
 
-    public ArtifactResolutionResult collect( Set artifacts,
+    public ArtifactResolutionResult collect( Set<Artifact> artifacts,
                                              Artifact originatingArtifact,
                                              ArtifactRepository localRepository,
-                                             List remoteRepositories,
+                                             List<ArtifactRepository> remoteRepositories,
                                              ArtifactMetadataSource source,
                                              ArtifactFilter filter,
-                                             List listeners )
+                                             List<ResolutionListener> listeners )
     {
         return collect( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository, remoteRepositories,
             source, filter, listeners );
     }
 
-    public ArtifactResolutionResult collect( Set artifacts,
+    public ArtifactResolutionResult collect( Set<Artifact> artifacts,
                                              Artifact originatingArtifact,
                                              Map managedVersions,
                                              ArtifactRepository localRepository,
-                                             List remoteRepositories,
+                                             List<ArtifactRepository> remoteRepositories,
                                              ArtifactMetadataSource source,
                                              ArtifactFilter filter,
-                                             List listeners )
+                                             List<ResolutionListener> listeners )
     {
         return collect( artifacts, originatingArtifact, managedVersions, localRepository, remoteRepositories, source,
             filter, listeners, null );
     }
 
-    public ArtifactResolutionResult collect( Set artifacts,
+    public ArtifactResolutionResult collect( Set<Artifact> artifacts,
                                              Artifact originatingArtifact,
                                              Map managedVersions,
                                              ArtifactRepository localRepository,
-                                             List remoteRepositories,
+                                             List<ArtifactRepository> remoteRepositories,
                                              ArtifactMetadataSource source,
                                              ArtifactFilter filter,
-                                             List listeners,
-                                             List conflictResolvers )
+                                             List<ResolutionListener> listeners,
+                                             List<ConflictResolver> conflictResolvers )
     {
         ArtifactResolutionResult result = new ArtifactResolutionResult();
 

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java Thu May 22 07:20:14 2008
@@ -30,6 +30,7 @@
 import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata;
 import org.apache.maven.artifact.repository.metadata.Versioning;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.resolver.conflict.ConflictResolver;
 import org.apache.maven.artifact.transform.ArtifactTransformationManager;
 import org.apache.maven.wagon.ResourceDoesNotExistException;
 import org.apache.maven.wagon.TransferFailedException;
@@ -75,7 +76,7 @@
     // ----------------------------------------------------------------------
 
     public void resolve( Artifact artifact,
-                         List remoteRepositories,
+                         List<ArtifactRepository> remoteRepositories,
                          ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
@@ -87,7 +88,7 @@
     }
 
     public void resolveAlways( Artifact artifact,
-                               List remoteRepositories,
+                               List<ArtifactRepository> remoteRepositories,
                                ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
@@ -99,7 +100,7 @@
     }
 
     private void resolve( Artifact artifact,
-                          List remoteRepositories,
+                          List<ArtifactRepository> remoteRepositories,
                           ArtifactRepository localRepository,
                           boolean force )
         throws ArtifactResolutionException, ArtifactNotFoundException
@@ -263,26 +264,19 @@
 
 		boolean localCopy = false;
 
-        for ( Iterator i = artifact.getMetadataList().iterator(); i.hasNext(); )
-        {
-            ArtifactMetadata m = (ArtifactMetadata) i.next();
-
-            if ( m instanceof SnapshotArtifactRepositoryMetadata )
-            {
+        for (ArtifactMetadata m : artifact.getMetadataList()) {
+            if (m instanceof SnapshotArtifactRepositoryMetadata) {
                 SnapshotArtifactRepositoryMetadata snapshotMetadata = (SnapshotArtifactRepositoryMetadata) m;
 
                 Metadata metadata = snapshotMetadata.getMetadata();
 
-                if ( metadata != null )
-                {
+                if (metadata != null) {
                     Versioning versioning = metadata.getVersioning();
 
-                    if ( versioning != null )
-                    {
+                    if (versioning != null) {
                         Snapshot snapshot = versioning.getSnapshot();
 
-                        if ( snapshot != null )
-                        {
+                        if (snapshot != null) {
                             // TODO is it possible to have more than one SnapshotArtifactRepositoryMetadata
                             localCopy = snapshot.isLocalCopy();
                         }
@@ -294,10 +288,10 @@
         return localCopy;
     }
 
-	public ArtifactResolutionResult resolveTransitively( Set artifacts,
+	public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                          Artifact originatingArtifact,
                                                          ArtifactRepository localRepository,
-                                                         List remoteRepositories,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactMetadataSource source,
                                                          ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException
@@ -313,11 +307,11 @@
 
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set artifacts,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                          Artifact originatingArtifact,
                                                          Map managedVersions,
                                                          ArtifactRepository localRepository,
-                                                         List remoteRepositories,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
@@ -331,11 +325,11 @@
             null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set artifacts,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                          Artifact originatingArtifact,
                                                          Map managedVersions,
                                                          ArtifactRepository localRepository,
-                                                         List remoteRepositories,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactMetadataSource source,
                                                          ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException
@@ -351,9 +345,9 @@
             null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set artifacts,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                          Artifact originatingArtifact,
-                                                         List remoteRepositories,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactRepository localRepository,
                                                          ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException
@@ -367,12 +361,12 @@
             null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set artifacts,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                          Artifact originatingArtifact,
-                                                         List remoteRepositories,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactRepository localRepository,
                                                          ArtifactMetadataSource source,
-                                                         List listeners )
+                                                         List<ResolutionListener> listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         return resolveTransitively(
@@ -387,35 +381,35 @@
             listeners );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set artifacts,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                          Artifact originatingArtifact,
                                                          Map managedVersions,
                                                          ArtifactRepository localRepository,
-                                                         List remoteRepositories,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactMetadataSource source,
                                                          ArtifactFilter filter,
-                                                         List listeners )
+                                                         List<ResolutionListener> listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         return resolveTransitively( artifacts, originatingArtifact, managedVersions, localRepository,
             remoteRepositories, source, filter, listeners, null );
     }
 
-    public ArtifactResolutionResult resolveTransitively( Set artifacts,
+    public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                          Artifact originatingArtifact,
                                                          Map managedVersions,
                                                          ArtifactRepository localRepository,
-                                                         List remoteRepositories,
+                                                         List<ArtifactRepository> remoteRepositories,
                                                          ArtifactMetadataSource source,
                                                          ArtifactFilter filter,
-                                                         List listeners,
-                                                         List conflictResolvers )
+                                                         List<ResolutionListener> listeners,
+                                                         List<ConflictResolver> conflictResolvers )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         if ( listeners == null )
         {
-            // TODO: this is simplistic
-            listeners = new ArrayList();
+            // TODO: this is simplistic.
+            listeners = new ArrayList<ResolutionListener>();
             if ( getLogger().isDebugEnabled() )
             {
                 listeners.add( new DebugResolutionListener( getLogger() ) );
@@ -464,30 +458,22 @@
             throw result.getVersionRangeViolation( 0 );
         }
 
-        List resolvedArtifacts = new ArrayList();
+        List<Artifact> resolvedArtifacts = new ArrayList<Artifact>();
 
-        List missingArtifacts = new ArrayList();
+        List<Artifact> missingArtifacts = new ArrayList<Artifact>();
 
-        for ( Iterator i = result.getArtifactResolutionNodes().iterator(); i.hasNext(); )
-        {
-            ResolutionNode node = (ResolutionNode) i.next();
-
-            try
-            {
-                resolve(
-                    node.getArtifact(),
-                    node.getRemoteRepositories(),
-                    localRepository );
+        for (ResolutionNode node : result.getArtifactResolutionNodes()) {
+            try {
+                resolve(node.getArtifact(),
+                        node.getRemoteRepositories(),
+                        localRepository);
 
-                resolvedArtifacts.add( node.getArtifact() );
+                resolvedArtifacts.add(node.getArtifact());
             }
-            catch ( ArtifactNotFoundException anfe )
-            {
-                getLogger().debug(
-                    anfe.getMessage(),
-                    anfe );
+            catch (ArtifactNotFoundException anfe) {
+                getLogger().debug(anfe.getMessage(), anfe);
 
-                missingArtifacts.add( node.getArtifact() );
+                missingArtifacts.add(node.getArtifact());
             }
         }
 
@@ -500,16 +486,16 @@
         return result;
     }
 
-    private List getMirroredRepositories( List remoteRepositories )
+    private List<ArtifactRepository> getMirroredRepositories( List<ArtifactRepository> remoteRepositories )
     {
-        Map repos = new HashMap();
-        for ( Iterator i = remoteRepositories.iterator(); i.hasNext(); )
-        {
-            ArtifactRepository repository = (ArtifactRepository) i.next();
-            ArtifactRepository repo = wagonManager.getMirrorRepository( repository );
-            repos.put( repo.getId(), repo );
+        Map<String,ArtifactRepository> repos = new HashMap<String,ArtifactRepository>();
+
+        for (ArtifactRepository repository : remoteRepositories) {
+            ArtifactRepository repo = wagonManager.getMirrorRepository(repository);
+            repos.put(repo.getId(), repo);
         }
-        return new ArrayList( repos.values() );
+
+        return new ArrayList<ArtifactRepository>( repos.values() );
     }
 
     // ------------------------------------------------------------------------
@@ -520,17 +506,17 @@
     {
         Artifact originatingArtifact = request.getArtifact();
 
-        Set artifacts = request.getArtifactDependencies();
+        Set<Artifact> artifacts = request.getArtifactDependencies();
 
         Map managedVersions = request.getManagedVersionMap();
 
         ArtifactRepository localRepository = request.getLocalRepository();
 
-        List remoteRepositories = request.getRemoteRepostories();
+        List<ArtifactRepository> remoteRepositories = request.getRemoteRepostories();
 
         ArtifactMetadataSource source = request.getMetadataSource();
 
-        List listeners = request.getListeners();
+        List<ResolutionListener> listeners = request.getListeners();
 
         ArtifactFilter filter = request.getFilter();
 
@@ -560,30 +546,24 @@
             return result;
         }
 
-        for ( Iterator i = result.getArtifactResolutionNodes().iterator(); i.hasNext(); )
-        {
-            ResolutionNode node = (ResolutionNode) i.next();
-
-            try
-            {
+        for (ResolutionNode node : result.getArtifactResolutionNodes()) {
+            try {
                 resolve(
-                    node.getArtifact(),
-                    node.getRemoteRepositories(),
-                    localRepository );
+                        node.getArtifact(),
+                        node.getRemoteRepositories(),
+                        localRepository);
             }
-            catch ( ArtifactNotFoundException anfe )
-            {
+            catch (ArtifactNotFoundException anfe) {
                 // These are cases where the artifact just isn't present in any of the remote repositories
                 // because it wasn't deployed, or it was deployed in the wrong place.
 
-                result.addMissingArtifact( node.getArtifact() );
+                result.addMissingArtifact(node.getArtifact());
             }
-            catch ( ArtifactResolutionException e )
-            {
+            catch (ArtifactResolutionException e) {
                 // This is really a wagon TransferFailedException so something went wrong after we successfully
                 // retrieved the metadata.
 
-                result.addErrorArtifactException( e );
+                result.addErrorArtifactException(e);
             }
         }
 

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java Thu May 22 07:20:14 2008
@@ -20,10 +20,10 @@
  */
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 
 /**
  * Exception caused when one or more artifacts can not be resolved because they are not found in the
@@ -32,15 +32,16 @@
 public class MultipleArtifactsNotFoundException
     extends ArtifactResolutionException
 {
-    private final List resolvedArtifacts;
-    private final List missingArtifacts;
+    private final List<Artifact> resolvedArtifacts;
+    private final List<Artifact> missingArtifacts;
 
     /** @deprecated use {@link #MultipleArtifactsNotFoundException(Artifact, List, List, List)} */
+    @Deprecated
     public MultipleArtifactsNotFoundException( Artifact originatingArtifact,
-                                               List missingArtifacts,
-                                               List remoteRepositories )
+                                               List<Artifact> missingArtifacts,
+                                               List<ArtifactRepository> remoteRepositories )
     {
-        this( originatingArtifact, new ArrayList(), missingArtifacts, remoteRepositories );
+        this( originatingArtifact, new ArrayList<Artifact>(), missingArtifacts, remoteRepositories );
     }
 
     /**
@@ -52,9 +53,9 @@
      * @param remoteRepositories  remote repositories where the missing artifacts were not found
      */
     public MultipleArtifactsNotFoundException( Artifact originatingArtifact,
-                                               List resolvedArtifacts,
-                                               List missingArtifacts,
-                                               List remoteRepositories )
+                                               List<Artifact> resolvedArtifacts,
+                                               List<Artifact> missingArtifacts,
+                                               List<ArtifactRepository> remoteRepositories )
     {
         super( constructMessage( missingArtifacts ), originatingArtifact, remoteRepositories );
         this.resolvedArtifacts = resolvedArtifacts;
@@ -66,7 +67,7 @@
      *
      * @return {@link List} of {@link Artifact}
      */
-    public List getResolvedArtifacts()
+    public List<Artifact> getResolvedArtifacts()
     {
         return resolvedArtifacts;
     }
@@ -76,12 +77,12 @@
      *
      * @return {@link List} of {@link Artifact}
      */
-    public List getMissingArtifacts()
+    public List<Artifact> getMissingArtifacts()
     {
         return missingArtifacts;
     }
 
-    private static String constructMessage( List artifacts )
+    private static String constructMessage( List<Artifact> artifacts )
     {
         StringBuffer buffer = new StringBuffer( "Missing:\n" );
 
@@ -89,15 +90,13 @@
 
         int counter = 0;
 
-        for ( Iterator i = artifacts.iterator(); i.hasNext(); )
-        {
-            Artifact artifact = (Artifact) i.next();
-            String message = ( ++counter ) + ") " + artifact.getId();
+        for (Artifact artifact : artifacts) {
+            String message = (++counter) + ") " + artifact.getId();
 
-            buffer.append( constructMissingArtifactMessage( message, "  ", artifact.getGroupId(), artifact
-                .getArtifactId(), artifact.getVersion(), artifact.getType(), artifact.getClassifier(),
-                artifact.getDownloadUrl(), artifact
-                .getDependencyTrail() ) );
+            buffer.append(constructMissingArtifactMessage(message, "  ", artifact.getGroupId(), artifact
+                    .getArtifactId(), artifact.getVersion(), artifact.getType(), artifact.getClassifier(),
+                    artifact.getDownloadUrl(), artifact
+                    .getDependencyTrail()));
         }
 
         buffer.append( "----------\n" );

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListener.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListener.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListener.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListener.java Thu May 22 07:20:14 2008
@@ -44,7 +44,7 @@
 
     int UPDATE_SCOPE = 6;
 
-    /** @deprecated  */
+    @Deprecated
     int MANAGE_ARTIFACT = 7;
 
     int OMIT_FOR_CYCLE = 8;
@@ -79,7 +79,7 @@
     void updateScope( Artifact artifact,
                       String scope );
 
-    /** @deprecated  */
+    @Deprecated
     void manageArtifact( Artifact artifact,
                          Artifact replacement );
 

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java Thu May 22 07:20:14 2008
@@ -28,9 +28,8 @@
  * when the ResolutionListener interface deprecation of the manageArtifact
  * method (and the [yet to be done] addition of these methods to that
  * interface) has had a chance to propagate to all interested plugins.
- *
- * @deprecated
  */
+@Deprecated
 public interface ResolutionListenerForDepMgmt
 {
     void manageArtifactVersion( Artifact artifact,

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java Thu May 22 07:20:14 2008
@@ -44,14 +44,14 @@
 
     private final ResolutionNode parent;
 
-    private final List remoteRepositories;
+    private final List<ArtifactRepository> remoteRepositories;
 
     private boolean active = true;
 
     private List<Artifact> trail;
 
     public ResolutionNode( Artifact artifact,
-                           List remoteRepositories )
+                           List<ArtifactRepository> remoteRepositories )
     {
         this.artifact = artifact;
         this.remoteRepositories = remoteRepositories;
@@ -61,7 +61,7 @@
     }
 
     public ResolutionNode( Artifact artifact,
-                           List remoteRepositories,
+                           List<ArtifactRepository> remoteRepositories,
                            ResolutionNode parent )
     {
         this.artifact = artifact;
@@ -184,7 +184,7 @@
         return depth;
     }
 
-    public List getRemoteRepositories()
+    public List<ArtifactRepository> getRemoteRepositories()
     {
         return remoteRepositories;
     }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/UnresolvedArtifacts.java Thu May 22 07:20:14 2008
@@ -35,12 +35,12 @@
         return originatingArtifact;
     }
 
-    public List getArtifacts()
+    public List<Artifact> getArtifacts()
     {
         return artifacts;
     }
 
-    public List getRemoteRepositories()
+    public List<ArtifactRepository> getRemoteRepositories()
     {
         return remoteRepositories;
     }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/conflict/DefaultConflictResolver.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/conflict/DefaultConflictResolver.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/conflict/DefaultConflictResolver.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/conflict/DefaultConflictResolver.java Thu May 22 07:20:14 2008
@@ -28,6 +28,7 @@
  * @deprecated As of 3.0, use a specific implementation instead, e.g. {@link NearestConflictResolver}
  * @plexus.component
  */
+@Deprecated
 public class DefaultConflictResolver
     extends NearestConflictResolver
 {

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/AndArtifactFilter.java Thu May 22 07:20:14 2008
@@ -39,9 +39,9 @@
     public boolean include( Artifact artifact )
     {
         boolean include = true;
-        for ( Iterator i = filters.iterator(); i.hasNext() && include; )
+        for ( Iterator<ArtifactFilter> i = filters.iterator(); i.hasNext() && include; )
         {
-            ArtifactFilter filter = (ArtifactFilter) i.next();
+            ArtifactFilter filter = i.next();
             if ( !filter.include( artifact ) )
             {
                 include = false;

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java Thu May 22 07:20:14 2008
@@ -45,7 +45,7 @@
         String id = artifact.getGroupId() + ":" + artifact.getArtifactId();
 
         boolean matched = false;
-        for ( Iterator i = patterns.iterator(); i.hasNext() & !matched; )
+        for ( Iterator<String> i = patterns.iterator(); i.hasNext() & !matched; )
         {
             // TODO: what about wildcards? Just specifying groups? versions?
             if ( id.equals( i.next() ) )

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java Thu May 22 07:20:14 2008
@@ -20,7 +20,6 @@
  */
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DefaultArtifact;
 
 /**
  * Filter to only retain objects in the given artifactScope or better.
@@ -43,7 +42,7 @@
 
     public ScopeArtifactFilter( String scope )
     {
-        if ( DefaultArtifact.SCOPE_COMPILE.equals( scope ) )
+        if ( Artifact.SCOPE_COMPILE.equals( scope ) )
         {
             systemScope = true;
             providedScope = true;
@@ -51,7 +50,7 @@
             runtimeScope = false;
             testScope = false;
         }
-        else if ( DefaultArtifact.SCOPE_RUNTIME.equals( scope ) )
+        else if ( Artifact.SCOPE_RUNTIME.equals( scope ) )
         {
             systemScope = false;
             providedScope = false;
@@ -59,7 +58,7 @@
             runtimeScope = true;
             testScope = false;
         }
-        else if ( DefaultArtifact.SCOPE_TEST.equals( scope ) )
+        else if ( Artifact.SCOPE_TEST.equals( scope ) )
         {
             systemScope = true;
             providedScope = true;

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataGraph.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataGraph.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataGraph.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataGraph.java Thu May 22 07:20:14 2008
@@ -100,7 +100,7 @@
         setVersionedVertices(versionedVertices);
         setScopedVertices(scopedVertices);
         
-        this.versionedVertices = scopedVertices ? true : versionedVertices;
+        this.versionedVertices = scopedVertices || versionedVertices;
         this.scopedVertices = scopedVertices;
         
         int count = countNodes( tree );

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolutionResult.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolutionResult.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolutionResult.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolutionResult.java Thu May 22 07:20:14 2008
@@ -112,10 +112,9 @@
         if( dirtyGraph == null )
         	return null;
         
-        ClasspathContainer cpc = classpathTransformation.transform( dirtyGraph, scope, false );
-        
-        return cpc;
+        return classpathTransformation.transform( dirtyGraph, scope, false );
     }
+    
     //----------------------------------------------------------------------------
     public MetadataTreeNode getClasspathTree( ArtifactScopeEnum scope )
     throws MetadataGraphTransformationException, MetadataResolutionException

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolver.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolver.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolver.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataResolver.java Thu May 22 07:20:14 2008
@@ -38,9 +38,8 @@
      * @throws ArtifactResolutionException
      */
 	public List<Artifact> resolveArtifact(
-			List<ArtifactMetadata> mdCollection
-			, ArtifactRepository localRepository
-		    , List<ArtifactRepository> remoteRepositories
-							)
+		    List<ArtifactMetadata> mdCollection,
+            ArtifactRepository localRepository,
+            List<ArtifactRepository> remoteRepositories)
 	throws ArtifactResolutionException;
 }

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataRetrievalException.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataRetrievalException.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataRetrievalException.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataRetrievalException.java Thu May 22 07:20:14 2008
@@ -19,8 +19,6 @@
  * under the License.
  */
 
-import org.apache.maven.artifact.Artifact;
-
 /**
  * Error while retrieving repository metadata from the repository.
  *

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataSource.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataSource.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataSource.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/resolver/metadata/MetadataSource.java Thu May 22 07:20:14 2008
@@ -36,6 +36,6 @@
 
     MetadataResolution retrieve( ArtifactMetadata artifact,
                                  ArtifactRepository localRepository,
-                                 List remoteRepositories )
+                                 List<ArtifactRepository> remoteRepositories )
         throws MetadataRetrievalException;
 }
\ No newline at end of file

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/transform/ClasspathContainer.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/transform/ClasspathContainer.java?rev=659116&r1=659115&r2=659116&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/transform/ClasspathContainer.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/transform/ClasspathContainer.java Thu May 22 07:20:14 2008
@@ -6,8 +6,6 @@
 
 import org.apache.maven.artifact.ArtifactScopeEnum;
 import org.apache.maven.artifact.resolver.metadata.ArtifactMetadata;
-import org.apache.maven.artifact.resolver.metadata.MetadataGraph;
-import org.apache.maven.artifact.resolver.metadata.MetadataGraphVertex;
 import org.apache.maven.artifact.resolver.metadata.MetadataResolutionException;
 import org.apache.maven.artifact.resolver.metadata.MetadataTreeNode;
 



Mime
View raw message