KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > artifact > transform > ArtifactTransformation


1 package org.apache.maven.artifact.transform;
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 import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
21 import org.apache.maven.artifact.installer.ArtifactInstallationException;
22 import org.apache.maven.artifact.repository.ArtifactRepository;
23 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
24 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
25
26 import java.util.List JavaDoc;
27
28 /**
29  * @author <a HREF="mailto:jason@maven.org">Jason van Zyl </a>
30  * @version $Id: ArtifactTransformation.java,v 1.1 2005/03/03 15:37:25
31  * jvanzyl Exp $
32  */

33 public interface ArtifactTransformation
34 {
35     String JavaDoc ROLE = ArtifactTransformation.class.getName();
36
37     /**
38      * Take in a artifact and return the transformed artifact for locating in the remote repository. If no
39      * transformation has occured the original artifact is returned.
40      *
41      * @param artifact Artifact to be transformed.
42      * @param remoteRepositories the repositories to check
43      * @param localRepository the local repository
44      */

45     void transformForResolve( Artifact artifact, List JavaDoc remoteRepositories, ArtifactRepository localRepository )
46         throws ArtifactResolutionException, ArtifactNotFoundException;
47
48     /**
49      * Take in a artifact and return the transformed artifact for locating in the local repository. If no
50      * transformation has occured the original artifact is returned.
51      *
52      * @param artifact Artifact to be transformed.
53      * @param localRepository the local repository it will be stored in
54      */

55     void transformForInstall( Artifact artifact, ArtifactRepository localRepository )
56         throws ArtifactInstallationException;
57
58     /**
59      * Take in a artifact and return the transformed artifact for distributing toa remote repository. If no
60      * transformation has occured the original artifact is returned.
61      *
62      * @param artifact Artifact to be transformed.
63      * @param remoteRepository the repository to deploy to
64      * @param localRepository the local repository
65      */

66     void transformForDeployment( Artifact artifact, ArtifactRepository remoteRepository,
67                                  ArtifactRepository localRepository )
68         throws ArtifactDeploymentException;
69
70 }
71
Popular Tags