【发布时间】:2011-06-04 03:46:15
【问题描述】:
我正在尝试在 maven 中构建 solr 4.0 快照。这是我的步骤:
- 查看 d:\workspace\solr 中的 solr
- 下载ant,解压到d:\ant。将 ANT_HOME 设置为 d:\ant
- 下载maven-ant-tasks-2.1.3.jar(最新版)到d:\ant\lib
- 在命令行中,转到 d:\workspace\solr\lucene
- 运行命令: ant generate-maven-artifacts
它给出了错误:
D:\workspace\solr\lucene\common-build.xml:326: #
##########################################################################
Maven ant tasks not found.
Please download the Maven ant tasks JAR (maven-ant-tasks-2.1.1.jar)
from http://maven.apache.org/ant-tasks/download.html and add it to your
$HOME/.ant/lib/ directory, or to your $ANT_HOME/lib/ directory, or
to your $CLASSPATH, or add "-lib /path/to/maven-ant-tasks-2.1.1.jar"
to the ant command.
##########################################################################
Total time: 0 seconds
我试过跑步:
ant -lib d:\ant\lib generate-maven-artifacts
同样的错误。
单独运行 ant 将毫无问题地构建 solr。
环境设置:
D:\workspace\solr\lucene>ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
D:\workspace\solr\lucene>mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
Java version: 1.6.0_24
Java home: C:\Program Files (x86)\Java\jdk1.6.0_24\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
有人可以帮忙吗?谢谢。
【问题讨论】: