blob: 5162f1f0d4508b14ef064dbed28fe9befaf7854a [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.shared.release.phase;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import java.util.Map;
import org.apache.maven.shared.release.policy.version.VersionPolicy;
import org.apache.maven.shared.release.scm.ScmRepositoryConfigurator;
import org.codehaus.plexus.components.interactivity.Prompter;
/**
* Map projects to their new versions after release / into the next development cycle.
* <p>
* The map-phases per goal are:
* <dl>
* <dt>release:prepare</dt><dd>map-release-versions + map-development-versions; RD.isBranchCreation() = false</dd>
* <dt>release:branch</dt><dd>map-branch-versions + map-development-versions; RD.isBranchCreation() = true</dd>
* <dt>release:update-versions</dt><dd>map-development-versions; RD.isBranchCreation() = false</dd>
* </dl>
*
* <table>
* <caption>MapVersionsPhase</caption>
* <tr>
* <th>MapVersionsPhase field</th><th>map-release-versions</th><th>map-branch-versions</th>
* <th>map-development-versions</th>
* </tr>
* <tr>
* <td>convertToSnapshot</td> <td>false</td> <td>true</td> <td>true</td>
* </tr>
* <tr>
* <td>convertToBranch</td> <td>false</td> <td>true</td> <td>false</td>
* </tr>
* </table>
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @author Robert Scholte
*/
@Singleton
@Named("map-release-versions")
public class MapReleaseVersionsPhase extends AbstractMapVersionsPhase {
@Inject
public MapReleaseVersionsPhase(
ScmRepositoryConfigurator scmRepositoryConfigurator,
Prompter prompter,
Map<String, VersionPolicy> versionPolicies) {
super(scmRepositoryConfigurator, prompter, versionPolicies, false, false);
}
}