1 package org.apache.maven.artifact.deployer;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.apache.maven.MavenException;
22 import org.apache.maven.project.Project;
23 import org.apache.maven.repository.ArtifactTypeHandler;
24
25 /**
26 *
27 * The Bean which is used in Jelly Scripts
28 * and serves as a proxy to Artifact Deployer API
29 *
30 * Note that all paths in repository are computed
31 * and source file name is igonred.
32 *
33 * Other remark: To deploy an artifact means much
34 * more then to copy single file. In every case
35 * also MD5 file created and copied to remote repository.
36 * In case of snapshots the process in even more complex.
37 *
38 * @author <a href="mailto:michal.maczka@dimatics.com">Michal Maczka</a>
39 * @version $Id: ArtifactDeployer.java 532339 2007-04-25 12:28:56Z ltheussl $
40 */
41 public interface ArtifactDeployer
42 {
43 /**
44 * Deploy given artifact to remote repository.
45 *
46 * @param artifact Artifact filename
47 * @param type The type of the artifact
48 * (like <code>war</code>, <code>jar</code>)
49 * @param project The project which is a producer of the artifact
50 * @param handler the type handler for the artifact
51 *
52 * @throws MavenException
53 */
54 void deploy( String artifact, String type, Project project, ArtifactTypeHandler handler )
55 throws MavenException;
56
57 /**
58 * Deploy given artifact as a snapshot to remote repository.
59 * @param artifact
60 * @param type The type of the artifact
61 * (like <code>war</code>, <code>jar</code>)
62 * @param project The project which is a producer of the artifact
63 * @param handler the type handler for the artifact
64 *
65 * @throws MavenException
66 */
67 void deploySnapshot( String artifact, String type, Project project, ArtifactTypeHandler handler )
68 throws MavenException;
69
70 /**
71 * Install given artifact in local repository.
72 * @param artifact file name of the artifact
73 * @param type The type of the artifact
74 * (like <code>war</code>, <code>jar</code>)
75 * @param project The project which is a producer of the artifact
76 * @param handler the type handler for the artifact
77 * @throws MavenException
78 */
79 void install( String artifact, String type, Project project, ArtifactTypeHandler handler )
80 throws MavenException;
81
82 /**
83 * Install given artifact as snapshot in local repository.
84 * @param artifact
85 * @param type The type of the artifact
86 * (like <code>war</code>, <code>jar</code>)
87 * @param project The project which is a producer of the artifact
88 * @param handler the type handler for the artifact
89 * @throws MavenException
90 */
91 void installSnapshot( String artifact, String type, Project project, ArtifactTypeHandler handler )
92 throws MavenException;
93 }