Package org.codehaus.mojo.buildhelper
Class TimestampPropertyMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
-
- org.codehaus.mojo.buildhelper.TimestampPropertyMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="timestamp-property", defaultPhase=VALIDATE, threadSafe=true) public class TimestampPropertyMojo extends AbstractDefinePropertyMojoSets a property based on the current date and time.- Since:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringlocaleThe locale to use, for exampleen,US.private org.apache.maven.execution.MavenSessionmavenSessionThe Maven Session.private java.lang.StringnameThe property to set.private intoffsetAn offset to apply to the current time.private java.lang.StringpatternThe date/time pattern to be used.private java.lang.StringtimeSourceThe source of the time.private java.lang.StringtimeZoneThe timezone to use for displaying time.private java.lang.StringunitThe unit of the offset to be applied to the current time.-
Fields inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
project
-
-
Constructor Summary
Constructors Constructor Description TimestampPropertyMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()-
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
defineProperty, getProject
-
-
-
-
Field Detail
-
name
@Parameter(required=true) private java.lang.String name
The property to set.
-
pattern
@Parameter private java.lang.String pattern
The date/time pattern to be used. The values are as defined by the Java SimpleDateFormat class.
-
timeZone
@Parameter(defaultValue="GMT") private java.lang.String timeZone
The timezone to use for displaying time. The values are as defined by the Java {$link TimeZone} class.
-
offset
@Parameter(defaultValue="0") private int offset
An offset to apply to the current time.
-
unit
@Parameter(defaultValue="second") private java.lang.String unit
The unit of the offset to be applied to the current time. Valid Values are- millisecond
- second
- minute
- hour
- day
- week
- month
- year
-
timeSource
@Parameter(defaultValue="current") private java.lang.String timeSource
The source of the time. Valid Values are- current
- build
- Since:
- 3.2.0
-
locale
@Parameter private java.lang.String locale
The locale to use, for exampleen,US.
-
mavenSession
@Parameter(readonly=true, defaultValue="${session}") private org.apache.maven.execution.MavenSession mavenSessionThe Maven Session.- Since:
- 3.2.0
-
-