Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Open an Ant project (Nutch Source) at Intellij Idea?

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

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?

like image 835
kamaci Avatar asked Mar 12 '13 09:03

kamaci


1 Answers

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

The process we do

  1. Get nutch source from apache.org

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

  1. Import nutch source in intellij

  2. Get Dependencies by Ant

    • Run ant runtime
    • Run ant test
  3. Import dependencies into Intellij

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

Now we have a project with nutch source and all dependencies

like image 188
Vu Anh Avatar answered Sep 17 '22 13:09

Vu Anh