在 Windows 7 上的 solr 中创建 Maven 工件时遇到问题
我正在尝试在 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
- 运行命令: antgenerate-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"
有人可以帮忙吗?谢谢。
I'm trying to build solr 4.0 snapshot in maven. Here are my steps:
- Check out solr in d:\workspace\solr
- download ant, unzip to d:\ant. set the ANT_HOME to d:\ant
- download maven-ant-tasks-2.1.3.jar (the latest version) to d:\ant\lib
- in commandline, go to d:\workspace\solr\lucene
- run command:
ant generate-maven-artifacts
it gives the error:
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
I tried running:
ant -lib d:\ant\lib generate-maven-artifacts
it's the same error.
running ant alone will build solr without problem.
Environment setting:
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"
Can any one help? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你需要像这样运行 ant:
类路径添加需要的文件引用(而不是目录引用)。您还可以像这样添加它:
I think you need to run ant like this:
Classpath adds need file references (not directory references). You can also add it like so: