Search in sources :

Example 1 with ArtifactConversionException

use of org.apache.archiva.converter.artifact.ArtifactConversionException in project archiva by apache.

the class LegacyConverterArtifactConsumer method processFile.

@Override
public void processFile(String path) throws ConsumerException {
    try {
        ArtifactReference reference = managedRepository.toArtifactReference(path);
        Artifact artifact = artifactFactory.createArtifact(reference.getGroupId(), reference.getArtifactId(), reference.getVersion(), reference.getClassifier(), reference.getType());
        artifactConverter.convert(artifact, destinationRepository);
    } catch (LayoutException e) {
        log.warn("Unable to convert artifact: {} : {}", path, e.getMessage(), e);
    } catch (ArtifactConversionException e) {
        log.warn("Unable to convert artifact: {} : {}", path, e.getMessage(), e);
    }
}
Also used : ArtifactConversionException(org.apache.archiva.converter.artifact.ArtifactConversionException) LayoutException(org.apache.archiva.repository.LayoutException) ArtifactReference(org.apache.archiva.model.ArtifactReference) Artifact(org.apache.maven.artifact.Artifact)

Aggregations

ArtifactConversionException (org.apache.archiva.converter.artifact.ArtifactConversionException)1 ArtifactReference (org.apache.archiva.model.ArtifactReference)1 LayoutException (org.apache.archiva.repository.LayoutException)1 Artifact (org.apache.maven.artifact.Artifact)1