View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.shared.release;
20  
21  /**
22   * Release management classes.
23   *
24   * @author <a href="mailto:brett@apache.org">Brett Porter</a>
25   */
26  public interface ReleaseManager {
27      /**
28       * Prepare a release.
29       *
30       * @param prepareRequest             all prepare arguments
31       * @throws org.apache.maven.shared.release.ReleaseExecutionException if there is a problem performing the release
32       * @throws org.apache.maven.shared.release.ReleaseFailureException   if there is a problem performing the release
33       * @since 2.3
34       */
35      void prepare(ReleasePrepareRequest prepareRequest) throws ReleaseExecutionException, ReleaseFailureException;
36  
37      /**
38       * <p>prepareWithResult.</p>
39       *
40       * @param prepareRequest a {@link org.apache.maven.shared.release.ReleasePrepareRequest} object
41       * @return a {@link org.apache.maven.shared.release.ReleaseResult} object
42       */
43      ReleaseResult prepareWithResult(ReleasePrepareRequest prepareRequest);
44  
45      /**
46       * <p>performWithResult.</p>
47       *
48       * @param performRequest a {@link org.apache.maven.shared.release.ReleasePerformRequest} object
49       * @return a {@link org.apache.maven.shared.release.ReleaseResult} object
50       */
51      ReleaseResult performWithResult(ReleasePerformRequest performRequest);
52  
53      /**
54       * Perform a release
55       *
56       * @param performRequest   all perform arguments
57       * @throws org.apache.maven.shared.release.ReleaseExecutionException if there is a problem performing the release
58       * @throws org.apache.maven.shared.release.ReleaseFailureException   if there is a problem performing the release
59       * @since 2.3
60       */
61      void perform(ReleasePerformRequest performRequest) throws ReleaseExecutionException, ReleaseFailureException;
62  
63      /**
64       * Clean a release.
65       *
66       * @param cleanRequest all clean arguments
67       * @throws org.apache.maven.shared.release.ReleaseFailureException if exception when releasing
68       * @since 2.3
69       */
70      void clean(ReleaseCleanRequest cleanRequest) throws ReleaseFailureException;
71  
72      /**
73       * Rollback changes made by the previous release
74       *
75       * @param rollbackRequest            all rollback arguments
76       * @throws org.apache.maven.shared.release.ReleaseExecutionException if there is a problem during release rollback
77       * @throws org.apache.maven.shared.release.ReleaseFailureException   if there is a problem during release rollback
78       * @since 2.3
79       */
80      void rollback(ReleaseRollbackRequest rollbackRequest) throws ReleaseExecutionException, ReleaseFailureException;
81  
82      /**
83       * Branch a project
84       *
85       * @param branchRequest              all branch arguments
86       * @throws org.apache.maven.shared.release.ReleaseExecutionException if there is a problem during release branch
87       * @throws org.apache.maven.shared.release.ReleaseFailureException   if there is a problem during release branch
88       * @since 2.3
89       */
90      void branch(ReleaseBranchRequest branchRequest) throws ReleaseExecutionException, ReleaseFailureException;
91  
92      /**
93       * Update version numbers for a project
94       *
95       * @param updateVersionsRequest      all update versions arguments
96       * @throws org.apache.maven.shared.release.ReleaseExecutionException if there is a problem during update versions
97       * @throws org.apache.maven.shared.release.ReleaseFailureException   if there is a problem during update versions
98       * @since 2.3
99       */
100     void updateVersions(ReleaseUpdateVersionsRequest updateVersionsRequest)
101             throws ReleaseExecutionException, ReleaseFailureException;
102 }