need help Mahout in Action chapter 2 examples - mahout

i need your help
i want setup recommender system with mahout
i install java & eclipse & maven on centos 6 then itegerated eclipse with maven
mvn -version
Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 06:45:32+0430)
Maven home: /usr/local/maven
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_21/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-71.el6.i686", arch: "i386", family: "unix"
then i install mahout according to your instruction and total step done successfully
but when check command:
mvn exec:java -Dexec.mainClass="mia.recommender.ch02.IREvaluatorIntro" -Dexec.args="src"
[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
i am beginner please help me to resolve error
i need your help
Thank you

I would start by checking that the file intro.csv is available and usable.

Related

Allure report in Jenkins does not load and it shows the loading on browser

I have used allure report in my framework for reporting.
After completion of test scripts on Jenkins and clicking allure report icon, it does not load the reports it show loading.
Allure Jenkins Plugin version = 2.10
Following is the Jenkins console output:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project com.fa.ipsy: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/Edu/jenkins/workspace/Appium_android/target for the individual test results.
[ERROR] -> [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/MojoFailureException
Build step 'Execute shell' marked build as failure
[Appium_ipsy_mobile] $ /Users/Edu/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/1.4.23.HOTFIX1/bin/allure generate "/Users/Edu/jenkins/workspace/Appium_android/target/allure-results" "/Users/Edu/jenkins/workspace/Appium_android/allure4208353174449196512.tmp/environment" -o "/Users/Edu/jenkins/workspace/Appium_android/allure4208353174449196512.tmp/allure-report"
Report successfully generated to the directory </Users/Edu/jenkins/workspace/Appium_android/allure4208353174449196512.tmp/allure-report>. Use `allure report open` command to show the report.
Finished: FAILURE
Thank you for the Help
The Issue is resolved now, we are able see the Allure HTML reports.
We have updated our Allure Jenkins plugin Version (2.10) to 2.26.0.
Thanks

Error while displaying javadocs in Jenkins

I am trying Jenkins with the help of the book - "Jenkins - The Definitive Guide"
I am getting error while displaying javadocs:
[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.5.2 or
one of its dependencies could not be resolved: Cannot access central
(https://repo.maven.apache.org/maven2) in offline mode and the
artifact org.apache.maven.plugins:maven-install-plugin:jar:2.5.2 has
not been downloaded from it before. -> [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/PluginResolutionException Build step 'Invoke top-level Maven targets' marked build as failure
Both Java and Maven are installed on the machine where Jenkins is running.
I have the following info from the command line
$ mvn -version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.10.0-32-generic", arch: "amd64", family: "unix"
Any hint to get around this issue?
--------------------- EDIT ---------------------------
After the last comment I made the changes as suggested and now I got the following errors:
[ERROR] Failed to execute goal on project gameoflife-web: Could not resolve dependencies for project com.wakaleo.gameoflife:gameoflife-
web:war:1.0-SNAPSHOT: Could not find artifact
com.wakaleo.gameoflife:gameoflife-core:jar:1.0-SNAPSHOT -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :gameoflife-web
Build step 'Invoke top-level Maven targets' marked build as failure
Recording test results
Publishing Javadoc
Finished: FAILURE

Usergrid Build Error

while I'm trying to build Usergrid, I'm coming across the following error.
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.752 s
[INFO] Finished at: 2015-12-16T01:02:23+03:30
[INFO] Final Memory: 20M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project usergrid-rest: Could not resolve depen
dencies for project org.apache.usergrid:usergrid-rest:war:2.1.1-SNAPSHOT: Failur
e to find org.apache.usergrid:usergrid-java-client:jar:0.0.10-SNAPSHOT in file:/
/C:\usergrid-master\stack\rest/../m2/repository was cached in the local reposito
ry, resolution will not be reattempted until the update interval of local-depend
encies has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
C:\usergrid-master\stack>mvn clean install -rf :usergrid-rest
Any solution ?!?
You need to build sdks/java first in order to build the stack.
cd C:\usergrid\sdks\java
mvn install
cd ..\..\stack
mvn install -DskipTests=true

Why mvn archetype does not work for me?

I'm new on Maven and there's something wrong when I try to create a now project.
E:\java\MavenTest>mvn archetype:generate -DgroupId=com.mycompany.app -DartifacId
=my_app -DarchetypeArtifacId = maven_archetype_quickstart -DinteractiveMode=fals
e
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.108s
[INFO] Finished at: Wed May 15 23:55:57 CST 2013
[INFO] Final Memory: 7M/76M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (E:\java\MavenTest). Please verify you invoked Maven from the
correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProject
Exception
The pom.xml should be generated automatically. But it does not work.
Any help will be highly appreciated.
The root cause are as the following: -
There is a space at -DarchetypeArtifacId = maven_archetype_quickstart
The archetypeArtifacId should be maven-archetype-quickstart
The -DarchetypeArtifacId is miss spelling, the correct is -DarchetypeArtifactId
Then please try the following: -
mvn archetype:generate
-DgroupId=com.mycompany.app
-DartifactId=my_app
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifacId=maven-archetype-quickstart
-DarchetypeVersion=1.1
-DinteractiveMode=false
Please type above command in the single line.
I hope this may help.
Another answer will be related to the console that you are using to generate the maven project with the archetype:
For example:
With Powershell, the command of the answer doesn't work but with this command is working properly
mvn archetype:generate
"-DgroupId=com.mycompany.app
-DartifactId=my_app
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifacId=maven-archetype-quickstart
-DarchetypeVersion=1.1
-DinteractiveMode=false"
because of the problems passing the arguments to the maven command.
This is gonna help somebody, it works for me!

Not created by default settings.xml in $/user/.m2/repository path using Maven

I tried below command its work properly
C:\Documents and Settings\users>mvn -v
Apache Maven 3.0 (r1004208; 2010-10-04 17:20:56+0530)
Java version: 1.6.0_21
Java home: C:\Program Files\Java\jdk1.6.0_21\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
and once I tried to compile simple HelloWorld.java program. Its give me below error...
C:\my-app>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-resour
ces-plugin/2.4.3/maven-resources-plugin-2.4.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.454s
[INFO] Finished at: Thu Nov 18 13:08:50 IST 2010
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of i
ts dependencies could not be resolved: Could not transfer artifact org.apache.ma
ven.plugins:maven-resources-plugin:jar:2.4.3 from central (http://repo1.maven.or
g/maven2): Error transferring file: Connection refused: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
Please any one update me with proper solutions.
First, you really should format your questions better. Just cutting and pasting without any regard what it would look like when submitted doesn't help you in getting a quick and concise answer.
Second, what exactly is your question? You subject says one thing, but your text says another.
Now I'll take a stab at both your subject and your text.
As far as the subject is concerned, the settings.xml file is not automatically created by Maven. You have to create this and configure it the way you want. See this website for more info about the settings.xml.
As far as the text is concerned, looks like you do not have access to the Maven repo. This can because by a number things. The most obvious ones are:
The repository is not specified in the project's pom.xml file as described here.
The server you are running this on does not have access to http://repo1.maven.org/maven2/ due to firewall or internet connectivity reasons.
Double check that:
this was not an intermittent problem
you didn't get bad metadata (and clean up the entire ~/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/)

Resources