Class HgChangeSetMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.build.HgChangeSetMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="hgchangeset",
defaultPhase=INITIALIZE,
requiresProject=true,
threadSafe=true)
public class HgChangeSetMojo
extends org.apache.maven.plugin.AbstractMojo
Goal which sets project properties for changeSet and changeSetDate from the current Mercurial repository.
- Since:
- 1.0-beta-4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.maven.project.MavenProjectThe maven project.private FileLocal directory to be used to issue SCM actionsprivate booleanWhether to skip this execution.private BooleanForces to use last logged changeset/changesetDate from scmDirectory and not current repository changeset/changesetDate.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckResult(org.apache.maven.scm.ScmResult result) voidexecute()protected Stringprotected Stringprotected Stringprotected Stringprotected StringgetHgCommandOutput(String[] command) protected StringgetProperty(String property) private voidsetChangeSetDateProperty(String changeSetDate) private voidsetChangeSetProperty(String changeSet) private voidsetProperty(String property, String value) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
skip
@Parameter(property="maven.buildNumber.skip", defaultValue="false") private boolean skipWhether to skip this execution.- Since:
- 1.3
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject projectThe maven project. -
scmDirectory
@Parameter(property="maven.changeSet.scmDirectory", defaultValue="${basedir}") private File scmDirectoryLocal directory to be used to issue SCM actions- Since:
- 1.0
-
useLastChangeSetInDirectory
@Parameter(property="maven.buildNumber.useLastChangeSetInDirectory", defaultValue="false") private Boolean useLastChangeSetInDirectoryForces to use last logged changeset/changesetDate from scmDirectory and not current repository changeset/changesetDate.- Since:
- 1.5
-
-
Constructor Details
-
HgChangeSetMojo
public HgChangeSetMojo()
-
-
Method Details
-
checkResult
private void checkResult(org.apache.maven.scm.ScmResult result) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getHgCommandOutput
-
getChangeSet
protected String getChangeSet() throws org.apache.maven.scm.ScmException, org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.scm.ScmExceptionorg.apache.maven.plugin.MojoExecutionException
-
getChangeSetDate
protected String getChangeSetDate() throws org.apache.maven.scm.ScmException, org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.scm.ScmExceptionorg.apache.maven.plugin.MojoExecutionException
-
getChangeSetDateProperty
-
getChangeSetProperty
-
getProperty
-
setChangeSetDateProperty
-
setChangeSetProperty
-
setProperty
-