archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r886101 - in /archiva/branches/MRM-1025/archiva-modules: archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ archiva-base/archiva-model/ archiva-base/archiva-model/src/main/md...
Date Wed, 02 Dec 2009 10:24:00 GMT
Author: brett
Date: Wed Dec  2 10:23:42 2009
New Revision: 886101

URL: http://svn.apache.org/viewvc?rev=886101&view=rev
Log:
[MRM-1025] remove model fields that are not used for clarity

Removed:
    archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/src/test/java/org/apache/maven/archiva/model/ArchivaArtifactTest.java
    archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/constraints/ArtifactsProcessedConstraintTest.java
Modified:
    archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
    archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/pom.xml
    archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
    archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java
    archiva/branches/MRM-1025/archiva-modules/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsProcessedConstraint.java
    archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/constraints/AllTests.java
    archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAOTest.java
    archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
(original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
Wed Dec  2 10:23:42 2009
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.ConfigurationNames;
 import org.apache.maven.archiva.configuration.FileTypes;
@@ -41,11 +46,6 @@
 import org.codehaus.plexus.registry.Registry;
 import org.codehaus.plexus.registry.RegistryListener;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
 /**
  * ArtifactUpdateDatabaseConsumer - Take an artifact off of disk and put it into the repository.
  *
@@ -193,8 +193,6 @@
 
             artifact.getModel().setLastModified( new Date( artifactFile.lastModified() )
);
             artifact.getModel().setSize( artifactFile.length() );
-            artifact.getModel().setOrigin( "FileSystem" );
-            artifact.getModel().setWhenProcessed( null );
             
             // set this to when the artifact was first discovered in the repo
             if ( artifact.getModel().getWhenGathered() == null )

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/pom.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/pom.xml?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/pom.xml (original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/pom.xml Wed Dec 
2 10:23:42 2009
@@ -70,7 +70,7 @@
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
         <configuration>
-          <version>1.2.1</version>
+          <version>1.3.0</version>
           <packageWithVersion>false</packageWithVersion>
           <models>
             <model>src/main/mdo/archiva-base.xml</model>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
(original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
Wed Dec  2 10:23:42 2009
@@ -5,7 +5,10 @@
        xsd.target-namespace="http://archiva.apache.org/model/1.2.0">
   <id>archiva-base-model</id>
   <name>ArchivaBaseModel</name>
-  <version>1.2.1</version>
+  <!-- Note that we've outright removed old model information instead of setting the finish
version to be 1.2.1.
+  if for any reason this model needs to be retained for some other use (eg, migration), then
those may need to be
+  restored. Otherwise, the previous archiva-model artifact can be used if necessary -->
+  <version>1.3.0</version>
   <description>Archiva Model</description>
   <defaults>
     <default>
@@ -220,47 +223,6 @@
             The size of the artifact on disk.
           </description>
         </field>
-        <field stash.maxSize="16">
-          <name>platform</name>
-          <identifier>false</identifier>
-          <version>1.0.0+</version>
-          <type>String</type>
-          <required>true</required>
-          <description>
-            The platform of this artifact. (default: "java")
-          </description>
-          <defaultValue>java</defaultValue>
-        </field>
-        <field>
-          <name>whenIndexed</name>
-          <identifier>false</identifier>
-          <version>1.0.0+</version>
-          <type>Date</type>
-          <required>false</required>
-          <description>
-            The timestamp when this artifact was indexed.
-          </description>
-        </field>
-        <field>
-          <name>whenProcessed</name>
-          <identifier>false</identifier>
-          <version>1.0.0+</version>
-          <type>Date</type>
-          <required>false</required>
-          <description>
-            When this artifact's contents was processed.
-          </description>
-        </field>
-        <field>
-          <name>origin</name>
-          <identifier>false</identifier>
-          <version>1.0.0+</version>
-          <type>String</type>
-          <required>false</required>
-          <description>
-            The origin of this artifact. (Filesystem, Proxy, Deploy)
-          </description>
-        </field>
         <field>
           <name>whenGathered</name>
           <identifier>false</identifier>
@@ -279,20 +241,6 @@
     private static final long serialVersionUID = -6292417108113887384L;
           ]]></code>
         </codeSegment>
-        <codeSegment>
-          <version>1.0.0+</version>
-          <code><![CDATA[
-    /**
-     * Identify if this artifact's contents have been processed or not.
-     * 
-     * @return true if the artifact's contents have been processed.
-     */
-    public boolean isProcessed()
-    {
-        return !(whenProcessed == null);
-    }          
-          ]]></code>
-        </codeSegment>
       </codeSegments>
     </class>
 
@@ -443,26 +391,6 @@
             The size of the artifact on disk.
           </description>
         </field>
-        <field>
-          <name>whenIndexed</name>
-          <identifier>false</identifier>
-          <version>1.0.0+</version>
-          <type>Date</type>
-          <required>false</required>
-          <description>
-            The timestamp when this artifact was indexed.
-          </description>
-        </field>
-        <field>
-          <name>origin</name>
-          <identifier>false</identifier>
-          <version>1.0.0+</version>
-          <type>String</type>
-          <required>false</required>
-          <description>
-            The origin of this artifact. (Filesystem, Proxy, Deploy)
-          </description>
-        </field>
       </fields>
       <codeSegments>
         <codeSegment>

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java
(original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataReader.java
Wed Dec  2 10:23:42 2009
@@ -19,6 +19,9 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.Date;
+
 import org.apache.commons.lang.math.NumberUtils;
 import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
 import org.apache.maven.archiva.model.Plugin;
@@ -27,9 +30,6 @@
 import org.apache.maven.archiva.xml.XMLReader;
 import org.dom4j.Element;
 
-import java.io.File;
-import java.util.Date;
-
 /**
  * RepositoryMetadataReader - read maven-metadata.xml files.
  *
@@ -60,7 +60,6 @@
             metadata.setVersion( xml.getElementText( "//metadata/version" ) );
             metadata.setFileLastModified( new Date( metadataFile.lastModified() ) );
             metadata.setFileSize( metadataFile.length() );
-            metadata.setWhenIndexed( null );
 
             metadata.setLastUpdated( xml.getElementText( "//metadata/versioning/lastUpdated"
) );
             metadata.setLatestVersion( xml.getElementText( "//metadata/versioning/latest"
) );

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsProcessedConstraint.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsProcessedConstraint.java?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsProcessedConstraint.java
(original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsProcessedConstraint.java
Wed Dec  2 10:23:42 2009
@@ -19,10 +19,10 @@
  * under the License.
  */
 
-import org.apache.maven.archiva.database.Constraint;
-
 import java.util.Date;
 
+import org.apache.maven.archiva.database.Constraint;
+
 /**
  * ArtifactsProcessedConstraint 
  *
@@ -34,18 +34,6 @@
 {
     private String whereClause;
 
-    public ArtifactsProcessedConstraint( boolean isProcessed )
-    {
-        if ( isProcessed )
-        {
-            whereClause = "whenProcessed != null";
-        }
-        else
-        {
-            whereClause = "whenProcessed == null";
-        }
-    }
-
     /**
      * A Constraint showing artifacts processed since date provided.
      * @param since

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/constraints/AllTests.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/constraints/AllTests.java?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/constraints/AllTests.java
(original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/constraints/AllTests.java
Wed Dec  2 10:23:42 2009
@@ -34,7 +34,6 @@
     {
         TestSuite suite = new TestSuite( "Test for org.apache.maven.archiva.database.constraints"
);
         //$JUnit-BEGIN$
-        suite.addTestSuite( ArtifactsProcessedConstraintTest.class );
         suite.addTestSuite( ArtifactsByChecksumConstraintTest.class );
         suite.addTestSuite( OlderArtifactsByAgeConstraintTest.class );
         suite.addTestSuite( UniqueGroupIdConstraintTest.class );

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAOTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAOTest.java?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAOTest.java
(original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAOTest.java
Wed Dec  2 10:23:42 2009
@@ -21,7 +21,6 @@
 
 import java.util.Date;
 import java.util.List;
-
 import javax.jdo.JDOHelper;
 import javax.jdo.spi.JDOImplHelper;
 
@@ -67,7 +66,6 @@
 
         // Set some mandatory values
         artifact.getModel().setLastModified( new Date() );
-        artifact.getModel().setOrigin( "test" );
 
         // Save it.
         ArchivaArtifact savedArtifact = artiDao.saveArtifact( artifact );
@@ -90,7 +88,7 @@
         assertEquals( "jar", firstArtifact.getType() );
 
         // Change value and save.
-        savedArtifact.getModel().setOrigin( "changed" );
+        savedArtifact.getModel().setLastModified( new Date() );
         artiDao.saveArtifact( savedArtifact );
 
         // Test that only 1 object is saved.
@@ -103,7 +101,6 @@
 
         // Test expected values.
         assertEquals( "archiva-test-module", actualArtifact.getArtifactId() );
-        assertEquals( "changed", actualArtifact.getModel().getOrigin() );
 
         // Test that only 1 object is saved.
         assertEquals( 1, artiDao.queryArtifacts( null ).size() );

Modified: archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java?rev=886101&r1=886100&r2=886101&view=diff
==============================================================================
--- archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
(original)
+++ archiva/branches/MRM-1025/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/ArchivaRepositoryScanningTaskExecutorTest.java
Wed Dec  2 10:23:42 2009
@@ -32,7 +32,6 @@
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.database.ArchivaDAO;
 import org.apache.maven.archiva.database.ArtifactDAO;
-import org.apache.maven.archiva.database.constraints.ArtifactsProcessedConstraint;
 import org.apache.maven.archiva.model.ArchivaArtifact;
 import org.apache.maven.archiva.model.RepositoryContentStatistics;
 import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
@@ -174,7 +173,7 @@
         taskExecutor.executeTask( repoTask );
 
         ArtifactDAO adao = dao.getArtifactDAO();
-        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint(
false ) );
+        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( null );
         
         assertNotNull( unprocessedResultList );
         assertEquals("Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size()
);
@@ -215,7 +214,7 @@
         taskExecutor.executeTask( repoTask );
 
         ArtifactDAO adao = dao.getArtifactDAO();
-        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint(
false ) );
+        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( null );
         
         assertNotNull( unprocessedResultList );
         assertEquals("Incorrect number of unprocessed artifacts detected. No new artifacts
should have been found.", 0, unprocessedResultList.size() );
@@ -232,7 +231,7 @@
         
         taskExecutor.executeTask( repoTask );
         
-        unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false
) );
+        unprocessedResultList = adao.queryArtifacts( null );
         assertNotNull( unprocessedResultList );
         assertEquals( "Incorrect number of unprocessed artifacts detected. One new artifact
should have been found.", 1, unprocessedResultList.size() );        
     }
@@ -272,7 +271,7 @@
         taskExecutor.executeTask( repoTask );
 
         ArtifactDAO adao = dao.getArtifactDAO();
-        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint(
false ) );
+        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( null );
         
         assertNotNull( unprocessedResultList );
         assertEquals("Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size()
);



Mime
View raw message