title: Mahout error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1
body: <p>I am a Mahout newbie. </p>
  
  <p>I was trying to implement the Recommender which is discussed in following post: <a href="https://code.google.com/p/unresyst/wiki/CreateMahoutRecommender" rel="nofollow">https://code.google.com/p/unresyst/wiki/CreateMahoutRecommender</a></p>
  
  <p>I was trying using NetBean IDE, and receive following error:</p>
  
  <pre><code>Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project mahoutrec: Command execution failed. Process exited with an error: 1 (Exit value: 1) -&gt; [Help 1]
  
  To see the full stack trace of the errors, re-run Maven with the -e switch.
  Re-run Maven using the -X switch to enable full debug logging. 
  </code></pre>
  
  <p>Following is the Java code:</p>
  
  <pre><code>package com.mahout;
  
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.util.List;
  import java.io.IOException;
  
  import org.apache.commons.cli2.OptionException; 
  import org.apache.mahout.cf.taste.common.TasteException;
  import org.apache.mahout.cf.taste.impl.model.file.FileDataModel;
  import org.apache.mahout.cf.taste.impl.recommender.CachingRecommender;
  import org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender;
  import org.apache.mahout.cf.taste.model.DataModel;
  import org.apache.mahout.cf.taste.recommender.RecommendedItem;
  import org.apache.mahout.cf.taste.impl.common.LongPrimitiveIterator;
  
  public class UnresystBoolRecommend {
  
  public static void main(String... args) throws FileNotFoundException, TasteException,     IOException, OptionException {
  
       //create data source (model) - from the csv file            
      File ratingsFile = new File("hdfs://------/user/hdfs/mahout/dummy-bool.csv");                        
      DataModel model = new FileDataModel(ratingsFile);
  
      // create a simple recommender on our data
      CachingRecommender cachingRecommender = new CachingRecommender(new SlopeOneRecommender(model));
  
      // for all users
      for (LongPrimitiveIterator it = model.getUserIDs(); it.hasNext();){
          long userId = it.nextLong();
  
          // get the recommendations for the user
          List&lt;RecommendedItem&gt; recommendations = cachingRecommender.recommend(userId, 10);
  
          // if empty write something
          if (recommendations.size() == 0){
              System.out.print("User ");
              System.out.print(userId);
              System.out.println(": no recommendations");
          }
  
          // print the list of recommendations for each 
          for (RecommendedItem recommendedItem : recommendations) {
              System.out.print("User ");
              System.out.print(userId);
              System.out.print(": ");
              System.out.println(recommendedItem);
          }
      }        
     }
  } 
  </code></pre>
  
  <p>Looking forward to reply, your help is highly appreciated.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I have changed Pom.xml, there was some version compatibility problem now works fine for me.   </p>
  
  <p>Here's the updated Pom.xml</p>
  
  <pre><code>&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;org.wikimedia&lt;/groupId&gt;
  &lt;artifactId&gt;mahoutrec&lt;/artifactId&gt;
  &lt;version&gt;0.2-CDH4&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;mahoutrec&lt;/name&gt;
  &lt;url&gt;http://github.com/whym/wikihadoop&lt;/url&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;cloudera-2&lt;/id&gt;
          &lt;name&gt;Cloudera Repository&lt;/name&gt;
          &lt;url&gt;https://repository.cloudera.com/artifactory/cloudera-repos&lt;/url&gt;
      &lt;/repository&gt;
     &lt;/repositories&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-common&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-cdh4.3.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-mapreduce&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-cdh4.3.0&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-client&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-cdh4.3.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.13&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.10&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
          &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
  
          &lt;dependency&gt;
    &lt;groupId&gt;org.apache.mahout&lt;/groupId&gt;
    &lt;artifactId&gt;mahout-core&lt;/artifactId&gt;
    &lt;version&gt;0.4&lt;/version&gt;
     &lt;/dependency&gt;
  
  
     &lt;/dependencies&gt;
     &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.8.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;linksource&gt;true&lt;/linksource&gt;
                  &lt;includeDependencySources&gt;true&lt;/includeDependencySources&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                                  &lt;mainClass&gt;org.wikimedia.wikihadoop.StreamWikiDumpInputFormat&lt;/mainClass&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.5&lt;/source&gt;
                  &lt;target&gt;1.5&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;${project.build.directory}/dependency&lt;/directory&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
    &lt;/build&gt;
    &lt;/project&gt;
  </code></pre>