1 package org.apache.maven.plugin.cxx.utils.release; 2 3 /* 4 * Copyright (C) 2011-2016, Neticoa SAS France - Tous droits réservés. 5 * Author(s) : Franck Bonin, Neticoa SAS France 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 */ 20 21 import java.util.List; 22 import org.apache.maven.plugin.MojoExecutionException; 23 import org.apache.maven.plugin.MojoFailureException; 24 import org.apache.maven.project.MavenProject; 25 import org.apache.maven.shared.release.env.ReleaseEnvironment; 26 import org.apache.maven.shared.release.ReleaseResult; 27 import org.apache.maven.plugin.logging.Log; 28 29 /** 30 * Phase Manager ofthe cxx release/branch goal. 31 * 32 * $FB derived from org.apache.maven.shared.release.ReleaseManager; 33 * @author 34 */ 35 public interface CxxReleaseManager 36 { 37 /** 38 * The Plexus role. 39 */ 40 String ROLE = CxxReleaseManager.class.getName(); 41 42 /** 43 * Execute the phase. 44 * 45 * @param releaseDescriptor the configuration to use 46 * @param releaseEnvironment the environmental configuration, such as Maven settings, Maven home, etc. 47 * @param reactorProjects the reactor projects 48 * @throws ReleaseExecutionException an exception during the execution of the phase 49 * @throws ReleaseFailureException a failure during the execution of the phase 50 * @return the release result 51 */ 52 ReleaseResult branch( CxxReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, 53 List<MavenProject> reactorProjects ) 54 throws MojoExecutionException, MojoFailureException; 55 56 57 /** 58 * Execute the phase. 59 * 60 * @param releaseDescriptor the configuration to use 61 * @param releaseEnvironment the environmental configuration, such as Maven settings, Maven home, etc. 62 * @param reactorProjects the reactor projects 63 * @throws ReleaseExecutionException an exception during the execution of the phase 64 * @throws ReleaseFailureException a failure during the execution of the phase 65 * @return the release result 66 */ 67 ReleaseResult release( CxxReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, 68 List<MavenProject> reactorProjects ) 69 throws MojoExecutionException, MojoFailureException; 70 71 72 /** 73 * Clean a release. 74 * 75 * @param releaseDescriptor the configuration to use for release 76 * @param reactorProjects the reactor projects 77 */ 78 void cleanRelease( CxxReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects ); 79 80 /** 81 * Clean a release. 82 * 83 * @param releaseDescriptor the configuration to use for release 84 * @param reactorProjects the reactor projects 85 */ 86 void cleanBranch( CxxReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects ); 87 88 /** 89 * 90 * 91 * @param log 92 */ 93 void setLog( Log log ); 94 } 95