该<gunzip>
任务的文档说它有一个即时版本。
在我的情况下,这会导致 NullPointerException:
>ant download
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Buildfile: ...\build.xml
download:
BUILD FAILED
...\build.xml:10: java.lang.NullPointerException
at org.apache.tools.ant.taskdefs.Unpack.createDestFile(Unpack.java:144)
at org.apache.tools.ant.taskdefs.Unpack.validate(Unpack.java:139)
at org.apache.tools.ant.taskdefs.Unpack.execute(Unpack.java:164)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:853)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Total time: 0 seconds
build.xml
如下:
<project name="MnistDigitsCorpus" basedir=".">
<description>
Скачивает файлы с хоста MNIST
</description>
<target name="download">
<tstamp/>
<gunzip dest=".">
<url url="http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz"/>
<!--<url url="http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz"/>
<url url="http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz"/>
<url url="http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz"/>-->
</gunzip>
...