diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java index 34ce2e8fc..9526c42b1 100644 --- a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java +++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java @@ -38,12 +38,7 @@ public class ArchivaArtifact 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,10 +66,6 @@ public class ArchivaArtifact model.setGroupId( groupId ); model.setArtifactId( artifactId ); model.setVersion( version ); - if ( repository != null ) - { - model.setRepositoryId( repository.getId() ); - } model.setClassifier( StringUtils.defaultString( classifier ) ); model.setType( type ); @@ -82,6 +73,13 @@ public class ArchivaArtifact 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() { return model;