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 AbstractExistsMojoSet 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
Fields Modifier and Type Field Description protected org.apache.maven.artifact.repository.ArtifactRepositorylocalRepository-
Fields inherited from class org.honton.chas.exists.AbstractExistsMojo
gav
-
-
Constructor Summary
Constructors Constructor Description LocalExistsMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckArtifactExists(String file)protected StringgetArtifactChecksum(String file)protected StringgetMavenMetadata(String directory)protected StringgetPropertyName()protected StringgetVersionedPath(org.apache.maven.artifact.repository.metadata.SnapshotVersion version)-
Methods inherited from class org.honton.chas.exists.AbstractExistsMojo
execute, isSnapshot
-
-
-
-
Method Detail
-
getPropertyName
protected String getPropertyName()
- Specified by:
getPropertyNamein classAbstractExistsMojo
-
getVersionedPath
protected String getVersionedPath(org.apache.maven.artifact.repository.metadata.SnapshotVersion version)
- Specified by:
getVersionedPathin classAbstractExistsMojo
-
getMavenMetadata
protected String getMavenMetadata(String directory) throws Exception
- Specified by:
getMavenMetadatain classAbstractExistsMojo- Throws:
Exception
-
checkArtifactExists
protected boolean checkArtifactExists(String file)
- Specified by:
checkArtifactExistsin classAbstractExistsMojo
-
getArtifactChecksum
protected String getArtifactChecksum(String file) throws IOException, GeneralSecurityException
- Specified by:
getArtifactChecksumin classAbstractExistsMojo- Throws:
IOExceptionGeneralSecurityException
-
-