1 package org.apache.maven.artifact.resolver; 2 3 18 19 import org.apache.maven.artifact.Artifact; 20 21 import java.util.List ; 22 23 27 public class ArtifactNotFoundException 28 extends AbstractArtifactResolutionException 29 { 30 private String downloadUrl; 31 32 protected ArtifactNotFoundException( String message, Artifact artifact, List remoteRepositories ) 33 { 34 super( message, artifact, remoteRepositories ); 35 } 36 37 public ArtifactNotFoundException( String message, Artifact artifact ) 38 { 39 this( message, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(), null, 40 artifact.getDownloadUrl(), artifact.getDependencyTrail() ); 41 } 42 43 protected ArtifactNotFoundException( String message, Artifact artifact, List remoteRepositories, Throwable t ) 44 { 45 this( message, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(), 46 remoteRepositories, artifact.getDownloadUrl(), artifact.getDependencyTrail(), t ); 47 } 48 49 public ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, 50 List remoteRepositories, String downloadUrl, List path, Throwable t ) 51 { 52 super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, downloadUrl, path ), groupId, artifactId, 53 version, type, remoteRepositories, null, t ); 54 55 this.downloadUrl = downloadUrl; 56 } 57 58 private ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, 59 List remoteRepositories, String downloadUrl, List path ) 60 { 61 super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, downloadUrl, path ), groupId, artifactId, 62 version, type, remoteRepositories, null ); 63 64 this.downloadUrl = downloadUrl; 65 } 66 67 public String getDownloadUrl() 68 { 69 return downloadUrl; 70 } 71 72 } 73 | Popular Tags |