Class UpdateVersionTextMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.jetty.toolchain.version.AbstractVersionMojo
-
- org.eclipse.jetty.toolchain.version.UpdateVersionTextMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="update-version-text", requiresProject=true, defaultPhase=PACKAGE) public class UpdateVersionTextMojo extends AbstractVersionMojoUpdate the active version entry in the VERSION.txt file from information present in the git logs.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanattachArtifactAllow the plugin to attach the generated VERSION.txt file to the projectprivate booleancopyGeneratedAllow the plugin to replace the input VERSION.txt fileprivate booleanrefreshTagsAllow the plugin to issue a 'git fetch --tags' to update the local tags from.private booleansortExistingAllow the existing issues to be sorted alphabetically.private booleanupdateDateAllow the plugin to update the release date for an issue (if none is provided)private java.lang.StringversionThe maven project version.private java.lang.StringversionTagKeyThe version key to use when looking up a git tag ref.private java.lang.StringversionTextKeyThe version key to use in the VERSION.txt file.private java.io.FileversionTextOuputFileThe generated VERSION.txt file.-
Fields inherited from class org.eclipse.jetty.toolchain.version.AbstractVersionMojo
basedir, classifier, project, projectHelper, type, versionTextInputFile
-
-
Constructor Summary
Constructors Constructor Description UpdateVersionTextMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private voidgenerateVersion(VersionText versionText)-
Methods inherited from class org.eclipse.jetty.toolchain.version.AbstractVersionMojo
ensureDirectoryExists, hasVersionTextFile
-
-
-
-
Field Detail
-
version
@Parameter(property="version.section", defaultValue="${project.version}", required=true) private java.lang.String versionThe maven project version.
-
versionTextKey
@Parameter(property="version.text.key", defaultValue="jetty-VERSION", required=true) private java.lang.String versionTextKeyThe version key to use in the VERSION.txt file.
-
versionTagKey
@Parameter(property="version.tag.key", defaultValue="jetty-VERSION", required=true) private java.lang.String versionTagKeyThe version key to use when looking up a git tag ref.
-
sortExisting
@Parameter(property="version.sort.existing", defaultValue="false") private boolean sortExistingAllow the existing issues to be sorted alphabetically.
-
refreshTags
@Parameter(property="version.refresh.tags", defaultValue="false") private boolean refreshTagsAllow the plugin to issue a 'git fetch --tags' to update the local tags from.
-
updateDate
@Parameter(property="version.update.date", defaultValue="false") private boolean updateDateAllow the plugin to update the release date for an issue (if none is provided)
-
copyGenerated
@Parameter(property="version.copy.generated", defaultValue="false") private boolean copyGeneratedAllow the plugin to replace the input VERSION.txt file
-
attachArtifact
@Parameter(property="version.attach", defaultValue="false") private boolean attachArtifactAllow the plugin to attach the generated VERSION.txt file to the project
-
versionTextOuputFile
@Parameter(property="version.text.output.file", defaultValue="${project.build.directory}/VERSION.txt") private java.io.File versionTextOuputFileThe generated VERSION.txt file.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
generateVersion
private void generateVersion(VersionText versionText) throws org.apache.maven.plugin.MojoFailureException, java.io.IOException
- Throws:
org.apache.maven.plugin.MojoFailureExceptionjava.io.IOException
-
-