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 java.io.IOException; 23 24 /* 25 * Licensed to the Apache Software Foundation (ASF) under one 26 * or more contributor license agreements. See the NOTICE file 27 * distributed with this work for additional information 28 * regarding copyright ownership. The ASF licenses this file 29 * to you under the Apache License, Version 2.0 (the 30 * "License"); you may not use this file except in compliance 31 * with the License. You may obtain a copy of the License at 32 * 33 * http://www.apache.org/licenses/LICENSE-2.0 34 * 35 * Unless required by applicable law or agreed to in writing, 36 * software distributed under the License is distributed on an 37 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 38 * KIND, either express or implied. See the License for the 39 * specific language governing permissions and limitations 40 * under the License. 41 */ 42 43 import org.apache.maven.artifact.repository.ArtifactRepository; 44 import org.apache.maven.project.ProjectBuildingRequest; 45 import org.apache.maven.shared.project.NoFileAssignedException; 46 47 /** 48 * This defines the interface to deploy a single Maven Project. 49 * 50 * @author Karl Heinz Marbaise <a href="mailto:khmarbaise@apache.org">khmarbaise@apache.org</a> 51 */ 52 public interface ProjectDeployer 53 { 54 /** 55 * This will deploy a single project which may contain several artifacts. Those artifacts will be deployed into the 56 * appropriate remote repository. 57 * 58 * <pre class="java"> 59 * @Parameter( defaultValue = "${session}", required=true, readonly = true) 60 * MavenSession session; 61 * @Parameter( defaultValue = "${project}", required=true, readonly = true) 62 * MavenProject project; 63 * .. 64 * @Component 65 * ProjectDeployer deployer; 66 * 67 * ProjectDeployerRequest pdr = 68 * new ProjectDeployerRequest() 69 * .setProject (project) 70 * .setUpdateReleaseInfo( true ); 71 * 72 * deployer.deploy (session.getProjectBuildingRequest(), pdr, artifactRepository); 73 * </pre> 74 * 75 * @param buildingRequest {@link ProjectBuildingRequest} 76 * @param request {@link ProjectDeployerRequest} 77 * @param artifactRepository {@link ArtifactRepository} 78 * @throws IOException In case of problems related to checksums. 79 * @throws NoFileAssignedException In case of missing file which has not been assigned to project. 80 */ 81 void deploy( ProjectBuildingRequest buildingRequest, ProjectDeployerRequest request, 82 ArtifactRepository artifactRepository ) 83 throws IOException, NoFileAssignedException; 84 85 }