Mahout error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1 -


i mahout newbie.

i trying implement recommender discussed in following post: https://code.google.com/p/unresyst/wiki/createmahoutrecommender

i trying using netbean ide, , receive following error:

failed execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project mahoutrec: command execution failed. process exited error: 1 (exit value: 1) -> [help 1]  see full stack trace of errors, re-run maven -e switch. re-run maven using -x switch enable full debug logging.  

following java 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) - csv file                 file ratingsfile = new file("hdfs://------/user/hdfs/mahout/dummy-bool.csv");                             datamodel model = new filedatamodel(ratingsfile);      // create simple recommender on our data     cachingrecommender cachingrecommender = new cachingrecommender(new slopeonerecommender(model));      // users     (longprimitiveiterator = model.getuserids(); it.hasnext();){         long userid = it.nextlong();          // recommendations user         list<recommendeditem> recommendations = cachingrecommender.recommend(userid, 10);          // if empty write         if (recommendations.size() == 0){             system.out.print("user ");             system.out.print(userid);             system.out.println(": no recommendations");         }          // print list of recommendations each          (recommendeditem recommendeditem : recommendations) {             system.out.print("user ");             system.out.print(userid);             system.out.print(": ");             system.out.println(recommendeditem);         }     }            } }  

looking forward reply, highly appreciated.

edit:

i have changed pom.xml, there version compatibility problem works fine me.

here's updated pom.xml

<modelversion>4.0.0</modelversion> <groupid>org.wikimedia</groupid> <artifactid>mahoutrec</artifactid> <version>0.2-cdh4</version> <packaging>jar</packaging> <name>mahoutrec</name> <url>http://github.com/whym/wikihadoop</url> <properties>     <project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties> <repositories>     <repository>         <id>cloudera-2</id>         <name>cloudera repository</name>         <url>https://repository.cloudera.com/artifactory/cloudera-repos</url>     </repository>    </repositories>   <dependencies>     <dependency>         <groupid>org.apache.hadoop</groupid>         <artifactid>hadoop-common</artifactid>         <version>2.0.0-cdh4.3.0</version>     </dependency>     <dependency>         <groupid>org.apache.hadoop</groupid>         <artifactid>hadoop-mapreduce</artifactid>         <version>2.0.0-cdh4.3.0</version>         <type>pom</type>     </dependency>     <dependency>         <groupid>org.apache.hadoop</groupid>         <artifactid>hadoop-client</artifactid>         <version>2.0.0-cdh4.3.0</version>     </dependency>     <dependency>         <groupid>log4j</groupid>         <artifactid>log4j</artifactid>         <version>1.2.13</version>     </dependency>     <dependency>         <groupid>junit</groupid>         <artifactid>junit</artifactid>         <version>4.10</version>         <scope>test</scope>     </dependency>     <dependency>         <groupid>commons-logging</groupid>         <artifactid>commons-logging</artifactid>         <version>1.1.1</version>     </dependency>          <dependency>   <groupid>org.apache.mahout</groupid>   <artifactid>mahout-core</artifactid>   <version>0.4</version>    </dependency>      </dependencies>    <build>     <plugins>         <plugin>             <artifactid>maven-javadoc-plugin</artifactid>             <version>2.8.1</version>             <configuration>                 <linksource>true</linksource>                 <includedependencysources>true</includedependencysources>             </configuration>         </plugin>         <plugin>             <artifactid>maven-jar-plugin</artifactid>             <version>2.4</version>             <configuration>                 <archive>                     <manifest>                                 <mainclass>org.wikimedia.wikihadoop.streamwikidumpinputformat</mainclass>                     </manifest>                 </archive>             </configuration>         </plugin>         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-compiler-plugin</artifactid>             <version>2.4</version>             <configuration>                 <source>1.5</source>                 <target>1.5</target>             </configuration>         </plugin>     </plugins>     <resources>         <resource>             <directory>${project.build.directory}/dependency</directory>         </resource>     </resources>   </build>   </project> 

did try doing:

rm -rf ~/.m2/ mvn clean install 

to clean maven repository, because dependencies know make troubles.

and highly recommend doing

mvn -dmaven.test.skip=true install 

or

mvn -dskiptests install 

because me mvn install tests on mahout never succeeded.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -