先说下本机系统: Ubuntu 12.04
1. 编译前,需要安装 maven
sudo apt-get install maven
sudo apt-get install maven2
2. 下载最新的Mahout源码, 链接如下:
http://newverhost.com/pub/mahout/0.6/mahout-distribution-0.6-src.tar.gz
3. 编译
sudo mvn -DskipTest
3.1 编译结果
...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Release Package
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] [assembly:single {execution: bin-assembly}]
[INFO] Assemblies have been skipped per configuration of the skipAssembly parameter.
[INFO] [assembly:single {execution: src-assembly}]
[INFO] Assemblies have been skipped per configuration of the skipAssembly parameter.
[INFO] [install:install {execution: default-install}]
[INFO] Installing /home/lucktroy/download/mahout-distribution-0.6/distribution/pom.xml to /root/.m2/repository/org/apache/mahout/mahout-distribution/0.6/mahout-distribution-0.6.pom
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Apache Mahout ......................................... SUCCESS [1.797s]
[INFO] Mahout Build Tools .................................... SUCCESS [1.168s]
[INFO] Mahout Math ........................................... SUCCESS [7.442s]
[INFO] Mahout Core ........................................... SUCCESS [53:58.847s]
[INFO] Mahout Integration .................................... SUCCESS [1:16.147s]
[INFO] Mahout Examples ....................................... SUCCESS [1:13.287s]
[INFO] Mahout Release Package ................................ SUCCESS [0.007s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56 minutes 39 seconds
[INFO] Finished at: Sat May 12 12:54:59 EDT 2012
[INFO] Final Memory: 102M/645M
[INFO] ------------------------------------------------------------------------
4. 编译 eclipse
sudo mvn eclipse:eclipse
4.1 编译结果
...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Release Package
[INFO] task-segment: [eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO] [eclipse:eclipse {execution: default-cli}]
[INFO] Not running eclipse plugin goal for pom project
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Apache Mahout ......................................... SUCCESS [14.802s]
[INFO] Mahout Build Tools .................................... SUCCESS [0.023s]
[INFO] Mahout Math ........................................... SUCCESS [0.210s]
[INFO] Mahout Core ........................................... SUCCESS [0.206s]
[INFO] Mahout Integration .................................... SUCCESS [1.922s]
[INFO] Mahout Examples ....................................... SUCCESS [0.117s]
[INFO] Mahout Release Package ................................ SUCCESS [0.006s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20 seconds
[INFO] Finished at: Sat May 12 15:19:51 EDT 2012
[INFO] Final Memory: 49M/341M
[INFO] ------------------------------------------------------------------------
ps.: 第一次编译的时候,发生了错误,后来发现是jdk不对,因为本机中有openjdk-7 和 openjdk-6 两个版本.