I just downloaded the version 1.8 of Keycloak (the version called Demo), containing some projects already done on a JBoss application server that should be easily tested.
I installed the product and I'm able to access to it.
I checked the pre-requirements:
java -version > 1.8.0_65 (1.8.* needed)
mvn -version > 3.10.0 (3.2.1 needed)
git --version > Installed
Just following the tutorial in YouTube ("Keycloak Tutorial: The Basics Part 2"), when I enter in the directory where is present the pom.xml file, I launch "mvn jboss-as:deploy", but the JBoss showes me this error:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Examples ........................................... SUCCESS [ 2.093 s]
[INFO] Customer Portal - Secured via Valve ................ FAILURE [ 6.766 s]
[INFO] Customer Portal CLI ................................ SKIPPED
[INFO] Customer Portal JS ................................. SKIPPED
[INFO] Product Portal ..................................... SKIPPED
[INFO] EAR example ........................................ SKIPPED
[INFO] Admin Access Example ............................... SKIPPED
[INFO] Angular Product Portal JS .......................... SKIPPED
[INFO] JAX-RS Database Service Using OAuth Bearer Tokens .. SKIPPED
[INFO] Simple OAuth Client ................................ SKIPPED
[INFO] Simple OAuth Client Using CDI and JSF .............. SKIPPED
[INFO] Service Account Example App ........................ SKIPPED
[INFO] Offline Access Portal .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.568 s
[INFO] Finished at: 2016-01-15T00:35:37+01:00
[INFO] Final Memory: 34M/168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:deploy (default-cli) on project customer-portal-example: Could not execute goal deploy on /home/user/keycloak-demo-1.8.0.CR1/examples/unconfigured-demo/customer-app/target/customer-portal.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :customer-portal-example
How should I address this error?
Related
I would like to run the mvn dependency:tree command on a lot of projects, but I sometimes get this error (example on google guava):
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Guava Maven Parent 31.1-jre:
[INFO]
[INFO] Guava Maven Parent ................................. SUCCESS [ 9.360 s]
[INFO] Guava: Google Core Libraries for Java .............. SUCCESS [ 1.473 s]
[INFO] Guava BOM .......................................... SUCCESS [ 4.277 s]
[INFO] Guava Testing Library .............................. SUCCESS [ 1.845 s]
[INFO] Guava Unit Tests ................................... SUCCESS [ 4.133 s]
[INFO] Guava GWT compatible libs .......................... FAILURE [ 8.632 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.051 s
[INFO] Finished at: 2022-03-15T15:22:05+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:tree (default-cli) on project guava-gwt: Execution default-cli of goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:tree failed: Plugin org.apache.maven.plugins:maven-dependency-plugin:3.1.1 or one of its dependencies could not be resolved: Could not find artifact com.google.guava:guava-tests:jar:test-sources:31.1-jre in sonatype-snapshots (https://oss.sonatype.org/content/repositories/snapshots/) -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :guava-gwt
If I run mvn install before this error does not appear. My problem is that sometimes the mvn install does not work.
Is there a way to make mvn dependency:tree work without using mvn install before?
Getting Error At the time of running the
mvn appengine:endpoints_get_client_lib
I got their are some issue with the maven plugin but how can i solve them.
error Log is given below.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building claritus-travelaware 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- appengine-maven-plugin:1.9.42:endpoints_get_client_lib (default-cli) # claritus-travelaware ---
[INFO]
[INFO] Google App Engine Java SDK - Generate endpoints get client lib
[INFO] Using Class Name:com.claritus.travelaware.endpoint.UserLocationEP
[INFO] Using Class Name:com.claritus.travelaware.endpoint.SubscribeUserEP
[INFO] Using Class Name:com.claritus.travelaware.YourFirstAPI
[INFO] Executing endpoints Command=[get-client-lib, -cp, /home/claritus/Desktop/workspace/claritus-travelaware/target/claritus-travelaware-1.0-SNAPSHOT/WEB-INF/classes:/home/claritus/Desktop/workspace/claritus-travelaware/target/classes:/home/claritus/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.9.42/appengine-api-1.0-sdk-1.9.42.jar:/home/claritus/.m2/repository/com/google/appengine/appengine-endpoints/1.9.42/appengine-endpoints-1.9.42.jar:/home/claritus/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/home/claritus/.m2/repository/mysql/mysql-connector-java/5.1.31/mysql-connector-java-5.1.31.jar:/home/claritus/.m2/repository/org/hibernate/hibernate-core/4.2.0.Final/hibernate-core-4.2.0.Final.jar:/home/claritus/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/home/claritus/.m2/repository/org/jboss/logging/jboss-logging/3.1.0.GA/jboss-logging-3.1.0.GA.jar:/home/claritus/.m2/repository/org/jboss/spec/javax/transaction/jboss-transaction-api_1.1_spec/1.0.0.Final/jboss-transaction-api_1.1_spec-1.0.0.Final.jar:/home/claritus/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/home/claritus/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar:/home/claritus/.m2/repository/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.jar:/home/claritus/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.1.Final/hibernate-commons-annotations-4.0.1.Final.jar:/home/claritus/.m2/repository/org/springframework/security/spring-security-core/4.0.4.RELEASE/spring-security-core-4.0.4.RELEASE.jar:/home/claritus/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/home/claritus/.m2/repository/org/springframework/spring-beans/4.2.5.RELEASE/spring-beans-4.2.5.RELEASE.jar:/home/claritus/.m2/repository/org/springframework/spring-context/4.2.5.RELEASE/spring-context-4.2.5.RELEASE.jar:/home/claritus/.m2/repository/org/springframework/spring-expression/4.2.5.RELEASE/spring-expression-4.2.5.RELEASE.jar:/home/claritus/.m2/repository/org/springframework/spring-core/4.2.5.RELEASE/spring-core-4.2.5.RELEASE.jar:/home/claritus/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/claritus/.m2/repository/org/springframework/spring-aop/4.2.5.RELEASE/spring-aop-4.2.5.RELEASE.jar:/home/claritus/.m2/repository/org/springframework/spring-webmvc/4.2.5.RELEASE/spring-webmvc-4.2.5.RELEASE.jar:/home/claritus/.m2/repository/org/springframework/spring-web/4.2.5.RELEASE/spring-web-4.2.5.RELEASE.jar, -o, /home/claritus/Desktop/workspace/claritus-travelaware/target/generated-sources/appengine-endpoints/WEB-INF, -w, /home/claritus/Desktop/workspace/claritus-travelaware/target/generated-sources/appengine-endpoints, -l, java, -bs, maven, com.claritus.travelaware.endpoint.UserLocationEP, com.claritus.travelaware.endpoint.SubscribeUserEP, com.claritus.travelaware.YourFirstAPI]
API client library written to /home/claritus/Desktop/workspace/claritus-travelaware/target/generated-sources/appengine-endpoints/WEB-INF/userLocation-v1-java.zip
API client library written to /home/claritus/Desktop/workspace/claritus-travelaware/target/generated-sources/appengine-endpoints/WEB-INF/subscribeUsers-v1-java.zip
API client library written to /home/claritus/Desktop/workspace/claritus-travelaware/target/generated-sources/appengine-endpoints/WEB-INF/firstApi-v1-java.zip
[INFO] BUILDING Endpoints Client Library from: /home/claritus/Desktop/workspace/claritus-travelaware/target/endpoints-client-libs/firstApi/pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.227 s
[INFO] Finished at: 2016-09-16T10:07:40+05:30
[INFO] Final Memory: 19M/170M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.42:endpoints_get_client_lib (default-cli) on project claritus-travelaware: Execution default-cli of goal com.google.appengine:appengine-maven-plugin:1.9.42:endpoints_get_client_lib failed: ${maven.home} is not specified as a directory: '/home/claritus/Desktop/workspace/claritus-travelaware/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
I'm working on Leshan (https://github.com/eclipse/leshan).
I've run the Leshan project in command line, so I use this command to launch tests:
mvn test
and I have errors:
Results :
Failed tests:
BootstrapTest.bootstrap:59 expected:<1> but was:<0>
SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130 Values should be different. Actual: qtjLtAHNqi
Tests in error:
ObserveTest.can_observe_object:137 NullPointer
WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90 NullPointer
Tests run: 100, Failures: 2, Errors: 2, Skipped: 13
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] leshan ............................................. SUCCESS [0.092 s]
[INFO] leshan - core ...................................... SUCCESS [9.903 s]
[INFO] leshan - server core ............................... SUCCESS [1.666 s]
[INFO] leshan - server californium ........................ SUCCESS [2.778 s]
[INFO] leshan - client core ............................... SUCCESS [1.663 s]
[INFO] leshan - client californium ........................ SUCCESS [0.260 s]
[INFO] leshan - integration tests .........................FAILURE [33.324 s]
[INFO] leshan - server demo ............................... SKIPPED
[INFO] leshan - client demo ............................... SKIPPED
[INFO] leshan - bootstrap server demo ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.197 s
[INFO] Finished at: 2016-06-07T13:50:17+02:00
[INFO] Final Memory: 29M/288M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project leshan-integration-tests: There are test failures.
[ERROR]
[ERROR] Please refer to C:\dvp_win\leshan-master\leshan-integration-tests\target\surefire-reports 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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :leshan-integration-tests
Please can you help me to solve this problem?
Not a great question. But your answer is there in the Maven output.
Failed tests:
BootstrapTest.bootstrap:59 expected:<1> but was:<0>
SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130 Values should be different. Actual: qtjLtAHNqi
Tests in error:
ObserveTest.can_observe_object:137 NullPointer
WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90 NullPointer
Look at the BootstrapTest and SecurityTest .
If you want to run project without fail, you better skip the test.
command - mvn clean install -DskipTests
Refer to github https://github.com/eclipse/leshan/issues/323
I have a big issue with my Jenkins on Mac OS. So I installed Jenkins, made a simple class and converted to Maven, created a new job on Jenkins and specify the pom.xml location ( which Jenkins sees it ok ) but when I try to build my class I always get an error as Jenkins cannot write mojo status or something.This is my console output
Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/workspace/Cocotest
Parsing POMs
[Simple2] $ /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java -cp /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/usr/local/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/usr/local/apache-maven-3.3.9/conf/logging jenkins.maven3.agent.Maven31Main /usr/local/apache-maven-3.3.9 /Users/Shared/Jenkins/Home/war/WEB-INF/lib/remoting-2.53.2.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /Users/Shared/Jenkins/Home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 51372
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /Users/alex-macbook/Eclipse workspace/Simple2/pom.xml install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple2 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # Simple2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/alex-macbook/Eclipse workspace/Simple2/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # Simple2 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.396 s
[INFO] Finished at: 2015-12-29T20:46:31+01:00
[INFO] Final Memory: 12M/144M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Simple2: Error while storing the mojo status: /Users/alex-macbook/Eclipse workspace/Simple2/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst (Permission denied) -> [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
[JENKINS] Archiving /Users/alex-macbook/Eclipse workspace/Simple2/pom.xml to simple/Simple2/0.0.1-SNAPSHOT/Simple2-0.0.1-SNAPSHOT.pom
/Users/alex-macbook/Eclipse workspace/Simple2/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/Cocotest/Users/alex-macbook/Eclipse workspace/Simple2/; will archive in a separate pass
channel stopped
Finished: FAILURE
Regarding this error message:
Error while storing the mojo status:
/Users/alex-macbook/Eclipse workspace/Simple2/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst (Permission denied)
I think it's more a permission problem.
Jenkins is running with a dedicated jenkins user.
Did you check this user has a R/W access in your working directory?
I am on Ubuntu 14.04 LTS, Java 7, have installed Rasperry Pi, have also setup the kura eclipse workspace. Now I want to use the Kura source code to start the sample application.
I followed the Eclipse Kura getting started guide here
but when i ran `mvn clean install` in the kura/target-platform directory,
it failed with the following message:
[INFO] Reactor Summary:
[INFO]
[INFO] target-platform .................................... SUCCESS [ 0.147 s]
[INFO] Java API for working with Human Interface USB Devices (HID) SUCCESS [ 1.832 s]
[INFO] javax.usb API from javax-usb ....................... SUCCESS [ 0.226 s]
[INFO] javax.usb Common from javax-usb .................... SUCCESS [ 0.239 s]
[INFO] javax.usb Linux implementation from javax-usb ...... SUCCESS [ 0.190 s]
[INFO] Serial Device based on SODA DK comm ................ SUCCESS [ 0.483 s]
[INFO] p2-repo-common ..................................... FAILURE [ 0.491 s]
[INFO] p2-repo-equinox_3.8.1 .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.008 s
[INFO] Finished at: 2015-05-14T18:05:23+08:00
[INFO] Final Memory: 31M/427M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.9:copy (copy-dio-bundle-for-publishing) on project p2-repo-common: Unable to find artifact. Could not find artifact jdk:jdk.dio:jar:1.0.1 in nexus-releases (http://192.168.0.119:8081/nexus/content/groups/public)
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=jdk -DartifactId=jdk.dio -Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=jdk -DartifactId=jdk.dio -Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] jdk:jdk.dio:jar:1.0.1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] nexus-releases (http://192.168.0.119:8081/nexus/content/groups/public, releases=true, snapshots=true)
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :p2-repo-common
It is complaining not finding artifact jdk:jdk.dio:jar:1.0.1 which is provided in Java ME as far as I know. Do I need to install anything first before building the Kura source code?
The jdk.dio artifact is available in the "Add-ons" repo provided by Eurotech at https://raw.github.com/eurotech/kura_addons/mvn-repo
It looks like you may have a custom Maven settings file that causes everything to be searched in your local Nexus? (http://192.168.0.119:8081)
HTH.