ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daisy Guo <Daisy....@everypath.com>
Subject Is there any way to extract a substring from a propety?
Date Wed, 17 Oct 2001 16:17:28 GMT
I have a central build file and several sub build files, like this:

build.xml 
\sub_system1\build.xml
\sub_system2\build.xml
\sub_system3\build.xml

in the sub build files, all targets are named in the pattern
"sub_systemX_name" (X will the number of the directory the build file is in)

In the central build.xml, there is a target determine which build file and
which target to call:
<target name="call-sub-buildfile" >
	<ant dir="${sub.dir}" target="${target.name}" />
</target>

Is there any way that I can abstract the ${sub.dir} from ${target.name}
(something like <property name="sub.dir"
value="substring(${target.name},0,${target.name}.lastIndexOf("_"))"> ), so
the users do not have to set two properties?


Mime
View raw message