ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Oltmans" <joltm...@bolosystems.com>
Subject RE: property files
Date Wed, 05 Sep 2007 22:15:28 GMT
The way you are trying to do it is not possible. What you probably would
want to do is either generate the project.properties file before using
it. For instance you could have a target that creates project.properties
before reading it... but most likely what you want to do is generate the
abilities property dynamically like so:

mysymbols.properties:
extra-abilities=DUMP_DOCDESC=off (etc...)

project.properties:
default-abilities=JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416,CLDC=1.1
,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWidth=352,Sc
reenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

Build.xml
...
<target name="-init">
  <property file="mysymbols.properties"/>
  <property name="abilities"
value="${extra-abilities},${default-abilities}"/>
...
</target>
...

-----Original Message-----
From: ear [mailto:erica.ramsey@gmail.com] 
Sent: Wednesday, September 05, 2007 12:15 PM
To: user@ant.apache.org
Subject: property files


Hello,
is it possible to execute a an ant-task inside of a property file? I'm
using
netbeans mobility, and I want to define some abilities in a separate
file
and someone source it into variables. There is a file called;
   C:\myprojects\projectXYZ\nbproject\project.properties
and inside of it there are a bunch of properties for the project. 

abilities=DUMP_DOCDESC=off,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416
,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWid
th=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0
build.classes.dir=${build.dir}/compiled
build.classes.excludes=**/*.java,**/*.form,**/*.class,**/.nbintdb,**/*.m
vd,**/*.wsclient
build.dir=build/${config.active}
build.root.dir=build

etc....

I want to someone replace;
  
abilities=DUMP_DOCDESC=off,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=416
,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,ScreenWid
th=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

with

abilities=<property
file="mysymbols.properties"/>,JSR179=1.0,WMA=2.0,JSR75=1.0,ScreenHeight=
416,CLDC=1.1,NOKIAUI=1.0,OBEX=1.0,MMAPI=1.0,JSR184=1.0,JSR172=1.0,Screen
Width=352,ScreenColorDepth=12,MIDP=2.0,ColorScreen,JSR82=1.0

is this possible?

-- 
View this message in context:
http://www.nabble.com/property-files-tf4387165.html#a12507917
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message