1 package org.apache.maven.shared.transfer.project.deploy;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import org.apache.maven.artifact.repository.ArtifactRepository;
23 import org.apache.maven.project.ProjectBuildingRequest;
24 import org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployerException;
25 import org.apache.maven.shared.transfer.project.NoFileAssignedException;
26
27 /**
28 * This defines the interface to deploy a single Maven Project.
29 *
30 * @author Karl Heinz Marbaise <a href="mailto:khmarbaise@apache.org">khmarbaise@apache.org</a>
31 */
32 public interface ProjectDeployer
33 {
34 /**
35 * This will deploy a single project which may contain several artifacts. Those artifacts will be deployed into the
36 * appropriate remote repository.
37 *
38 * <pre class="java">
39 * @Parameter( defaultValue = "${session}", required=true, readonly = true)
40 * MavenSession session;
41 * @Parameter( defaultValue = "${project}", required=true, readonly = true)
42 * MavenProject project;
43 * ..
44 * @Component
45 * ProjectDeployer deployer;
46 *
47 * ProjectDeployerRequest pdr =
48 * new ProjectDeployerRequest()
49 * .setProject (project);
50 *
51 * deployer.deploy (session.getProjectBuildingRequest(), pdr, artifactRepository);
52 * </pre>
53 *
54 * @param buildingRequest {@link ProjectBuildingRequest}
55 * @param request {@link ProjectDeployerRequest}
56 * @param artifactRepository {@link ArtifactRepository}
57 * @throws NoFileAssignedException In case of missing file which has not been assigned to project.
58 * @throws ArtifactDeployerException in case of artifact could not correctly deployed.
59 * @throws IllegalArgumentException in case <code>buildingRequest</code> is <code>null</code>, <code>request</code>
60 * is <code>null</code> or <code>artifactRepository</code> is <code>null</code>.
61 */
62 void deploy( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request,
63 ArtifactRepository artifactRepository )
64 throws NoFileAssignedException, ArtifactDeployerException;
65
66 }