You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pritesh saharey <pr...@sqatester.com> on 2003/03/07 11:41:30 UTC
How to write properties.xml file
Hi everyone,
how can i write properties.xml file for following java tasks
<java append="true" fork="true" failonerror="true" classpathref="classpath"
classname="com.ora.ITS.SDK.Tools.ConsoleParcelBuilder">
<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.parceldef -o SRC/org/net/carmel/services/ptts/PTTService.parcel"/>
</java>
<java append="true" fork="true" failonerror="true" classpathref="classpath"
classname="com.ora.ITS.SDK.Tools.ConsoleDistribBuilder">
<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.distribdef -o SRC/org/net/carmel/services/ptts/PTTService.distrib"/>
</java>
In this code i have to use
"com.ora.ITS.SDK.Tools.ConsoleParcelBuilder" and "com.ora.ITS.SDK.Tools.ConsoleDistribBuilder" for each and every project so iwant to keep it seprately in properties.xml from where i can use these commands for my all projects .And how can i give ars inmy build.xml file for these commands .
thanx for your support
pritesh
_____________________________________________________________
Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm
_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
Re: How to write properties.xml file
Posted by Jesse Stockall <je...@cryptocard.com>.
On Friday, March 7, 2003, at 05:41 AM, Pritesh saharey wrote:
> In this code i have to use
> "com.ora.ITS.SDK.Tools.ConsoleParcelBuilder" and
> "com.ora.ITS.SDK.Tools.ConsoleDistribBuilder" for each and every
> project so iwant to keep it seprately in properties.xml from where i
> can use these commands for my all projects .And how can i give ars
> inmy build.xml file for these commands .
> thanx for your support
> pritesh
If you want to define the class names as properties you can use a
standard properties file.
build.properties
parcel.builder=com.ora.ITS.SDK.Tools.ConsoleParcelBuilder
distrib.builder=com.ora.ITS.SDK.Tools.ConsoleDistribBuilder
And in your build files
<property file="build.properties"/>
<java append="true" fork="true" failonerror="true"
classpathref="classpath"
classname="${distrib.builder}">
<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.distribdef -o
SRC/org/net/carmel/services/ptts/PTTService.distrib"/>
</java>
If you want to re-use the exact same target in multiple build files you
can use xml-includes
In common targets.xml
<java append="true" fork="true" failonerror="true"
classpathref="classpath"
classname="com.ora.ITS.SDK.Tools.ConsoleParcelBuilder">
<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.parceldef -o
SRC/org/net/carmel/services/ptts/PTTService.parcel"/>
</java>
<java append="true" fork="true" failonerror="true"
classpathref="classpath"
classname="com.ora.ITS.SDK.Tools.ConsoleDistribBuilder">
<arg line="-f SRC/org/net/carmel/services/ptts/PTTService.distribdef
-o SRC/org/net/carmel/services/ptts/PTTService.distrib"/>
</java>
In your build files
(before the <project> tag)
<!-- Define a reference to the common targets -->
<!DOCTYPE project [
<!ENTITY build-include SYSTEM "common.targets.xml">
]>
(inside the <projet> tags)
<!-- Include the common targets -->
&build-include;
Hope this helps.
Jesse Stockall - jesse@cryptocard.com
CRYPTOCard Corp.