tomwhite / hadoop-book

Example source code accompanying O'Reilly's "Hadoop: The Definitive Guide" by Tom White

Home Page:http://www.hadoopbook.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mvn eclipse:eclipse failed

lzeng opened this issue · comments

Dear Tom,

I have been learning and experimenting Hadoop through your great book. I tried to build with maven project, using command "mvn package -DskipTests -Dhadoop.version=1.0.4", it is SUCCESSFUL. However, when I tried to create Eclipse projects from Maven projects through Maven Eclipse plugin using the command
" mvn eclipse:eclipse -DskipTests -Dhadoop.version=1.0.4", I received a failure message, as below:

[ERROR] Failed to execute goal on project ch04: Could not resolve dependencies for project com.hadoopbook:ch04:jar:3.0: Failure to find com.hadoopbook:ch02:jar:3.0 in https://repository.apache.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of apache.releases has elapsed or updates are forced -> [Help 1]

It looks like the "ch02" project was not established so that it could be used by Ch04 project. I am wondering if some additional configuration I need to set up at Eclipse side? Could you please give me some advice on this?

thanks a lot
Licheng

Ok, I found a solution. Before we execute " mvn eclipse:eclipse" command, we will need to execute "mvn install" to place generated jar files to the local repository. When Maven Eclipse plugin runs, it can then resolve the dependency.

Is there a better solution?

regards
Licheng