Search in sources :

Example 1 with ArtifactOptBuilder

use of org.apache.archiva.repository.content.base.builder.ArtifactOptBuilder in project archiva by apache.

the class ManagedDefaultRepositoryContent method createArtifact.

public Artifact createArtifact(final StorageAsset artifactPath, final ItemSelector selector, final String classifier) {
    Version version = getVersion(selector);
    ArtifactOptBuilder builder = org.apache.archiva.repository.content.base.ArchivaArtifact.withAsset(artifactPath).withVersion(version).withId(selector.getArtifactId()).withArtifactVersion(mavenContentHelper.getArtifactVersion(artifactPath, selector)).withClassifier(classifier);
    if (selector.hasType()) {
        builder.withType(selector.getType());
    }
    return builder.build();
}
Also used : Version(org.apache.archiva.repository.content.Version) ArchivaVersion(org.apache.archiva.repository.content.base.ArchivaVersion) ArtifactOptBuilder(org.apache.archiva.repository.content.base.builder.ArtifactOptBuilder)

Aggregations

Version (org.apache.archiva.repository.content.Version)1 ArchivaVersion (org.apache.archiva.repository.content.base.ArchivaVersion)1 ArtifactOptBuilder (org.apache.archiva.repository.content.base.builder.ArtifactOptBuilder)1