如何在Intellij Idea中打开Ant项目(Nutch Source)? [英] How to Open an Ant project (Nutch Source) at Intellij Idea?

查看:1020
本文介绍了如何在Intellij Idea中打开Ant项目(Nutch Source)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打开Nutch 2.1源文件( http://www.eu。在Intellij IDEA上的apache.org/dist/nutch/2.1/ 。以下是如何在Eclipse中打开它的说明: http://wiki.apache.org/nutch/RunNutchInEclipse

I want to open Nutch 2.1 source file (http://www.eu.apache.org/dist/nutch/2.1/) at Intellij IDEA. Here is an explanation of how to open it at Eclipse: http://wiki.apache.org/nutch/RunNutchInEclipse

但是我不熟悉Ant(我使用Maven),当我打开源文件时,Intellij不知道很多类。
ie:

However I am not familiar with Ant (I use Maven) and when I open that source file many classes are not known by Intellij. i.e.:

org.apache.hadoop.mapreduce.JobContext
org.apache.gora.mapreduce.GoraMapper

如何将它们添加到库中或我该怎么做?

How can I add them to library or what should I do?

推荐答案

我终于弄明白了怎么做。现在我们的团队可以在IntellIJ开发了

I finally figure out how to do it. Now our team can dev nutch in IntellIJ

我们的流程


  1. 获取来自apache.org的nutch来源

wget http://www.eu.apache.org/dist/nutch/2.3/apache-nutch-2.3 -src.tar.gz


  1. 在intellij中导入nutch源

  1. Import nutch source in intellij

通过Ant获取依赖性


  • 运行 ant runtime

  • 运行 ant test

  • Run ant runtime
  • Run ant test

将依赖项导入Intellij

Import dependencies into Intellij


  • 文件>项目结构

  • 图书馆> Ivy

  • 点击加号按钮

  • 选择 apache中的所有库-nutch-2.3 / build / lib

  • File > Project Structures
  • Library > Ivy
  • Click to Plus button
  • Select all libraries in apache-nutch-2.3/build/lib

现在我们有一个带有nutch源和所有依赖项的项目

Now we have a project with nutch source and all dependencies

这篇关于如何在Intellij Idea中打开Ant项目(Nutch Source)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆