Build Sling Failure: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) - eclipse

im trying to build sling cause I need it for a project at the university. Can anyone tell me, how I can solve this error?
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.112s
[INFO] Finished at: Sun Mar 25 18:51:41 CEST 2012
[INFO] Final Memory: 68M/165M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project sling-servlet-archetype: Execution default-integration-test of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test failed: ${maven.home} is not specified as a directory: '/home/odin/Desktop/workspace/sling-builder/EMBEDDED'. -> [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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :sling-servlet-archetype
enter code here

I had the same issue with a project of my own - it seems to be an m2eclipse-issue, as it goes away when I use an external maven instead of the embedded one m2eclipse uses by default.

its m2e-embedded mvn setting a bogus maven.home-dir
https://bugs.eclipse.org/bugs/show_bug.cgi?id=341120
only known workaround (as mentioned above) is to use an external mvn

Related

Creating Maven multi-module project with Eclipse

I want to create a maven Multi-module project.
I want to create the Parent project using
mvn archetype:create -DgroupId=com.websystique.multimodule -DartifactId=parent-project
But I got this error:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.203 s
[INFO] Finished at: 2017-05-02T19:57:19+02:00
[INFO] Final Memory: 9M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [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/MojoNotFoundException
Did you read the error message?
[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [Help 1]
The error message tells you that the goal you've specified for the plugin (create) isn't one of the available options. It also lists the valid options for you:
crawl
create-from-project
generate
help
integration-test
jar
update-local-catalog
The goal you're looking for is generate. For example:
mvn archetype:generate -DgroupId=com.websystique.multimodule -DartifactId=parent-project
For more info: maven-archetype-plugin.

vaadin plugin for eclipse build failure on compile theme

Iam getting a build failure every time i try to compile my themes. The compilation seems to work. Iam just wondering about the console log which is saying(in extracts):
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.503 s
[INFO] Finished at: 2017-01-19T17:15:48+01:00
[INFO] Final Memory: 19M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:7.6.6:compile-theme (default-cli) on project admintool: Compiling theme "VAADIN/themes/nxo-fr" failed: Command [[
[ERROR] /bin/sh -c /opt/jdk/jdk1.8.0_91/jre/bin/java -classpath /home/cia/dev/projects/trunk/trunk/admintool/src/main/webapp:/home/cia/dev/projects/trunk/trunk/admintool/target/classes:/home/cia/dev/projects/trunk/trunk/admintool/src/main/java:/home/cia/dev/projects/trunk/trunk/admintool/src/main/resources:/home/cia/.m2/repository/com/sharis/bl/admintool-widgetset/7.6.7/admintool-widgetset-7.6.7.jar:/home/cia/.m2/repository/com/vaadin/vaadin-server/7.6.7/vaadin-server-7.6.7.jar:/home/cia/.m2/repository/com/vaadin/vaadin-sass-compiler/0.9.13/vaadin-sass-compiler-0.9.13.jar:/home/cia/.m2/repository/org/w3c/css/sac/1.3/sac-....................................................................1.5.10.jar com.vaadin.sass.SassCompiler /home/cia/dev/projects/trunk/trunk/admintool/src/main/webapp/VAADIN/themes/nxo-fr/styles.scss /home/cia/dev/projects/trunk/trunk/admintool/src/main/webapp/VAADIN/themes/nxo-fr/styles.css
[ERROR] ]] failed with status 2
[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/MojoExecutionException
I found the issue. The styles.scss file was missing in my older theme folders like runo etc.
So in each theme folder there must be a styles.scss for proper compilation.
Try to use a theme name which has no hyphens in it.
"VAADIN/themes/nxo-fr"

Adding #RunWith for jbehave-junit-runner breaks JBehave build using Maven

I'm using JBehave with my Maven build which I also develop in Eclipse and sometimes run the my unit tests with the JUnit runner in Eclipse. I found jbehave-junit-runner works well for beautifying the JBehave stories in the JUnit runner. However, adding jbehave-junit-runner seems to have broken my Maven build.
Result of mvn clean install after installing https://github.com/codecentric/jbehave-junit-runner:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[28,23] error: package org.junit.runner does not exist
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[42,1] error: cannot find symbol
[ERROR] symbol: class RunWith
/Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[28,23] error: package org.junit.runner does not exist
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[42,1] error: cannot find symbol
[ERROR] symbol: class RunWith
/Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[50,28] error: cannot access Runner
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.043 s
[INFO] Finished at: 2014-12-23T15:38:39-08:00
[INFO] Final Memory: 14M/156M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project followerdownloader-frontend: Compilation failure: Compilation failure:
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[28,23] error: package org.junit.runner does not exist
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[42,1] error: cannot find symbol
[ERROR] symbol: class RunWith
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[28,23] error: package org.junit.runner does not exist
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[42,1] error: cannot find symbol
[ERROR] symbol: class RunWith
[ERROR] /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/src/main/java/com/netbase/followerdownloader/FollowerDownloaderStories.java:[50,28] error: cannot access Runner
[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
What is it about https://github.com/codecentric/jbehave-junit-runner that broke my build?
The solution to the problem is to broaden the scope of junit by removing the test element from the junit in the pom.xml file:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<!-- <scope>test</scope> --> <!-- SOLUTION: COMMENTED OUT THIS LINE -->
</dependency>
I think I stumbled into a paradox of JBehave and Behavior Driven Design (BDD):
On the one hand, BDD is not testing (see http://jbehave.org/reference/stable/examples-philosophy.html).
On the other hand, a tool for BDD, https://github.com/codecentric/jbehave-junit-runner, depends on the #RunWith annotation that's in a test framework, specifically org.junit.runner.RunWith.
I worry that my solution may have consequences for my production code if I'm no longer limiting the scope of junit to the Maven standard test directory.
Nevertheless, my solution did solve the original problem.

Cannot run program "Rscript" in eclipse, but can run it through terminal

Mac OSX 10.7.5, can run Rscript in terminal:
Mac-mini lenskit-demo$ rscript --version
R scripting front-end version 3.0.1 (2013-05-16)
But can`t run it through eclipse:
[INFO] 22:28:16.672 o.g.l.eval.EvalTarget: beginning execution of analyze
[INFO] 22:28:16.672 o.g.l.eval.EvalProject: running task exec
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:26.859s
[INFO] Finished at: Mon Sep 16 22:28:17 CST 2013
[INFO] Final Memory: 8M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grouplens.lenskit:lenskit-eval-maven-plugin:2.0-M1:run-eval (default-run-eval) on project lenskit-demo: Execution default-run-eval of goal org.grouplens.lenskit:lenskit-eval-maven-plugin:2.0-M1:run-eval failed: Execute failed: java.io.IOException: Cannot run program "Rscript": error=2, No such file or directory -> [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/PluginExecutionException
Please, someone can tell me How to solve this?
There is a cross-platform bolt-on package for eclipse to use with R:
https://r-forge.r-project.org/projects/statet/

I couldn't import 'Existing Maven Projects' of i-jetty

They said,
cd $IJETTY_HOME/console
mvn clean install
This will produce a war file in $IJETTY_HOME/console/webapp/target, and also the apk in $IJETTY_HOME/console/apk/target (although as we mentioned, you're probably not interested in that).
but I got following error (...oh, my god. I can not upload image ;0 )
**
[INFO] --- exec-maven-plugin:1.2:exec (generate-dex) # console ---
Unable to access jarfile ${env.ANDROID_HOME}/platform-tools/lib/dx.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] I-Jetty :: Console Parent ......................... SUCCESS [0.241s]
[INFO] I-Jetty :: Console Webapp ......................... FAILURE [2.431s]
[INFO] I-Jetty :: Console Android Installer .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.122s
[INFO] Finished at: Thu Nov 08 19:33:47 KST 2012
[INFO] Final Memory: 14M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (generate-dex) on project console: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :console**
and I tried 'Building with Eclipse'
finally, I got following error similar with the one.
on Import Maven Projects,
exec-maven-plugin:1.2:exec (1 errors)
maven-antrun-plugin:1.6:run(1 errors)
maven-depoendency-plugin:2.3:unpack-dependencies(1 error)
Help me, plz.
I installed maven plug-in 1.3 with eclipse on Mac OS X Lion.
finally, I solved it by myself.
I missed export android sdk path (export ANDROID_HOME=/opt/android/android-sdk-linux_86)
and I edited pom.xml
from
<artifactId>maven-android-plugin</artifactId>
<version>2.9.0-beta-5</version>
to
<artifactId>android-maven-plugin</artifactId>
<version>3.0.0</version>
thanks.