java.lang.Object
fr.paris.lutece.plugins.releaser.util.maven.MavenUtils

public final class MavenUtils extends Object
MavenUtils
  • Field Details

    • REPOSITORY_PRIVATE

      public static final String REPOSITORY_PRIVATE
      Name of the private Nexus repositories (suffix of their properties).
      See Also:
    • REPOSITORY_PUBLIC

      public static final String 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 version
      strTag - tag
      strDevelopmentVersion - development version
      strUsername - strUsername
      strPassword - strPassword
      Returns:
      the list
    • getSingleRepository

      public static String getSingleRepository(Map<String,String> mapUrls)
      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 several
      repositoryType - 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 component
      strPrivateRepository - the value of releaser.mavenPrivateReleaseDeploymentRepository
      Returns:
      the message, null when the component can be released