Package org.honton.chas.exists
Class LocalExistsMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.honton.chas.exists.AbstractExistsMojo
org.honton.chas.exists.LocalExistsMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="local",
defaultPhase=VERIFY,
threadSafe=true)
public class LocalExistsMojo
extends AbstractExistsMojo
Set a property if the artifact in the local repository is same as the just built artifact. The
local repository is either defined in settings.xml or defaults to ~/.m2/repository. Using the
defaults, executing this plugin will prevent the install plugin from reinstalling identical
artifacts to the local repository. This situation will often occur with a recurring schedule
build job.
- Since:
- 0.0.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.maven.artifact.repository.ArtifactRepositoryFields inherited from class org.honton.chas.exists.AbstractExistsMojo
gavFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckArtifactExists(String file) protected StringgetArtifactChecksum(String file) protected StringgetMavenMetadata(String directory) protected Stringprotected StringgetVersionedPath(org.apache.maven.artifact.repository.metadata.SnapshotVersion version) Methods inherited from class org.honton.chas.exists.AbstractExistsMojo
execute, isSnapshotMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
localRepository
@Parameter(property="localRepository", required=true, readonly=true) protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
-
-
Constructor Details
-
LocalExistsMojo
public LocalExistsMojo()
-
-
Method Details
-
getPropertyName
- Specified by:
getPropertyNamein classAbstractExistsMojo
-
getVersionedPath
protected String getVersionedPath(org.apache.maven.artifact.repository.metadata.SnapshotVersion version) - Specified by:
getVersionedPathin classAbstractExistsMojo
-
getMavenMetadata
- Specified by:
getMavenMetadatain classAbstractExistsMojo- Throws:
Exception
-
checkArtifactExists
- Specified by:
checkArtifactExistsin classAbstractExistsMojo
-
getArtifactChecksum
- Specified by:
getArtifactChecksumin classAbstractExistsMojo- Throws:
IOExceptionGeneralSecurityException
-