JAVA_build_ant_Tstamp
Description
Sets the DSTAMP
, TSTAMP
, and TODAY
properties in the current project. By default, the DSTAMP
property is in the format "yyyyMMdd", TSTAMP
is in the format "hhmm", and TODAY
is in the format "MMMM dd yyyy". Use the nested <format>
element to specify a different format.
These properties can be used in the build-file, for instance, to create time-stamped filenames, or used to replace placeholder tags inside documents to indicate, for example, the release date. The best place for this task is probably in an initialization target.
Parameters
Attribute | Description | Required |
prefix | Prefix used for all properties set. The default is no prefix. | No |
Nested Elements
The Tstamp task supports a <format>
nested element that allows a property to be set to the current date and time in a given format. The date/time patterns are as defined in the Java SimpleDateFormat class. The format element also allows offsets to be applied to the time to generate different time values.
Attribute | Description | Required |
property | The property to receive the date/time string in the given pattern. | Yes |
pattern | The date/time pattern to be used. The values are as defined by the Java SimpleDateFormat class. | Yes |
timezone | The timezone to use for displaying time. The values are as defined by the Java TimeZone class. | No |
offset | The numeric offset to the current time | No |
unit | The unit of the offset to be applied to the current time. Valid Values are
|
No |
locale | The locale used to create date/time string. The general form is "language, country, variant" but either variant or variant and country may be omitted. For more information please refer to documentation for the Locale class. | No |
Examples
<tstamp/>
sets the standard DSTAMP
, TSTAMP
, and TODAY
properties according to the default formats.
<tstamp>
<format property="TODAY_GB" pattern="d-MMMM-yyyy" locale="en,GB"/>
</tstamp>
sets the standard properties as well as the property TODAY_UK
with the date/time pattern "d-MMMM-yyyy" using English locale (eg. 21-May-2001).
<tstamp>
<format property="touch.time" pattern="MM/dd/yyyy hh:mm aa"
offset="-5" unit="hour"/>
</tstamp>
Creates a timestamp, in the property touch.time, 5 hours before the current time. The format in this example is suitable for use with the <touch>
task. The standard properties are set also.
<tstamp prefix="start"/>
Sets three properties with the standard formats, prefixed with "start.": start.DSTAMP
, start.TSTAMP
, and start.TODAY
.
JAVA_build_ant_Tstamp的更多相关文章
随机推荐
- Altium Designer同一个工程里不同原理图导入到不同的PCB
问题: 在用Altium Designer进行PCB工程设计时,有时一个工程里可能不止一块PCB,比如,一个设备里有主板和扩展板或者按键板等等,这时就需要在一个工程里添加多个PCB文件.如图: 我们知 ...
- oschina大数据开源软件
Hadoop 图形化用户界面 Hue 大数据可视化工具 Nanocubes 企业大数据平台 RedHadoop 大数据查询引擎 PrestoDB Hadoop集群监控工具 HTools 安全大数据分析 ...
- Windows服务器Pyton辅助运维--01.自动Copy文件(文件夹)到远程服务器所在目录
Windows服务器Pyton辅助运维 01.自动Copy文件(文件夹)到远程服务器所在目录 开发环境: u Web服务器: Windows Server 2008 R2 SP1 IIS 7.5 u ...
- Android中的测试类配置AndroidManifest.xml
测试类至于要把一个类继承ActivityTestCase即可至于方法,根据需要自己建立方法:之后必须配置AnroidMainfest.xml文件 配置AndroidManifest.xml文件 1) ...
- 为什么使用Redis
原文地址:http://igoder.iteye.com/blog/1969848 先解释一下软件编程中常见的一些概念: 抽象先于具象.这个抽象并非虚无的抽象,而是指事物尚未分化为具象之前的那个前体存 ...
- [LeetCode] 230. Kth Smallest Element in a BST 解题思路
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Not ...
- UML[1] UML类图关系(泛化 、继承、实现、依赖、关联、聚合、组合)(转)
转自:http://blog.csdn.net/zhaoxu0312/article/details/7212152 继承.实现.依赖.关联.聚合.组合的联系与区别 分别介绍这几种关系: 继承 指的是 ...
- 从epoll构建muduo-11 单线程Reactor网络模型成型
mini-muduo版本传送门 version 0.00 从epoll构建muduo-1 mini-muduo介绍 version 0.01 从epoll构建muduo-2 最简单的epoll ver ...
- Web服务的体系架构
Web简介: Web是WWW(World Wide Web)的简称,又称为万维网,是建立在客户机/服务器上的,以HTML语言和HTML协议为基础,提供面向Internet服务的,有一致用户界面的一种信 ...
- rac 10g 加入节点具体解释
目标: 当前我环境中是有两个节点RAC1和RAC2 节点.如今添加一个RAC3节点. 概要:为现有的Oracle10g RAC 加入节点大致包含下面步骤: 1. 配置新的server节点上的硬件及 ...