1 package org.apache.maven.artifact.resolver;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import java.util.List;
24
25 import org.apache.maven.artifact.Artifact;
26 import org.apache.maven.artifact.repository.ArtifactRepository;
27
28
29
30
31 public class ArtifactNotFoundException
32 extends AbstractArtifactResolutionException
33 {
34 private String downloadUrl;
35
36 protected ArtifactNotFoundException( String message, Artifact artifact, List<ArtifactRepository> remoteRepositories )
37 {
38 super( message, artifact, remoteRepositories );
39 }
40
41 public ArtifactNotFoundException( String message, Artifact artifact )
42 {
43 this( message, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(),
44 artifact.getClassifier(), null, artifact.getDownloadUrl(), artifact.getDependencyTrail() );
45 }
46
47 protected ArtifactNotFoundException( String message, Artifact artifact,
48 List<ArtifactRepository> remoteRepositories, Throwable cause )
49 {
50 this( message, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(),
51 artifact.getClassifier(), remoteRepositories, artifact.getDownloadUrl(), artifact.getDependencyTrail(),
52 cause );
53 }
54
55 public ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type,
56 String classifier, List<ArtifactRepository> remoteRepositories,
57 String downloadUrl, List<String> path, Throwable cause )
58 {
59 super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier,
60 downloadUrl, path ), groupId, artifactId, version, type, classifier,
61 remoteRepositories, null, cause );
62
63 this.downloadUrl = downloadUrl;
64 }
65
66 private ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type,
67 String classifier, List<ArtifactRepository> remoteRepositories,
68 String downloadUrl, List<String> path )
69 {
70 super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier,
71 downloadUrl, path ), groupId, artifactId, version, type, classifier,
72 remoteRepositories, null );
73
74 this.downloadUrl = downloadUrl;
75 }
76
77 public String getDownloadUrl()
78 {
79 return downloadUrl;
80 }
81
82 }