ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniels, Troy \(US SSA\)" <>
Subject Bug in propertyset?
Date Thu, 16 Mar 2006 16:53:32 GMT

I'm seeing unusual behavior trying to use propertyset.  The build file
is below.  I have a -run target that calls <java> on a class specified
by a property, and several target that set the property and call the
-run target.  I define a propertyset to specify the properties that are
passed to the JVM.  If I attempt "ant -v exhibit-bug", it passes the
correct properties to the forked JVM.  However, if I uncomment the
propertyset lines in run-other (a target that isn't called when running
exhibit-bug), it appears to use the propertyset defined in run-other
rather than the one defined in exhibit-bug.

With the second property set commented out, I get this output:
Executing 'C:\Program Files\Java\jdk1.5.0_05\jre\bin\java.exe' with

With the second property set included (but never called), I get this
Executing 'C:\Program Files\Java\jdk1.5.0_05\jre\bin\java.exe' with

Note that bae.ibc.testclient.autologin (which matches the
propertyset/@prefix in exhibit-bug but not in run-other) is not set in
the second call.

Is there some reason it should be working this way?

$ ant -version
Apache Ant version 1.6.5 compiled on June 2 2005

--- START build.xml ----
<project name="IBC" default="default" basedir=".">
   <!-- Set personal properties in this file -->

   <target name="default" description="Default target.  May change;
check build file"
           depends="exhibit-bug" />

  <target name="exhibit-bug" description="Run the BP emulator">
	  <property name="bae.ibc.testclient.autologin"
					value="true" />
	  <property name="run.class"
value="bae.ibc.testclient.BPClientGUI" />
	  <propertyset id="" dynamic="true">
		  <propertyref prefix="bae.ibc" />
  	  <antcall target="-run" />

  <target name="run-other" description="Run the BP emulator">
	  <property name=""
	  <property name="run.class" value="some.other.Class" />
	  <!-- Uncomment these lines to make exhibit-bug fail -->
<!-- 	  <propertyset id="" dynamic="true"> -->
<!-- 	     <propertyref name="bpclientfactory" /> -->
<!-- 		  <propertyref prefix="bae.ibc.backplane" /> -->
<!-- 	  </propertyset> -->
  	  <antcall target="-run" />

   <target name="-run" description="Run the program without compiling
     <java fork="true"
					  failonerror="true" dir=".">
		 <syspropertyset dynamic="true">
		     <propertyset refid="" />
--- END build.xml ---

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message