DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24196>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24196

When the drive letter of a mapped network drive is not explicitly specified in 
a path element, the location of the path element is indeterminate to the java 
task (and perhaps to other tasks, too).

           Summary: When the drive letter of a mapped network drive is not
                    explicitly specified in a path element, the location of
                    the path element is indeterminate to the java task (and
                    perhaps to other tasks, too).
           Product: Ant
           Version: 1.5.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When running the following build.xml from a folder on a mapped drive (e.g. 
H:/projects/test/build.xml):

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="test" name="test">

<path id="test.path">
  <pathelement location="${basedir}/jars/ant.jar"/>
</path>

<target name="test">
  <echo message="Path does not work across a mapped network drive???" />
  <java classname="org.apache.tools.ant.Main" fork="true">
    <classpath refid="test.path"/>
    <arg value="-help" />
  </java>
</target>

</project>


The following error message is output:

test:
     [echo] Path does not work across a mapped network drive???
     [java] java.lang.NoClassDefFoundError: org.apache.tools.ant.Main
     [java] Exception in thread "main"
     [java] Java Result: 1
BUILD FAILED

The basedir variable of the project is set to the current folder ("."), and the 
path element is built relatively from the basedir variable.  The current folder 
exists on a mapped network drive, but the mapped network drive letter is not 
specified in the relative path.  In this scenario, it appears that the location 
of the path element is indeterminate to the "java" task (and perhaps to other 
Ant tasks as well).  I think that the task should derive the drive letter 
programatically when relative file paths are used and the drive letter is not 
specified in the relative path.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to