开发者

Execute Ant in "Validation" mode

Is it possible to execute Apache Ant build tool in a validation ode?

e.g to process a build.xml file and expand all the ${} variables etc but not actually build the target java projects?

i just need the completed xml build file with all the substitutions completed so that i can see the exact locations of source and jar files etc.

so that ent开发者_C百科ries like "value="${aaa.bbb.cc}/Impl.jar"/>"

are expanded to "value="AnApplication/lib/Impl.jar"/>"


use a checktarget that does some echoing instead of the real stuff, f.e.

<target name="checkproperties" depends="init,etc.../>
 <echoproperties prefix="aaa"/>
 <echo>
  ${aaa.bbb.cc}/Impl.jar
  ${dist.dir}
  ${src.dir}
  ${build.dir}
  ${whatever}
  ...
 </echo>
</target>

and then call your buildscript with ant -f yourbuildfile checkproperties
to call your checktarget instead of running your buildfile with it's real target
just make sure your checkproperties target has the same dependency graph as your real working target,
to get the same propertyvalues your real target would get

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜