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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateChecksumFiles(org.apache.maven.project.MavenProject project, Path sourceDir, ChecksumRequest checksumRequest) Create checksum files for the direct files in thesourceDir.voiddeleteGroupArtifactMavenMetadataCentralStagingXml(org.apache.maven.project.MavenProject project, Path sourceDir) DeleteMAVEN_METADATA_CENTRAL_STAGING_XMLfrom the Group and Artifact ID directory of aMavenProjectwithin the givensourceDirIf theMavenProjecthas a parent and is a module, the parent and its child modules will have the xml removed as well.getArtifacts(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.artifact.factory.ArtifactFactory artifactFactory) getProjectGroupArtifactPath(org.apache.maven.project.MavenProject project) Return aPathbased on theMavenSession.getCurrentProject()'s Group ID and Artifact ID.getProjectGroupArtifactVersionPath(org.apache.maven.project.MavenProject project) Return aPathbased on theMavenSession.getCurrentProject()'s Group ID, Artifact ID and Version.getProjectGroupPath(org.apache.maven.project.MavenProject project) Return aPathbased on theMavenSession.getCurrentProject()'s Group ID.Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
MAVEN_METADATA_CENTRAL_STAGING_XML
- See Also:
-
-
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:
getArtifactsin interfaceProjectUtils- Throws:
org.apache.maven.plugin.MojoExecutionException
-
deleteGroupArtifactMavenMetadataCentralStagingXml
public void deleteGroupArtifactMavenMetadataCentralStagingXml(org.apache.maven.project.MavenProject project, Path sourceDir) Description copied from interface:ProjectUtilsDeleteMAVEN_METADATA_CENTRAL_STAGING_XMLfrom the Group and Artifact ID directory of aMavenProjectwithin the givensourceDirIf theMavenProjecthas a parent and is a module, the parent and its child modules will have the xml removed as well.- Specified by:
deleteGroupArtifactMavenMetadataCentralStagingXmlin interfaceProjectUtils- Parameters:
project- -MavenProjectsourceDir- -Path
-
createChecksumFiles
public void createChecksumFiles(org.apache.maven.project.MavenProject project, Path sourceDir, ChecksumRequest checksumRequest) Description copied from interface:ProjectUtilsCreate checksum files for the direct files in thesourceDir. For example, if asourceDircontains the file TEST-1.0.pom, checksum files will be created for all the requested checksums in the givenchecksumRequest, like TEST-1.0.pom.md5This method doesn't recursively go through child folders.
- Specified by:
createChecksumFilesin interfaceProjectUtils- Parameters:
project- -MavenProjectsourceDir- -PathchecksumRequest- -ChecksumRequest
-
getProjectGroupPath
Return aPathbased on theMavenSession.getCurrentProject()'s Group ID. Example if a Groups is org.sonatype.publishing, aPathwill be returned containing "/org/sonatype/publishing"- Returns:
- Path of Group ID.
-
getProjectGroupArtifactPath
Return aPathbased on theMavenSession.getCurrentProject()'s Group ID and Artifact ID. Example if a GA is org.sonatype.publishing:test, aPathwill be returned containing "/org/sonatype/publishing/test"- Returns:
- Path of Group ID and Artifact ID.
-
getProjectGroupArtifactVersionPath
Return aPathbased on theMavenSession.getCurrentProject()'s Group ID, Artifact ID and Version. Example if a GAV is org.sonatype.publishing:test:1.0.0, aPathwill be returned containing "/org/sonatype/publishing/test/1.0.0"- Returns:
- Path of Group ID and Artifact ID.
-