我正在尝试通过Ant构建Nutch项目。我去Nutch目录,看起来像这样:
然后我在这里打开终端并运行命令:
mahdi@mahdi-SVT13136CXS:/opt/apache-nutch-1.5-source$ sudo ant
[sudo] password for mahdi:
Buildfile: /opt/apache-nutch-1.5-source/build.xml
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
ivy-probe-antlib:
ivy-download:
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
-ivy-download-unchecked:
ivy-init-antlib:
ivy-init:
init:
BUILD FAILED
/opt/apache-nutch-1.5-source/build.xml:71: Unparseable date: "01/25/1971 2:00 pm"
Total time: 0 seconds
这也是:
mahdi@mahdi-SVT13136CXS:/opt/apache-nutch-1.5-source$ sudo ant runtime
Buildfile: /opt/apache-nutch-1.5-source/build.xml
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
ivy-probe-antlib:
ivy-download:
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
-ivy-download-unchecked:
ivy-init-antlib:
ivy-init:
init:
BUILD FAILED
/opt/apache-nutch-1.5-source/build.xml:71: Unparseable date: "01/25/1971 2:00 pm"
Total time: 0 seconds
这一个:
mahdi@mahdi-SVT13136CXS:/opt/apache-nutch-1.5-source$ sudo ant clean deploy
Buildfile: /opt/apache-nutch-1.5-source/build.xml
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
clean-build:
[delete] Deleting directory /opt/apache-nutch-1.5-source/build
clean-lib:
clean-dist:
clean-runtime:
clean:
ivy-probe-antlib:
ivy-download:
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
-ivy-download-unchecked:
ivy-init-antlib:
ivy-init:
init:
[mkdir] Created dir: /opt/apache-nutch-1.5-source/build
[mkdir] Created dir: /opt/apache-nutch-1.5-source/build/classes
[mkdir] Created dir: /opt/apache-nutch-1.5-source/build/release
[mkdir] Created dir: /opt/apache-nutch-1.5-source/build/test
[mkdir] Created dir: /opt/apache-nutch-1.5-source/build/test/classes
BUILD FAILED
/opt/apache-nutch-1.5-source/build.xml:71: Unparseable date: "01/25/1971 2:00 pm"
Total time: 0 seconds
但正如你所看到的那样,每个人都会说出错误。我用netbeans创建了一个新的java项目,并尝试通过运行" ant"来构建它。一切都很顺利。
作为附加信息:
mahdi@mahdi-SVT13136CXS:/opt/apache-nutch-1.5-source$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
和
mahdi@mahdi-SVT13136CXS:/opt/apache-nutch-1.5-source$ ant -version
Apache Ant(TM) version 1.9.6 compiled on July 8 2015