ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Townsend" <>
Subject Setting properties depending on the os
Date Thu, 17 May 2001 22:32:58 GMT
I am trying to set some properties depending on what the os is. The main
reason is that the user.home property does not properly reflect the users
home directory (for files) on a windows machine. Instead you need the "My
Documents" subdirectory of this. I attempted to do this as follows:

<target name="basic">
	<antcall target="${}"/>

<target name="Linux">
	<property name="homedir" value="${}"/>

<target name="Windows">
	<property name="homedir" value="${}"/>

<target name="Windows 2000" depends="Windows">

<target name="Windows 98" depends="Windows">

<target name="Windows 95" depends="Windows">

Unfortunatley from what I can tell, the property homedir no longer exists
after the antcall task is complete. Is there any way to pass these back, or
another way of doing what I am trying to achieve? The only other thought I
had was to put ${} in as a dependency to the basic target, but it
seems that properties cant be used there.

Dave Townsend <>

"Vital papers will demonstrate their vitality by spontaneously moving from
where you left them to where you can't find them."

View raw message