![JAR search and dependency download from the Maven repository](/logo.png)
com.atlassian.maven.plugins.jgitflow.provider.VersionProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jgitflow-maven-plugin Show documentation
Show all versions of jgitflow-maven-plugin Show documentation
A maven plugin to support doing git-flow releases
The newest version!
package com.atlassian.maven.plugins.jgitflow.provider;
/*-
* #%L
* JGitFlow :: Maven Plugin
* %%
* Copyright (C) 2017 Atlassian Pty, LTD, Ultreia.io
* %%
* Licensed 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.
* #L%
*/
import java.util.List;
import java.util.Map;
import com.atlassian.maven.plugins.jgitflow.VersionType;
import com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException;
import org.apache.maven.project.MavenProject;
/**
* Helper class for getting a map that contains module -> version strings.
* This is used to get versions for all projects/submodule in a maven reacotr list
*/
public interface VersionProvider
{
Map getNextVersionsForType(VersionType versionType, ProjectCacheKey cacheKey, List reactorProjects) throws MavenJGitFlowException;
/**
* Returns the (next) release versions for all of the projects in the reactor.
* If defaultReleaseVersion is defined, it will use that for the root project as well as all sub modules if autoVersionSubmodules is true.
* If defaultReleaseVersion is not defined, or if autoVersionSubmodules is false, it will prompt the user for the release version for any
* version in the reactor that is currently a SNAPSHOT
*
* @param cacheKey The cacheKey to use when looking for versions so we don't have to loop over the reactor everytime
* @param reactorProjects The set of reactorProjects to loop over
* @return A Map where the key is the project/module key and the value is the release version
* @throws com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException
*/
Map getNextReleaseVersions(ProjectCacheKey cacheKey, List reactorProjects) throws MavenJGitFlowException;
/**
* Returns the (next) hotfix versions for all of the projects in the reactor.
* If defaultReleaseVersion is defined, it will use that for the root project as well as all sub modules if autoVersionSubmodules is true.
* If defaultReleaseVersion is not defined, or if autoVersionSubmodules is false, it will prompt the user for the hotfix version for any
* version in the reactor that is currently a SNAPSHOT
*
* @param cacheKey The cacheKey to use when looking for versions so we don't have to loop over the reactor everytime
* @param reactorProjects The set of reactorProjects to loop over
* @return A Map where the key is the project/module key and the value is the hotfix version
* @throws com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException
*/
Map getNextHotfixVersions(ProjectCacheKey cacheKey, List reactorProjects) throws MavenJGitFlowException;
/**
* Returns the (next) development versions for all of the projects in the reactor.
* If defaultDevelopmentVersion is defined, it will use that for the root project as well as all sub modules if autoVersionSubmodules is true.
* If defaultDevelopmentVersion is not defined, or if autoVersionSubmodules is false, it will prompt the user for the development version for any
* version in the reactor that is currently a not a SNAPSHOT
*
* @param cacheKey The cacheKey to use when looking for versions so we don't have to loop over the reactor everytime
* @param reactorProjects The set of reactorProjects to loop over
* @return A Map where the key is the project/module key and the value is the release version
* @throws com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException
*/
Map getNextDevelopmentVersions(ProjectCacheKey cacheKey, List reactorProjects) throws MavenJGitFlowException;
/**
* Returns the last release versions for all of the projects in the reactor.
*
* @return A Map where the key is the project/module key and the value is the release version
* @throws com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException
*/
Map getLastReleaseVersions(MavenProject rootProject) throws MavenJGitFlowException;
/**
* Returns the current versions for all of the projects in the reactor.
*
* @param cacheKey The cacheKey to use when looking for versions so we don't have to loop over the reactor everytime
* @param reactorProjects The set of reactorProjects to loop over
* @return A Map where the key is the project/module key and the value is the version
*/
Map getOriginalVersions(ProjectCacheKey cacheKey, List reactorProjects);
/**
* Returns the current versions for all of the projects in the reactor.
* This method never looks up from cache.
*
* @param reactorProjects The set of reactorProjects to loop over
* @return A Map where the key is the project/module key and the value is the version
*/
Map getOriginalVersions(List reactorProjects);
String getRootVersion(ProjectCacheKey cacheKey, List reactorProjects);
String getRootVersion(List reactorProjects);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy