Class MavenUtils
java.lang.Object
fr.paris.lutece.plugins.releaser.util.maven.MavenUtils
MavenUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateReleasePrepare(String strReleaseVersion, String strTag, String strDevelopmentVersion, String strUsername, String strPassword) Builds maven arguments for release:prepare (with release:prepare)static StringgetMisplacedReleasesMessage(String strReleaseRepository, RepositoryType repositoryType) Builds the informative message of a component whose releases are not in the Nexus repository of its platform : private for GitLab, public for GitHub.static StringgetPrivateRepositoryMissingMessage(RepositoryType repositoryType, String strPrivateRepository) Builds the blocking message of a GitLab component when no private Nexus repository is configured : it would be released to the public one.static StringBuilds the blocking message of a component found in several Nexus repositories : the first and last versions of each repository.static StringgetSingleRepository(Map<String, String> mapUrls) Returns the name of the only Nexus repository holding a component.
-
Field Details
-
REPOSITORY_PRIVATE
Name of the private Nexus repositories (suffix of their properties).- See Also:
-
REPOSITORY_PUBLIC
Name of the public Nexus repositories (suffix of their properties).- See Also:
-
-
Method Details
-
createReleasePrepare
public static List<String> createReleasePrepare(String strReleaseVersion, String strTag, String strDevelopmentVersion, String strUsername, String strPassword) Builds maven arguments for release:prepare (with release:prepare)- Parameters:
strReleaseVersion- release versionstrTag- tagstrDevelopmentVersion- development versionstrUsername- strUsernamestrPassword- strPassword- Returns:
- the list
-
getSingleRepository
Returns the name of the only Nexus repository holding a component.- Parameters:
mapUrls- the URLs of the component by repository name- Returns:
- the repository name, null when no repository or several ones hold the component
-
getSeveralRepositoriesMessage
public static String getSeveralRepositoriesMessage(String strKind, Map<String, List<String>> mapVersions) Builds the blocking message of a component found in several Nexus repositories : the first and last versions of each repository.- Parameters:
strKind- the kind of repositories (releases or snapshots)mapVersions- the sorted versions of the component by repository name- Returns:
- the message
-
getMisplacedReleasesMessage
public static String getMisplacedReleasesMessage(String strReleaseRepository, RepositoryType repositoryType) Builds the informative message of a component whose releases are not in the Nexus repository of its platform : private for GitLab, public for GitHub.- Parameters:
strReleaseRepository- the only repository holding the releases, null when none or severalrepositoryType- the platform of the component- Returns:
- the message, null when the releases are in the expected repository or cannot be checked
-
getPrivateRepositoryMissingMessage
public static String getPrivateRepositoryMissingMessage(RepositoryType repositoryType, String strPrivateRepository) Builds the blocking message of a GitLab component when no private Nexus repository is configured : it would be released to the public one.- Parameters:
repositoryType- the platform of the componentstrPrivateRepository- the value of releaser.mavenPrivateReleaseDeploymentRepository- Returns:
- the message, null when the component can be released
-