maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ogusa...@apache.org
Subject svn commit: r751124 - in /maven/components/trunk: maven-project/src/test/java/org/apache/maven/repository/ maven-repository-mercury/ maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/ maven-repository/src/main/java/org/apache/m...
Date Fri, 06 Mar 2009 23:09:23 GMT
Author: ogusakov
Date: Fri Mar  6 23:09:23 2009
New Revision: 751124

URL: http://svn.apache.org/viewvc?rev=751124&view=rev
Log:
[MNG-3849] modifying maven repo system tests 

Modified:
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java
    maven/components/trunk/maven-repository-mercury/pom.xml
    maven/components/trunk/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java
    maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
    maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
    maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/AbstractMavenRepositorySystemTest.java
    maven/components/trunk/maven-repository/src/test/resources/remoteRepo.jar
    maven/components/trunk/maven-repository/src/test/resources/webdav.xml

Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java
(original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/repository/LegacyMavenRepositorySystemTest.java
Fri Mar  6 23:09:23 2009
@@ -45,5 +45,6 @@
     public void testRetrieve()
         throws IOException
     {
+//        super.testRetrieve();
     }
 }

Modified: maven/components/trunk/maven-repository-mercury/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository-mercury/pom.xml?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
--- maven/components/trunk/maven-repository-mercury/pom.xml (original)
+++ maven/components/trunk/maven-repository-mercury/pom.xml Fri Mar  6 23:09:23 2009
@@ -107,6 +107,13 @@
 
     <dependency>
       <groupId>org.apache.maven.mercury</groupId>
+      <artifactId>mercury-repo-virtual</artifactId>
+      <version>${mercury.version}</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven.mercury</groupId>
       <artifactId>mercury-artifact</artifactId>
       <version>${mercury.version}</version>
       <scope>compile</scope>
@@ -133,6 +140,11 @@
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
+    
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-compat</artifactId>
+    </dependency>
 
     <dependency>
       <groupId>org.sonatype.plexus</groupId>                                
                                               

Modified: maven/components/trunk/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
--- maven/components/trunk/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java
(original)
+++ maven/components/trunk/maven-repository-mercury/src/main/java/org/apache/maven/repository/mercury/MercuryRepositorySystem.java
Fri Mar  6 23:09:23 2009
@@ -19,24 +19,27 @@
 
 package org.apache.maven.repository.mercury;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
-import org.apache.maven.artifact.metadata.ResolutionGroup;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
+import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
 import org.apache.maven.mercury.artifact.ArtifactMetadata;
 import org.apache.maven.mercury.builder.api.DependencyProcessor;
 import org.apache.maven.mercury.plexus.PlexusMercury;
 import org.apache.maven.mercury.repository.api.Repository;
 import org.apache.maven.mercury.repository.api.RepositoryException;
 import org.apache.maven.mercury.util.Util;
-import org.apache.maven.repository.MavenRepositorySystem;
 import org.apache.maven.repository.LegacyMavenRepositorySystem;
+import org.apache.maven.repository.MavenRepositorySystem;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.lang.DefaultLanguage;
@@ -74,8 +77,10 @@
         ArtifactResolutionResult result = new ArtifactResolutionResult();
 
         List<Repository> repos =
-            MercuryAdaptor.toMercuryRepos( request.getLocalRepository(), request.getRemoteRepostories(),
-                                           _dependencyProcessor );
+            MercuryAdaptor.toMercuryRepos( request.getLocalRepository()
+                                           , request.getRemoteRepostories()
+                                           , _dependencyProcessor
+                                         );
 
         try
         {
@@ -97,4 +102,33 @@
 
         return result;
     }
+
+//    public List<ArtifactVersion> retrieveAvailableVersions( Artifact artifact, ArtifactRepository
localRepository,
+//                                                            List<ArtifactRepository>
remoteRepositories )
+//        throws ArtifactMetadataRetrievalException
+//    {
+//
+//        List<Repository> repos =
+//            MercuryAdaptor.toMercuryRepos( localRepository, remoteRepositories, _dependencyProcessor
);
+//        
+//        try
+//        {
+//            List<ArtifactBasicMetadata> vl = _mercury.readVersions( repos, MercuryAdaptor.toMercuryBasicMetadata(
artifact ) );
+//            
+//            if( Util.isEmpty( vl ) )
+//                return null;
+//            
+//            List<ArtifactVersion> res = new ArrayList<ArtifactVersion>( vl.size()
);
+//            
+//            for( ArtifactBasicMetadata bmd : vl )
+//                res.add( new DefaultArtifactVersion(bmd.getVersion()) );
+//            
+//            return res;
+//        }
+//        catch ( RepositoryException e )
+//        {
+//            throw new ArtifactMetadataRetrievalException(e);
+//        }
+//    }
+
 }

Modified: maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
--- maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
(original)
+++ maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
Fri Mar  6 23:09:23 2009
@@ -19,6 +19,18 @@
 
 package org.apache.maven.repository;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
+import org.apache.maven.artifact.resolver.ResolutionListener;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+
 /**
  *
  *
@@ -28,5 +40,171 @@
  */
 public class MetadataResolutionRequest
 {
+    private Artifact artifact;
+
+    // Needs to go away
+    private Set<Artifact> artifactDependencies;
+
+    private ArtifactRepository localRepository;
+
+    private List<ArtifactRepository> remoteRepositories;
+
+    // Not sure what to do with this?
+    // Scope
+    // Lock down lists
+    private ArtifactFilter filter;
+
+    // Needs to go away
+    private List<ResolutionListener> listeners = new ArrayList<ResolutionListener>();
+
+    // This is like a filter but overrides all transitive versions 
+    private Map managedVersionMap;
+
+    // This should not be in here, it's a component
+    private ArtifactMetadataSource metadataSource;
+
+    private boolean resolveRoot = true;
+    
+    public MetadataResolutionRequest()
+    {  
+    }
+    
+    public MetadataResolutionRequest( Artifact artifact, ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories )    
+    {        
+        this.artifact = artifact;
+        this.localRepository = localRepository;
+        this.remoteRepositories = remoteRepositories;
+    }
+    
+    public Artifact getArtifact()
+    {
+        return artifact;
+    }
+
+    public MetadataResolutionRequest setArtifact( Artifact artifact )
+    {
+        this.artifact = artifact;
+
+        return this;
+    }
+
+    public MetadataResolutionRequest setArtifactDependencies( Set<Artifact> artifactDependencies
)
+    {
+        this.artifactDependencies = artifactDependencies;
+
+        return this;
+    }
+
+    public Set<Artifact> getArtifactDependencies()
+    {
+        return artifactDependencies;
+    }
+
+    public ArtifactRepository getLocalRepository()
+    {
+        return localRepository;
+    }
+
+    public MetadataResolutionRequest setLocalRepository( ArtifactRepository localRepository
)
+    {
+        this.localRepository = localRepository;
+
+        return this;
+    }
+
+    public List<ArtifactRepository> getRemoteRepostories()
+    {
+        return remoteRepositories;
+    }
+
+    public MetadataResolutionRequest setRemoteRepostories( List<ArtifactRepository>
remoteRepostories )
+    {
+        this.remoteRepositories = remoteRepostories;
+
+        return this;
+    }
+
+    public ArtifactFilter getFilter()
+    {
+        return filter;
+    }
+
+    public MetadataResolutionRequest setFilter( ArtifactFilter filter )
+    {
+        this.filter = filter;
+
+        return this;
+    }
+
+    public List<ResolutionListener> getListeners()
+    {
+        return listeners;
+    }
+
+    public MetadataResolutionRequest setListeners( List<ResolutionListener> listeners
)
+    {        
+        this.listeners = listeners;
+        
+        return this;
+    }
+    
+    public MetadataResolutionRequest addListener( ResolutionListener listener )
+    {
+        listeners.add( listener );
+
+        return this;
+    }
+
+    // ------------------------------------------------------------------------
+    //
+    // ------------------------------------------------------------------------
+
+    public ArtifactMetadataSource getMetadataSource()
+    {
+        return metadataSource;
+    }
+
+    public MetadataResolutionRequest setMetadataSource( ArtifactMetadataSource metadataSource
)
+    {
+        this.metadataSource = metadataSource;
+
+        return this;
+    }
+
+    public Map getManagedVersionMap()
+    {
+        return managedVersionMap;
+    }
+
+    public MetadataResolutionRequest setManagedVersionMap( Map managedVersionMap )
+    {
+        this.managedVersionMap = managedVersionMap;
+
+        return this;
+    }
 
+    public MetadataResolutionRequest setResolveRoot( boolean resolveRoot )
+    {
+        this.resolveRoot = resolveRoot;
+        
+        return this;
+    }
+    
+    public boolean isResolveRoot()
+    {
+        return resolveRoot;
+    }
+    
+    public String toString()
+    {
+        StringBuffer sb = new StringBuffer()
+                .append( "REQUEST: " ).append(  "\n" )
+                .append( "artifact: " ).append( artifact ).append(  "\n" )
+                .append( artifactDependencies ).append(  "\n" )
+                .append( "localRepository: " ).append(  localRepository ).append(  "\n" )
+                .append( "remoteRepositories: " ).append(  remoteRepositories ).append( 
"\n" )
+                .append( "metadataSource: " ).append(  metadataSource ).append(  "\n" );
+        
+        return sb.toString();
+    }
 }

Modified: maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
--- maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
(original)
+++ maven/components/trunk/maven-repository/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
Fri Mar  6 23:09:23 2009
@@ -19,6 +19,20 @@
 
 package org.apache.maven.repository;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.CyclicDependencyException;
+import org.apache.maven.artifact.resolver.DefaultArtifactCollector;
+import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
+
+
 /**
  *
  *
@@ -28,5 +42,302 @@
  */
 public class MetadataResolutionResult
 {
+    private Artifact originatingArtifact;
+
+    private List<Artifact> missingArtifacts;
+
+    // Exceptions
+
+    private List<Exception> exceptions;
+
+    private List<Exception> versionRangeViolations;
+
+    private List<ArtifactResolutionException> metadataResolutionExceptions;
+
+    private List<CyclicDependencyException> circularDependencyExceptions;
+
+    private List<ArtifactResolutionException> errorArtifactExceptions;
+
+    // file system errors
+
+    private List<ArtifactRepository> repositories;
+
+    private Set<Artifact> requestedArtifacts;
+
+    private Set<Artifact> artifacts;
+
+    public Artifact getOriginatingArtifact()
+    {
+        return originatingArtifact;
+    }
+
+    public MetadataResolutionResult ListOriginatingArtifact( final Artifact originatingArtifact
)
+    {
+        this.originatingArtifact = originatingArtifact;
+
+        return this;
+    }
+
+    public void addArtifact( Artifact artifact )
+    {
+        if ( artifacts == null )
+        {
+            artifacts = new LinkedHashSet<Artifact>();
+        }
+
+        artifacts.add( artifact );
+    }
+
+    public Set<Artifact> getArtifacts()
+    {
+        return artifacts;
+    }
+
+    public void addRequestedArtifact( Artifact artifact )
+    {
+        if ( requestedArtifacts == null )
+        {
+            requestedArtifacts = new LinkedHashSet<Artifact>();
+        }
+
+        requestedArtifacts.add( artifact );
+    }
+
+    public Set<Artifact> getRequestedArtifacts()
+    {
+        return requestedArtifacts;
+    }
+
+    public boolean hasMissingArtifacts()
+    {
+        return missingArtifacts != null && !missingArtifacts.isEmpty();
+    }
+
+    public List<Artifact> getMissingArtifacts()
+    {
+        return missingArtifacts == null ? Collections.<Artifact> emptyList() : missingArtifacts;
+    }
+
+    public MetadataResolutionResult addMissingArtifact( Artifact artifact )
+    {
+        missingArtifacts = initList( missingArtifacts );
+
+        missingArtifacts.add( artifact );
+
+        return this;
+    }
+
+    public MetadataResolutionResult setUnresolvedArtifacts( final List<Artifact> unresolvedArtifacts
)
+    {
+        this.missingArtifacts = unresolvedArtifacts;
+
+        return this;
+    }
+
+    // ------------------------------------------------------------------------
+    // Exceptions
+    // ------------------------------------------------------------------------
+
+    public boolean hasExceptions()
+    {
+        return exceptions != null && !exceptions.isEmpty();
+    }
+
+    public List<Exception> getExceptions()
+    {
+        return exceptions == null ? Collections.<Exception> emptyList() : exceptions;
+    }
+
+    // ------------------------------------------------------------------------
+    // Version Range Violations
+    // ------------------------------------------------------------------------
+
+    public boolean hasVersionRangeViolations()
+    {
+        return versionRangeViolations != null;
+    }
+
+    /**
+     * @TODO this needs to accept a {@link OverConstrainedVersionException} as returned by
+     *       {@link #getVersionRangeViolation(int)} but it's not used like that in
+     *       {@link DefaultArtifactCollector}
+     */
+    public MetadataResolutionResult addVersionRangeViolation( Exception e )
+    {
+        versionRangeViolations = initList( versionRangeViolations );
+
+        versionRangeViolations.add( e );
+
+        exceptions = initList( exceptions );
+
+        exceptions.add( e );
+
+        return this;
+    }
+
+    public OverConstrainedVersionException getVersionRangeViolation( int i )
+    {
+        return (OverConstrainedVersionException) versionRangeViolations.get( i );
+    }
+
+    public List<Exception> getVersionRangeViolations()
+    {
+        return versionRangeViolations == null ? Collections.<Exception> emptyList()
: versionRangeViolations;
+    }
+
+    // ------------------------------------------------------------------------
+    // Metadata Resolution Exceptions: ArtifactResolutionExceptions
+    // ------------------------------------------------------------------------
+
+    public boolean hasMetadataResolutionExceptions()
+    {
+        return metadataResolutionExceptions != null;
+    }
+
+    public MetadataResolutionResult addMetadataResolutionException( ArtifactResolutionException
e )
+    {
+        metadataResolutionExceptions = initList( metadataResolutionExceptions );
+
+        metadataResolutionExceptions.add( e );
+
+        exceptions = initList( exceptions );
+
+        exceptions.add( e );
+
+        return this;
+    }
+
+    public ArtifactResolutionException getMetadataResolutionException( int i )
+    {
+        return metadataResolutionExceptions.get( i );
+    }
+
+    public List<ArtifactResolutionException> getMetadataResolutionExceptions()
+    {
+        return metadataResolutionExceptions == null ? Collections.<ArtifactResolutionException>
emptyList()
+                        : metadataResolutionExceptions;
+    }
+
+    // ------------------------------------------------------------------------
+    // ErrorArtifactExceptions: ArtifactResolutionExceptions
+    // ------------------------------------------------------------------------
+
+    public boolean hasErrorArtifactExceptions()
+    {
+        return errorArtifactExceptions != null;
+    }
+
+    public MetadataResolutionResult addErrorArtifactException( ArtifactResolutionException
e )
+    {
+        errorArtifactExceptions = initList( errorArtifactExceptions );
+
+        errorArtifactExceptions.add( e );
+
+        exceptions = initList( exceptions );
+
+        exceptions.add( e );
+
+        return this;
+    }
+
+    public List<ArtifactResolutionException> getErrorArtifactExceptions()
+    {
+        if ( errorArtifactExceptions == null )
+        {
+            return Collections.emptyList();
+        }
+
+        return errorArtifactExceptions;
+    }
+
+    // ------------------------------------------------------------------------
+    // Circular Dependency Exceptions
+    // ------------------------------------------------------------------------
+
+    public boolean hasCircularDependencyExceptions()
+    {
+        return circularDependencyExceptions != null;
+    }
+
+    public MetadataResolutionResult addCircularDependencyException( CyclicDependencyException
e )
+    {
+        circularDependencyExceptions = initList( circularDependencyExceptions );
+
+        circularDependencyExceptions.add( e );
+
+        exceptions = initList( exceptions );
+
+        exceptions.add( e );
+
+        return this;
+    }
+
+    public CyclicDependencyException getCircularDependencyException( int i )
+    {
+        return circularDependencyExceptions.get( i );
+    }
+
+    public List<CyclicDependencyException> getCircularDependencyExceptions()
+    {
+        if ( circularDependencyExceptions == null )
+        {
+            return Collections.emptyList();
+        }
+
+        return circularDependencyExceptions;
+    }
+
+    // ------------------------------------------------------------------------
+    // Repositories
+    // ------------------------------------------------------------------------
+
+    public List<ArtifactRepository> getRepositories()
+    {
+        if ( repositories == null )
+        {
+            return Collections.emptyList();
+        }
+
+        return repositories;
+    }
+
+    public MetadataResolutionResult setRepositories( final List<ArtifactRepository>
repositories )
+    {
+        this.repositories = repositories;
+
+        return this;
+    }
+
+    //
+    // Internal
+    //
+
+    private <T> List<T> initList( final List<T> l )
+    {
+        if ( l == null )
+        {
+            return new ArrayList<T>();
+        }
+        return l;
+    }
+
+    public String toString()
+    {
+        StringBuffer sb = new StringBuffer();
+
+        if ( artifacts != null )
+        {
+            int i = 1;
+            sb.append( "---------" ).append( "\n" );
+            sb.append( artifacts.size() ).append( "\n" );
+            for ( Artifact a : artifacts )
+            {
+                sb.append( i ).append( " " ).append( a ).append( "\n" );
+                i++;
+            }
+            sb.append( "---------" ).append( "\n" );
+        }
 
+        return sb.toString();
+    }
 }

Modified: maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/AbstractMavenRepositorySystemTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/AbstractMavenRepositorySystemTest.java?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
--- maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/AbstractMavenRepositorySystemTest.java
(original)
+++ maven/components/trunk/maven-repository/src/test/java/org/apache/maven/repository/AbstractMavenRepositorySystemTest.java
Fri Mar  6 23:09:23 2009
@@ -35,9 +35,14 @@
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import org.apache.maven.mercury.util.FileUtil;
 import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
+import org.sonatype.plexus.jetty.DefaultServletContainer;
+import org.sonatype.plexus.webcontainer.ServletContainer;
 
 /**
  *
@@ -61,6 +66,8 @@
     
     protected MavenRepositorySystem _mrs;
     
+    protected Startable _server;
+    
     @Override
     protected void setUp()
         throws Exception
@@ -87,6 +94,22 @@
         _localRepo = new DefaultArtifactRepository("local", _localBase.getCanonicalPath(),
new DefaultRepositoryLayout() );
         
         _artifactFactory = getContainer().lookup( ArtifactFactory.class );
+        
+        _server = (Startable) getContainer().lookup( ServletContainer.class );
+        
+        _server.start();
+    }
+    
+    @Override
+    protected void tearDown()
+        throws Exception
+    {
+        super.tearDown();
+        
+        if( _server != null )
+            _server.stop();
+        
+        _server = null;
     }
 
     protected void customizeContainerConfiguration( ContainerConfiguration containerConfiguration
)
@@ -123,6 +146,7 @@
         request.setLocalRepository( _localRepo );
         request.setRemoteRepostories( _remoteRepos );
         request.setArtifact( artifact );
+        request.setResolveRoot( true );
         
         ArtifactResolutionResult res = _mrs.resolve( request );
         
@@ -154,4 +178,21 @@
     }
 
     
+//    public void testRetrieveVersions() throws Exception
+//    {
+//        Artifact artifact = _artifactFactory.createArtifact( "asm", "asm", "[3.0,3.2)",
"compile", "jar" );
+//        
+//        List<ArtifactVersion> res = _mrs.retrieveAvailableVersions( artifact, _localRepo,
_remoteRepos );
+//        
+//        assertNotNull( res );
+//        
+//        assertEquals( 2, res.size() );
+//        
+//        assertTrue( res.contains( new DefaultArtifactVersion("3.0") ) );
+//        
+//        assertTrue( res.contains( new DefaultArtifactVersion("3.1") ) );
+//
+//    }
+
+    
 }

Modified: maven/components/trunk/maven-repository/src/test/resources/remoteRepo.jar
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository/src/test/resources/remoteRepo.jar?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
Binary files - no diff available.

Modified: maven/components/trunk/maven-repository/src/test/resources/webdav.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-repository/src/test/resources/webdav.xml?rev=751124&r1=751123&r2=751124&view=diff
==============================================================================
--- maven/components/trunk/maven-repository/src/test/resources/webdav.xml (original)
+++ maven/components/trunk/maven-repository/src/test/resources/webdav.xml Fri Mar  6 23:09:23
2009
@@ -1,9 +1,4 @@
 <plexus>
-  <load-on-start>
-    <component>    
-      <role>org.sonatype.plexus.webcontainer.ServletContainer</role>        
                                           
-    </component>
-  </load-on-start>
   <components>
     <component>
       <role>org.sonatype.plexus.webcontainer.ServletContainer</role>



Mime
View raw message