ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David F. White" <>
Subject <exec> Task and PATH Environment Variable on Windows
Date Thu, 22 Jul 2004 16:47:09 GMT

Does anyone know why Ant will not allow the PATH environment variable to be 
set for using the "exec" task on Windows?  Is this a Java security issue?

<exec executable="devenv" dir="${project.dir}" os="Windows 2000" 
	<env key="PATH" path="${path.dir}" />
	<env key="INCLUDE" path="${include.dir}" />
	<env key="LIB" path="${lib.dir}" />
	<env key="VSINSTALLDIR" path="${vsinstall.dir}" />
	<env key="VCINSTALLDIR" path="${MSVC_ROOT}" />
	<env key="VS71COMNTOOLS" path="${vs71comntools.dir}" />
	<env key="FrameworkDir" path="${framework.dir}" />
	<env key="FrameworkVersion" value="${FRAMEWORK_VERSION}" />
	<env key="FrameworkSDKDir" path="${frameworkSDK.dir}" />
	<env key="MSVCDir" path="${msvc.dir}" />					
	<arg line="myproject.sln /useenv /rebuild Debug" />

In the above example all of the environment variables are set except for 
PATH.  The only way I've found around this problem is to use "exec" to 
launch a batch file.  The batch file then sets the PATH variable and 
launches the command to build my project.



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

View raw message