You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Christian Holmqvist, IT, Posten" <ch...@posten.se> on 2002/08/20 14:13:02 UTC

Multiple build files problem, property passing

Hi!

I'm trying to figure out how to create a "base" build.xml file.

This is my example 
--- build.xml -----
<?xml version="1.0"?>
<project name="test" default="init" basedir=".">
	<target name="init">
		<property name="prop" value="build.xml"/> 
		<ant antfile="hmm.xml" dir="${basedir}" target="init"/>
		<echo message="${new_prop}"/>
	</target>
</project>
----- 

----- hmm.xml ---
<?xml version="1.0"?>
<project name="hmm" default="init" basedir=".">
	<target name="init">
		<property name="prop" value="hmm.xml"/>
		<echo message="${prop}"/>
		<property name="new_prop" value="tjohoo"/>
	</target>
</project>
------

The thing is that the prop property echos correctyly but the new_prop does
not. Is there a way to "return" propertyes from a <ant> task?

Or is there a bether way to do this?

Cheers Christian

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>