Search code examples
mavenmahout

Mahout in Action examples doesn't work


I'm new in Mahout and I have a week trying to run the book examples. The book recommends to use an IDE for this but Eclipse and Netbeans are having some troubles with the maven and slf4j installation thats why I tryed to use the ubuntu 13.04 terminal. Can anyone could help me with this?? I downloaded the source code from the 0.7 branch on the git repository and trying to make it work doing the following steps:

  • Install maven with the $sudo apt-get install maven (it installs the 3.0.4 version)
  • Extract the zip with the files and run the command $ mvn package (I think I have to modify the pom file but I'm not sure)
  • When finishes the package command, it shows me a build success message
  • Then I want to run one of the examples with the $ mvn exec:java -Dexec.mainClass="mia.recommender.ch02.IREvaluatorIntro" -Dexec.args="src" command but when i run it it shows me this:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.424s
[INFO] Finished at: Wed Jul 10 10:43:36 PDT 2013
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project mia: An exception occured while executing the Java class. null: InvocationTargetException: intro.csv -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Thanks in advance!


Solution

  • i think you have to build mahout jar files first! they created in a target folder in each of the mahout main folder such as math,examples and ... then after extract zip file run this command to build jar files

    sudo mvn -DskipTests install -e
    

    after that you can run your example :)