mirror of https://github.com/apache/archiva.git
Removing repository from constructor, Adding model as constructor option.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@526880 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6ee23e63a9
commit
ede71ae385
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue