archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r526880 - /maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java
Date Mon, 09 Apr 2007 19:13:13 GMT
Author: joakime
Date: Mon Apr  9 12:13:12 2007
New Revision: 526880

URL: http://svn.apache.org/viewvc?view=rev&rev=526880
Log:
Removing repository from constructor, Adding model as constructor option.

Modified:
    maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java?view=diff&rev=526880&r1=526879&r2=526880
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java
(original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java
Mon Apr  9 12:13:12 2007
@@ -38,12 +38,7 @@
 
     private boolean snapshot = false;
 
-    public ArchivaArtifact( String groupId, String artifactId, String version, String classifier,
String type )
-    {
-        this( null, groupId, artifactId, version, classifier, type );
-    }
-
-    public ArchivaArtifact( ArchivaRepository repository, String groupId, String artifactId,
String version,
+    public ArchivaArtifact( String groupId, String artifactId, String version,
                             String classifier, String type )
     {
         if ( empty( groupId ) )
@@ -71,15 +66,18 @@
         model.setGroupId( groupId );
         model.setArtifactId( artifactId );
         model.setVersion( version );
-        if ( repository != null )
-        {
-            model.setRepositoryId( repository.getId() );
-        }
         model.setClassifier( StringUtils.defaultString( classifier ) );
         model.setType( type );
 
         this.snapshot = VersionUtil.isSnapshot( version );
         this.baseVersion = VersionUtil.getBaseVersion( version );
+    }
+
+    public ArchivaArtifact( ArchivaArtifactModel artifactModel )
+    {
+        this.model = artifactModel;
+        this.snapshot = VersionUtil.isSnapshot( model.getVersion() );
+        this.baseVersion = VersionUtil.getBaseVersion( model.getVersion() );
     }
 
     public ArchivaArtifactModel getModel()



Mime
View raw message