Last update (sorry I am making a lot of noise) : the test passes under
JDK 1.6 in fact.
In my previous attempt with JDK 1.6 I was using another version of ant.
So the test failure with JDK 1.5 would be due to a bug in the JRE.
Next step is to change the antunit test to skip this part when running
under JDK 1.5.
Antoine
On 12/8/10 7:40 PM, Antoine Levy-Lambert wrote:
getting this output in verbose mode
setUp:
[mkdir] Skipping
C:\Users\alambert\AppData\Local\Temp\testinput\org\example
because it already exists.
[mkdir] Skipping C:\dev\asf\ant-core\build\ant-unit\taskdef
because it alrea
dy exists.
testDirWithPling:
[mkdir] Skipping C:\dev\asf\ant-core\build\ant-unit\taskdef\pl!ng
because it
already exists.
[jar] Building jar:
C:\dev\asf\ant-core\build\ant-unit\taskdef\pl!ng\test1
42269046.jar
[jar] adding directory META-INF/
[jar] adding entry META-INF/MANIFEST.MF
[jar] adding directory org/
[jar] adding directory org/example/
[jar] adding entry org/example/antlib.xml
[jar] No Implementation-Title set.No Implementation-Version
set.No Implementation-Vendor set.
[jar] Location:
C:\dev\asf\ant-core\src\tests\antunit\taskdefs\taskdef-tes
t.xml:52:
[echo] Apache Ant(TM) version 1.8.2alpha compiled on December 8 2010
BUILD FAILED
C:\dev\asf\ant-core\src\tests\antunit\taskdefs\taskdef-test.xml:58:
The followin
g error occurred while executing this line:
Unable to find
jar:file:/C:/dev/asf/ant-core/build/ant-unit/taskdef/pl!ng/test14
2269046.jar!/org/example/antlib.xml
at
org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:68)
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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a: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.Target.performTasks(Target.java:411)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.FileNotFoundException:
C:\dev\asf\ant-core\build\ant-unit\tas
kdef\pl (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.jar.JarFile.<init>(JarFile.java:132)
at java.util.jar.JarFile.<init>(JarFile.java:70)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:56)
at
sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:41)
at
sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:63)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.ja
va:102)
at
org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:66)
... 19 more
Total time: 0 seconds
C:\dev\asf\ant-core>
On 12/8/2010 7:18 PM, Antoine Levy-Lambert wrote:
In fact this is not a fluke as far as I can tell.
Under JDK 1.6 on Windows, the output is different :
[antunit] Target: testDirWithPling caused an ERROR
[antunit] at line 57, column 36
[antunit] Message: The following error occurred while executing
this line:
[antunit] java.io.FileNotFoundException:
C:\dev\asf\ant-core\build\ant-unit\taskdef\pl (The system cannot find
the file specified)
Regards,
Antoine
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org