风动还是旗动?仁者心动。
文字只不过是指月的手指,而不是月亮本身,能透过指月的手指看到月亮本身才是文字的目的所在。
ant学习-The Prefix Attribute
上一篇 /
下一篇 2007-01-31 10:24:56
/ 个人分类:ant学习
51Testing软件测试网__#Fm7N4NWOThe Prefix Attribute
3Mh`mr:P0The Problem: I have to access some properties (from a file), which are already defined in my build file. To be able to access the properties I can use the prefix attribute of the property task.
6q/T]QN9?%c8u0
.I}3M/ba3]s gC0framework.properties :51Testing软件测试网.p/Y/J+s}S
|C
\9{m3l$I*oDg]k0#Release information about the framework
-Zx6Xi/Is/n0#Thu Oct 14 16:25:12 CEST 2004
3jb Y4Yc0build.number=11551Testing软件测试网 t@3~j a/_
release.version=0.4
R8\{
b0G7u2yzS0release.name=framework51Testing软件测试网/A{/Y z9s&o:e$?
51Testing软件测试网 O|,Q;d
sP51Testing软件测试网 FDS@6G Ek
Ant Example Target :51Testing软件测试网,FcunY$C@ iF
51Testing软件测试网8H$hvY/^?/E<target name="read.properties">
Z-b([.Ab6P0 <!-- Read the properties from the release of the framework -->51Testing软件测试网G#}9DI_"I
<property file="framework.properties" prefix="framework"/>
'b&[!eX/u2X8Za0 <echo message="${framework.build.number}"/>
niN.c0N/K uU1o
VP1^0 <echo message="${framework.release.version}"/>
7x
GjW umrI0 <echo message="${framework.release.name}"/>
)`
j9QW Y0</target> 51Testing软件测试网k"]Z^aK0c7c
I!O
B5TrMXeM0
2we?'Xn'j3@y0Output:
+?l*aVL
V_
d0
(c}ESf[9t-D0Buildfile: C:\build.xml51Testing软件测试网^3HT]E4@!c*`
read.properties:51Testing软件测试网'^p5Z(g,\U&s
[echo] 11551Testing软件测试网ikq-Caz%Y,mgX
[echo] 0.4
)KI)SF3Q0 [echo] framework
.K`-Yt*d,u(R]N0BUILD SUCCESSFUL51Testing软件测试网Oi8[KmPB
Total time: 3 seconds
Y$\
K2F8TC0
:a qK@.~u M[0
收藏
举报
TAG:
ant学习