1 package org.apache.maven.shared.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.project.NoFileAssignedException; 25 26 /** 27 * This defines the interface to deploy a single Maven Project. 28 * 29 * @author Karl Heinz Marbaise <a href="mailto:khmarbaise@apache.org">khmarbaise@apache.org</a> 30 */ 31 public interface ProjectDeployer 32 { 33 /** 34 * This will deploy a single project which may contain several artifacts. Those artifacts will be deployed into the 35 * appropriate remote repository. 36 * 37 * <pre class="java"> 38 * @Parameter( defaultValue = "${session}", required=true, readonly = true) 39 * MavenSession session; 40 * @Parameter( defaultValue = "${project}", required=true, readonly = true) 41 * MavenProject project; 42 * .. 43 * @Component 44 * ProjectDeployer deployer; 45 * 46 * ProjectDeployerRequest pdr = 47 * new ProjectDeployerRequest() 48 * .setProject (project) 49 * .setUpdateReleaseInfo( true ); 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 IllegalArgumentException in case of artifact is not correctly assigned. 59 */ 60 void deploy( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request, 61 ArtifactRepository artifactRepository ) 62 throws NoFileAssignedException, IllegalArgumentException; 63 64 65 }