maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ogusa...@apache.org
Subject svn commit: r751168 - in /maven/components/trunk/maven-mercury/src: main/java/org/apache/maven/mercury/ test/java/org/apache/maven/mercury/
Date Sat, 07 Mar 2009 01:39:48 GMT
Author: ogusakov
Date: Sat Mar  7 01:39:48 2009
New Revision: 751168

URL: http://svn.apache.org/viewvc?rev=751168&view=rev
Log:
removed ArtifactBasicMetadata

Modified:
    maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
    maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
    maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModelFactory.java
    maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/PomProcessor.java
    maven/components/trunk/maven-mercury/src/test/java/org/apache/maven/mercury/MavenDependencyProcessorTest.java

Modified: maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java?rev=751168&r1=751167&r2=751168&view=diff
==============================================================================
--- maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
(original)
+++ maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDependencyProcessor.java
Sat Mar  7 01:39:48 2009
@@ -25,7 +25,7 @@
 import java.util.List;
 import java.util.Map;
 
-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.builder.api.DependencyProcessorException;
 import org.apache.maven.mercury.builder.api.MetadataReader;
@@ -52,7 +52,7 @@
 public final class MavenDependencyProcessor
     implements DependencyProcessor
 {
-    public List<ArtifactBasicMetadata> getDependencies( ArtifactBasicMetadata bmd,
MetadataReader mdReader, Map system,
+    public List<ArtifactMetadata> getDependencies( ArtifactMetadata bmd, MetadataReader
mdReader, Map system,
                                                         Map user )
         throws MetadataReaderException, DependencyProcessorException
     {

Modified: maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java?rev=751168&r1=751167&r2=751168&view=diff
==============================================================================
--- maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
(original)
+++ maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModel.java
Sat Mar  7 01:39:48 2009
@@ -27,15 +27,14 @@
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
-import org.apache.maven.project.builder.factories.ArtifactModelContainerFactory;
-import org.apache.maven.project.builder.factories.ExclusionModelContainerFactory;
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
+import org.apache.maven.project.builder.PomClassicDomainModel;
 import org.apache.maven.project.builder.PomTransformer;
 import org.apache.maven.project.builder.ProjectUri;
-import org.apache.maven.project.builder.PomClassicDomainModel;
+import org.apache.maven.project.builder.factories.ArtifactModelContainerFactory;
+import org.apache.maven.project.builder.factories.ExclusionModelContainerFactory;
 import org.apache.maven.project.builder.profile.ProfileContext;
 import org.apache.maven.shared.model.DataSourceException;
-import org.apache.maven.shared.model.DomainModel;
 import org.apache.maven.shared.model.InterpolatorProperty;
 import org.apache.maven.shared.model.ModelContainer;
 import org.apache.maven.shared.model.ModelDataSource;
@@ -60,7 +59,7 @@
      */
     private String eventHistory;
 
-    private ArtifactBasicMetadata parentMetadata;
+    private ArtifactMetadata parentMetadata;
 
     /**
      * Constructor
@@ -102,10 +101,10 @@
         return getParentMetadata() != null;
     }
 
-    public List<ArtifactBasicMetadata> getDependencyMetadata()
+    public List<ArtifactMetadata> getDependencyMetadata()
         throws DataSourceException
     {
-        List<ArtifactBasicMetadata> metadatas = new ArrayList<ArtifactBasicMetadata>();
+        List<ArtifactMetadata> metadatas = new ArrayList<ArtifactMetadata>();
 
         ModelDataSource source = new DefaultModelDataSource( modelProperties, PomTransformer.MODEL_CONTAINER_FACTORIES
);
         for ( ModelContainer modelContainer : source.queryFor( ProjectUri.Dependencies.Dependency.xUri
) )
@@ -124,7 +123,7 @@
         return new ProfileContext( dataSource, null, null, properties ).getActiveProfiles();
     }
 
-    public ArtifactBasicMetadata getParentMetadata()
+    public ArtifactMetadata getParentMetadata()
     {
         if ( parentMetadata != null )
         {
@@ -157,7 +156,7 @@
         {
             return null;
         }
-        parentMetadata = new ArtifactBasicMetadata();
+        parentMetadata = new ArtifactMetadata();
         parentMetadata.setArtifactId( artifactId );
         parentMetadata.setVersion( version );
         parentMetadata.setGroupId( groupId );
@@ -165,9 +164,9 @@
         return copyArtifactBasicMetadata( parentMetadata );
     }
 
-    private ArtifactBasicMetadata copyArtifactBasicMetadata( ArtifactBasicMetadata metadata
)
+    private ArtifactMetadata copyArtifactBasicMetadata( ArtifactMetadata metadata )
     {
-        ArtifactBasicMetadata amd = new ArtifactBasicMetadata();
+        ArtifactMetadata amd = new ArtifactMetadata();
         amd.setArtifactId( metadata.getArtifactId() );
         amd.setGroupId( metadata.getGroupId() );
         amd.setVersion( metadata.getVersion() );
@@ -200,12 +199,12 @@
         return new ArrayList<ModelProperty>( modelProperties );
     }
 
-    private ArtifactBasicMetadata transformContainerToMetadata( ModelContainer container
)
+    private ArtifactMetadata transformContainerToMetadata( ModelContainer container )
         throws DataSourceException
     {
         List<ModelProperty> modelProperties = container.getProperties();
 
-        ArtifactBasicMetadata metadata = new ArtifactBasicMetadata();
+        ArtifactMetadata metadata = new ArtifactMetadata();
         for ( ModelProperty mp : modelProperties )
         {
             if ( mp.getUri().equals( ProjectUri.Dependencies.Dependency.groupId ) )
@@ -245,11 +244,11 @@
 
         ModelDataSource dataSource = new DefaultModelDataSource( container.getProperties(),
Arrays.asList( new ArtifactModelContainerFactory(),
                                                                    new ExclusionModelContainerFactory()
) );
-        List<ArtifactBasicMetadata> exclusions = new ArrayList<ArtifactBasicMetadata>();
+        List<ArtifactMetadata> exclusions = new ArrayList<ArtifactMetadata>();
 
         for ( ModelContainer exclusion : dataSource.queryFor( ProjectUri.Dependencies.Dependency.Exclusions.Exclusion.xUri
) )
         {
-            ArtifactBasicMetadata meta = new ArtifactBasicMetadata();
+            ArtifactMetadata meta = new ArtifactMetadata();
             exclusions.add( meta );
 
             for ( ModelProperty mp : exclusion.getProperties() )

Modified: maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModelFactory.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModelFactory.java?rev=751168&r1=751167&r2=751168&view=diff
==============================================================================
--- maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModelFactory.java
(original)
+++ maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/MavenDomainModelFactory.java
Sat Mar  7 01:39:48 2009
@@ -19,13 +19,13 @@
  * under the License.
  */
 
-import org.apache.maven.shared.model.DomainModelFactory;
+import java.io.IOException;
+import java.util.List;
+
 import org.apache.maven.shared.model.DomainModel;
+import org.apache.maven.shared.model.DomainModelFactory;
 import org.apache.maven.shared.model.ModelProperty;
 
-import java.util.List;
-import java.io.IOException;
-
 public class MavenDomainModelFactory
     implements DomainModelFactory
 {

Modified: maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/PomProcessor.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/PomProcessor.java?rev=751168&r1=751167&r2=751168&view=diff
==============================================================================
--- maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/PomProcessor.java
(original)
+++ maven/components/trunk/maven-mercury/src/main/java/org/apache/maven/mercury/PomProcessor.java
Sat Mar  7 01:39:48 2009
@@ -1,16 +1,16 @@
 package org.apache.maven.mercury;
 
-import org.apache.maven.mercury.builder.api.MetadataReaderException;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
 import org.apache.maven.mercury.builder.api.MetadataReader;
-import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
+import org.apache.maven.mercury.builder.api.MetadataReaderException;
 import org.apache.maven.shared.model.ModelProperty;
 
-import java.util.Map;
-import java.util.List;
-
 public interface PomProcessor
 {
-    List<ModelProperty> getRawPom(ArtifactBasicMetadata bmd, MetadataReader mdReader,
Map<String, String>  env,
+    List<ModelProperty> getRawPom(ArtifactMetadata bmd, MetadataReader mdReader, Map<String,
String>  env,
                                   Map<String, String>  sysProps)
             throws MetadataReaderException, PomProcessorException;
 }

Modified: maven/components/trunk/maven-mercury/src/test/java/org/apache/maven/mercury/MavenDependencyProcessorTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-mercury/src/test/java/org/apache/maven/mercury/MavenDependencyProcessorTest.java?rev=751168&r1=751167&r2=751168&view=diff
==============================================================================
--- maven/components/trunk/maven-mercury/src/test/java/org/apache/maven/mercury/MavenDependencyProcessorTest.java
(original)
+++ maven/components/trunk/maven-mercury/src/test/java/org/apache/maven/mercury/MavenDependencyProcessorTest.java
Sat Mar  7 01:39:48 2009
@@ -10,7 +10,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
+import org.apache.maven.mercury.artifact.ArtifactMetadata;
 import org.apache.maven.mercury.metadata.DependencyBuilder;
 import org.apache.maven.mercury.metadata.DependencyBuilderFactory;
 import org.apache.maven.mercury.repository.api.ArtifactBasicResults;
@@ -18,7 +18,6 @@
 import org.apache.maven.mercury.repository.api.RepositoryReader;
 import org.apache.maven.mercury.repository.local.m2.LocalRepositoryM2;
 import org.apache.maven.mercury.repository.remote.m2.RemoteRepositoryM2;
-//import org.apache.maven.mercury.spi.http.server.HttpTestServer;
 import org.apache.maven.mercury.transport.api.Server;
 import org.apache.maven.mercury.util.FileUtil;
 import org.junit.After;
@@ -111,7 +110,7 @@
     }
 
     /**
-     * Test method for {@link org.apache.maven.mercury.MavenDependencyProcessor#getDependencies(org.apache.maven.mercury.artifact.ArtifactBasicMetadata,
org.apache.maven.mercury.builder.api.MetadataReader, java.util.Map, java.util.Map)}.
+     * Test method for {@link org.apache.maven.mercury.MavenDependencyProcessor#getDependencies(org.apache.maven.mercury.artifact.ArtifactMetadata,
org.apache.maven.mercury.builder.api.MetadataReader, java.util.Map, java.util.Map)}.
      */
     public void testMavenVersion()
     throws Exception
@@ -120,8 +119,8 @@
         
         String gav = "org.apache.maven.plugins:maven-dependency-plugin:2.0";
         
-        ArtifactBasicMetadata bmd = new ArtifactBasicMetadata( gav );
-        ArrayList<ArtifactBasicMetadata> query = new ArrayList<ArtifactBasicMetadata>(1);
+        ArtifactMetadata bmd = new ArtifactMetadata( gav );
+        ArrayList<ArtifactMetadata> query = new ArrayList<ArtifactMetadata>(1);
         query.add( bmd );
         
         ArtifactBasicResults res = rr.readDependencies( query );
@@ -132,7 +131,7 @@
         
         assertTrue( res.hasResults() );
         
-        List<ArtifactBasicMetadata> deps = res.getResult( bmd );
+        List<ArtifactMetadata> deps = res.getResult( bmd );
         
         assertNotNull( deps );
         
@@ -140,7 +139,7 @@
         
         System.out.println(deps);
         
-        for( ArtifactBasicMetadata md : deps )
+        for( ArtifactMetadata md : deps )
             if( "${maven.version}".equals( md.getVersion() ) )
                 fail( "dependency has unresolved variable: "+md.toString() );
     }



Mime
View raw message