KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > artifact > resolver > ArtifactNotFoundException


1 package org.apache.maven.artifact.resolver;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.artifact.Artifact;
20
21 import java.util.List JavaDoc;
22
23 /**
24  * @author <a HREF="mailto:jason@maven.org">Jason van Zyl</a>
25  * @version $Id: ArtifactNotFoundException.java 379372 2006-02-21 06:40:38Z jdcasey $
26  */

27 public class ArtifactNotFoundException
28     extends AbstractArtifactResolutionException
29 {
30     private String JavaDoc downloadUrl;
31     
32     protected ArtifactNotFoundException( String JavaDoc message, Artifact artifact, List JavaDoc remoteRepositories )
33     {
34         super( message, artifact, remoteRepositories );
35     }
36     
37     public ArtifactNotFoundException( String JavaDoc 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 JavaDoc message, Artifact artifact, List JavaDoc remoteRepositories, Throwable JavaDoc 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 JavaDoc message, String JavaDoc groupId, String JavaDoc artifactId, String JavaDoc version, String JavaDoc type,
50                                       List JavaDoc remoteRepositories, String JavaDoc downloadUrl, List JavaDoc path, Throwable JavaDoc 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 JavaDoc message, String JavaDoc groupId, String JavaDoc artifactId, String JavaDoc version, String JavaDoc type,
59                                        List JavaDoc remoteRepositories, String JavaDoc downloadUrl, List JavaDoc 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 JavaDoc getDownloadUrl()
68     {
69         return downloadUrl;
70     }
71
72 }
73
Popular Tags