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

kamaci picture kamaci · Mar 12, 2013 · Viewed 10.2k times · Source

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?

Answer

Vu Anh picture Vu Anh · Nov 9, 2015

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