https://issues.apache.org/bugzilla/show_bug.cgi?id=47135
Summary: Problem with quotes in environment variable used in
path-like structure.
Product: Ant
Version: 1.7.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: dennis_brake@excite.com
When using an environment variable to specify a directory that requires quotes,
the path is processed wrong. For example, using the following build.xml file:
<project name="test" basedir="." >
<property environment="env"/>
<property name="axis2.home" value="${env.AXIS2_HOME}" />
<path id="project.class.path">
<fileset dir="${axis2.home}/lib">
<include name="axis2-kernel-1.4.1.jar" />
</fileset>
</path>
<target name="showClasspath">
<echo message="Axis2: ${axis2.home}/lib" />
<property name="classpath.string" refid="project.class.path" />
<echo message="${classpath.string}" />
</target>
</project>
if we get an error using:
C:\test\ESII\Spiral-2>set AXIS2_HOME="\javaapps\axis2-1.4.1"
C:\test\ESII\Spiral-2>ant showClasspath
Buildfile: build.xml
showClasspath:
[echo] Axis2: "\javaapps\axis2-1.4.1"/lib
BUILD FAILED
C:\test\ESII\Spiral-2\build.xml:14:
C:\test\ESII\Spiral-2\"\javaapps\axis2-1.4.1
"\lib not found.
Total time: 0 seconds
However, the following works:
C:\test\ESII\Spiral-2>set AXIS2_HOME=\javaapps\axis2-1.4.1
C:\test\ESII\Spiral-2>ant showClasspath
Buildfile: build.xml
showClasspath:
[echo] Axis2: \javaapps\axis2-1.4.1/lib
[echo] C:\javaapps\axis2-1.4.1\lib\axis2-kernel-1.4.1.jar
BUILD SUCCESSFUL
Total time: 0 seconds
Now the above didn't require quotes but if the path name had embedded spaces
they would be required.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
|