Class ProjectUtilsImpl

java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.sonatype.central.publisher.plugin.utils.ProjectUtilsImpl
All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled, ProjectUtils

@Component(role=ProjectUtils.class) public class ProjectUtilsImpl extends org.codehaus.plexus.logging.AbstractLogEnabled implements ProjectUtils
  • Field Details

  • Constructor Details

    • ProjectUtilsImpl

      public ProjectUtilsImpl()
  • Method Details

    • getArtifacts

      public List<ArtifactWithFile> getArtifacts(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.artifact.factory.ArtifactFactory artifactFactory) throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      getArtifacts in interface ProjectUtils
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • deleteGroupArtifactMavenMetadataCentralStagingXml

      public void deleteGroupArtifactMavenMetadataCentralStagingXml(org.apache.maven.project.MavenProject project, Path sourceDir)
      Description copied from interface: ProjectUtils
      Delete MAVEN_METADATA_CENTRAL_STAGING_XML from the Group and Artifact ID directory of a MavenProject within the given sourceDir If the MavenProject has a parent and is a module, the parent and its child modules will have the xml removed as well.
      Specified by:
      deleteGroupArtifactMavenMetadataCentralStagingXml in interface ProjectUtils
      Parameters:
      project - - MavenProject
      sourceDir - - Path
    • createChecksumFiles

      public void createChecksumFiles(org.apache.maven.project.MavenProject project, Path sourceDir, ChecksumRequest checksumRequest)
      Description copied from interface: ProjectUtils
      Create checksum files for the direct files in the sourceDir. For example, if a sourceDir contains the file TEST-1.0.pom, checksum files will be created for all the requested checksums in the given checksumRequest, like TEST-1.0.pom.md5

      This method doesn't recursively go through child folders.

      Specified by:
      createChecksumFiles in interface ProjectUtils
      Parameters:
      project - - MavenProject
      sourceDir - - Path
      checksumRequest - - ChecksumRequest
    • getProjectGroupPath

      public Path getProjectGroupPath(org.apache.maven.project.MavenProject project)
      Return a Path based on the MavenSession.getCurrentProject()'s Group ID. Example if a Groups is org.sonatype.publishing, a Path will be returned containing "/org/sonatype/publishing"
      Returns:
      Path of Group ID.
    • getProjectGroupArtifactPath

      public Path getProjectGroupArtifactPath(org.apache.maven.project.MavenProject project)
      Return a Path based on the MavenSession.getCurrentProject()'s Group ID and Artifact ID. Example if a GA is org.sonatype.publishing:test, a Path will be returned containing "/org/sonatype/publishing/test"
      Returns:
      Path of Group ID and Artifact ID.
    • getProjectGroupArtifactVersionPath

      public Path getProjectGroupArtifactVersionPath(org.apache.maven.project.MavenProject project)
      Return a Path based on the MavenSession.getCurrentProject()'s Group ID, Artifact ID and Version. Example if a GAV is org.sonatype.publishing:test:1.0.0, a Path will be returned containing "/org/sonatype/publishing/test/1.0.0"
      Returns:
      Path of Group ID and Artifact ID.