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;
|
private boolean snapshot = false;
|
||||||
|
|
||||||
public ArchivaArtifact( String groupId, String artifactId, String version, String classifier, String type )
|
public ArchivaArtifact( String groupId, String artifactId, String version,
|
||||||
{
|
|
||||||
this( null, groupId, artifactId, version, classifier, type );
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArchivaArtifact( ArchivaRepository repository, String groupId, String artifactId, String version,
|
|
||||||
String classifier, String type )
|
String classifier, String type )
|
||||||
{
|
{
|
||||||
if ( empty( groupId ) )
|
if ( empty( groupId ) )
|
||||||
|
@ -71,10 +66,6 @@ public class ArchivaArtifact
|
||||||
model.setGroupId( groupId );
|
model.setGroupId( groupId );
|
||||||
model.setArtifactId( artifactId );
|
model.setArtifactId( artifactId );
|
||||||
model.setVersion( version );
|
model.setVersion( version );
|
||||||
if ( repository != null )
|
|
||||||
{
|
|
||||||
model.setRepositoryId( repository.getId() );
|
|
||||||
}
|
|
||||||
model.setClassifier( StringUtils.defaultString( classifier ) );
|
model.setClassifier( StringUtils.defaultString( classifier ) );
|
||||||
model.setType( type );
|
model.setType( type );
|
||||||
|
|
||||||
|
@ -82,6 +73,13 @@ public class ArchivaArtifact
|
||||||
this.baseVersion = VersionUtil.getBaseVersion( 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()
|
public ArchivaArtifactModel getModel()
|
||||||
{
|
{
|
||||||
return model;
|
return model;
|
||||||
|
|
Loading…
Reference in New Issue