KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > artifact > installer > ArtifactInstaller


1 package org.apache.maven.artifact.installer;
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.repository.ArtifactRepository;
21
22 import java.io.File JavaDoc;
23
24 /**
25  * @author <a HREF="michal@codehaus.org">Michal Maczka</a>
26  * @version $Id: ArtifactInstaller.java 293493 2005-10-04 02:26:25Z brett $
27  */

28 public interface ArtifactInstaller
29 {
30     String JavaDoc ROLE = ArtifactInstaller.class.getName();
31
32     /**
33      * Install an artifact from a particular directory. The artifact handler is used to determine the filename
34      * of the source file.
35      *
36      * @param basedir the directory where the artifact is stored
37      * @param finalName the name of the artifact sans extension
38      * @param artifact the artifact definition
39      * @param localRepository the local repository to install into
40      * @throws ArtifactInstallationException if an error occurred installing the artifact
41      * @deprecated to be removed before 2.0 after the instlal/deploy plugins use the alternate method
42      */

43     void install( String JavaDoc basedir, String JavaDoc finalName, Artifact artifact, ArtifactRepository localRepository )
44         throws ArtifactInstallationException;
45
46
47     /**
48      * Install an artifact from a particular file.
49      *
50      * @param source the file to install
51      * @param artifact the artifact definition
52      * @param localRepository the local repository to install into
53      * @throws ArtifactInstallationException if an error occurred installing the artifact
54      */

55     void install( File JavaDoc source, Artifact artifact, ArtifactRepository localRepository )
56         throws ArtifactInstallationException;
57 }
58
Popular Tags