My property gwt.sdk
expands just fine everywhere else, but not inside a path/pathelement:
<target name="setup.gwtenv">
<property environment="env"/>
<condition property="gwt.sdk" value="${env.GWT_SDK}">
<isset property="env.GWT_SDK" />
</condition>
<property name="gwt.sdk" value="/usr/local/gwt" /> <!-- Default value. -->
</target>
<path id="project.class.path">
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
</path>
<target name="libs" depends="setup.gwtenv" description="Copy libs to WEB-INF/lib">
</target>
<target name="javac" depends="libs" description="Compile java source">
<javac srcdir="src" includes="**" encoding="utf-8"
destdir="war/WEB-INF/classes"
source="1.5" target="1.5" nowarn="true"
debug="true" debuglevel="lines,vars,source">
<classpath refid="project.class.path"/>
</javac>
</target>
For instance, placing an echo of ${gwt.sdk} just above works, but not inside "project.class.path". Is it a bug, or do I have to do something that I'm not?
Edit: I tried moving the property out from target setup.gwtenv into "global space", that helped circumvent the problem.
Since no-one else replied I take it the solution is to move
${gwt.sdk}
out ofsetup.gwtenv
and into "global space".