https://issues.apache.org/bugzilla/show_bug.cgi?id=50007

           Summary: Taskdef classpath breaks with directory containing an
                    exclamation mark (!)
           Product: Ant
           Version: 1.8.1
          Platform: PC
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=26078)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26078)
test build

We discovered an issue when a project directory containing a "!" was used with
Ant upgraded to version 1.8.1.

My initial hunch is that Ant is converting this file path to a URI and then the
! is being misinterpreted as a separator for the jar URL scheme, even though
"jar:" was nowhere to be seen.  As the variable in question comes from one of
Ant's own tasks, one would expect it to work when used as part of the parameter
for another task, and indeed, the issue does not occur on version 1.7.0.

I zipped up a minimal build directory which reproduces the issue, at least on
Windows.


G:\!test>ant
Buildfile: G:\!test\build.xml

BUILD FAILED
G:\!test\build.xml:3: The following error occurred while executing this line:
java.io.FileNotFoundException: G:\ (The filename, directory name, or volume
label syntax is incorrect)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
        at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:182)
        at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:148)
        at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:274)
        at
org.apache.tools.ant.helper.ProjectHelper2.parseUnknownElement(ProjectHelper2.java:130)
        at
org.apache.tools.ant.helper.ProjectHelper2.parseAntlibDescriptor(ProjectHelper2.java:110)
        at org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:91)
        at org.apache.tools.ant.taskdefs.Definer.loadAntlib(Definer.java:440)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:292)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:179)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
        at org.apache.tools.ant.Main.runBuild(Main.java:786)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to