我想在 Intellij IDEA 中打开 Nutch 2.1 源文件 ( http://www.eu.apache.org/dist/nutch/2.1/ )。以下是如何在 Eclipse 中打开它的说明:http://wiki.apache.org/nutch/RunNutchInEclipse
但是我不熟悉 Ant(我使用 Maven),当我打开该源文件时,Intellij 不知道许多类。 即:
org.apache.hadoop.mapreduce.JobContext
org.apache.gora.mapreduce.GoraMapper
如何将它们添加到库中或者我应该做什么?
最佳答案
我终于知道怎么做了。现在我们的团队可以在 IntelliJ 中进行开发
我们的流程
- 从 apache.org 获取 nutch 源代码
wget <a href="http://www.eu.apache.org/dist/nutch/2.3/apache-nutch-2.3-src.tar.gz" rel="noreferrer noopener nofollow">http://www.eu.apache.org/dist/nutch/2.3/apache-nutch-2.3-src.tar.gz</a>
在intellij中导入nutch源码
通过 Ant 获取依赖项
- 运行
ant runtime
- 运行
ant test
- 运行
将依赖项导入 Intellij
- 文件 > 项目结构
- 图书馆 > Ivy
- 点击“加号”按钮
- 选择
apache-nutch-2.3/build/lib
中的所有库
现在我们有一个包含 nutch 源代码和所有依赖项的项目
关于ant - 如何在 Intellij Idea 上打开 Ant 项目(Nutch Source)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15357462/