Looks like you found a mistake in their documentation. The line: <entry key="anint" type="int" operation="+"/> must have a "default" attribute to be valid. Try: <entry key="anint" type="int" default="0" operation="+"/> Or you can just comment it out, since you're only looking for the datestamp part.
Sam Smoot
Ranch Hand
Joined: Apr 18, 2002
Posts: 237
posted
0
Ok.. took the line out... still nothing.. I do get this error:
Detected Java version: 1.3 in: c:\WebSphere\AppServer\java\jre Detected OS: Windows 2000 parsing buildfile c:\ant\Project1Build.xml with URI = file:c:/ant/Project1Build.xml Project base dir set to: C:\ant BUILD FAILED file:c:/ant/Project1Build.xml:28: Unexpected element "propertyfile" at org.apache.tools.ant.helper.ProjectHelperImpl.parse(ProjectHelperImpl.java:170) at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:117) at org.apache.tools.ant.Main.runBuild(Main.java:597) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235) Total time: 1 second
The XML file is:
(And I thought Tying shoes was tough.) [ February 12, 2003: Message edited by: Sam Smoot ]
Oh, I see. PropertyFile, unlike Property, is a task. It has to be part of a target to work.
Sam Smoot
Ranch Hand
Joined: Apr 18, 2002
Posts: 237
posted
0
I did that before and had the same problem... It works now... Thanks!
Hann-Yu Chang
Greenhorn
Joined: Feb 17, 2004
Posts: 9
posted
0
I am having the same problem. It appears as though the properties file is not being updated as the properties are being modified. Is there anyway to reload/refresh the file? Objective is to be able to write to the properties file and read from it right away.
Brian Heisler
Greenhorn
Joined: Apr 13, 2001
Posts: 4
posted
0
Try this... setstate is the name of the target... propertyfile is the name of the task inside the aforementioned target... ---start buildfile (build.xml) here---- <!-- ======================================================= --> <!-- create a properties file for the build machine --> <!-- ======================================================= --> <target name="setstate" description="create prop file with environment variables on the build machine - to be accessed right away!">