public abstract class AbstractInstallMojo extends AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory |
protected boolean |
createChecksum
Flag whether to create checksums (MD5, SHA-1) or not.
|
protected DualDigester |
digester |
protected org.apache.maven.artifact.installer.ArtifactInstaller |
installer |
protected ArtifactRepository |
localRepository |
protected boolean |
updateReleaseInfo
Whether to update the metadata to make the artifact a release version.
|
Constructor and Description |
---|
AbstractInstallMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMetaDataFilesForArtifact(Artifact artifact,
Collection<File> targetMetadataFiles,
boolean createChecksum) |
protected File |
getLocalRepoFile(Artifact artifact)
Gets the path of the specified artifact within the local repository.
|
protected File |
getLocalRepoFile(ArtifactMetadata metadata)
Gets the path of the specified artifact metadata within the local repository.
|
protected void |
installChecksums(Artifact artifact,
boolean createChecksum)
Installs the checksums for the specified artifact if this has been enabled in the plugin configuration.
|
protected void |
installChecksums(Collection<File> metadataFiles)
Installs the checksums for the specified metadata files.
|
getLog, getPluginContext, setLog, setPluginContext
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
@Component protected org.apache.maven.artifact.installer.ArtifactInstaller installer
@Parameter(property="localRepository", required=true, readonly=true) protected ArtifactRepository localRepository
@Parameter(property="createChecksum", defaultValue="false") protected boolean createChecksum
@Parameter(property="updateReleaseInfo", defaultValue="false") protected boolean updateReleaseInfo
protected final DualDigester digester
protected File getLocalRepoFile(Artifact artifact)
artifact
- The artifact whose local repo path should be determined, must not be null
.null
.protected File getLocalRepoFile(ArtifactMetadata metadata)
metadata
- The artifact metadata whose local repo path should be determined, must not be null
.null
.protected void installChecksums(Artifact artifact, boolean createChecksum) throws MojoExecutionException
ProjectArtifactMetadata
did not install
the original POM file (cf. MNG-2820). While the plugin currently requires Maven 2.0.6, we continue to hash the
installed POM for robustness with regard to future changes like re-introducing some kind of POM filtering.artifact
- The artifact for which to create checksums, must not be null
.createChecksum
- true
if checksum should be created, otherwise false
.MojoExecutionException
- If the checksums could not be installed.protected void addMetaDataFilesForArtifact(Artifact artifact, Collection<File> targetMetadataFiles, boolean createChecksum)
protected void installChecksums(Collection<File> metadataFiles) throws MojoExecutionException
metadataFiles
- The collection of metadata files to install checksums for, must not be null
.MojoExecutionException
- If the checksums could not be installed.Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.