Page 1 of 1

Build failure (genkey?)

Posted: Thu Nov 08, 2012 7:48 pm
by needinfo
I get this when trying to run jetty-demo on the server. The same code works well on my local machine. Any ideas?

Code: Select all

Buildfile: /DemoSite/site/build.xml

start-db:
     [echo] Starting Data Base...

jetty-demo:
[artifact:mvn] Listening for transport dt_socket at address: 8000
[artifact:mvn] [INFO] Scanning for projects...
[artifact:mvn] [INFO]                                                                         
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Building site 1.0
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.2:clean (clean) @ site ---
[artifact:mvn] [WARNING] Keystore file '/DemoSite/site/target/mycompany/WEB-INF/blc-example.keystore' doesn't exist.
[artifact:mvn] [INFO]
[artifact:mvn] [INFO] --- keytool-maven-plugin:1.2:genkey (genkey) @ site ---
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] BUILD FAILURE
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Total time: 3.919s
[artifact:mvn] [INFO] Finished at: Fri Nov 09 02:39:39 EET 2012
[artifact:mvn] [INFO] Final Memory: 8M/58M
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [ERROR] Failed to execute goal org.codehaus.mojo:keytool-maven-plugin:1.2:genkey (genkey) on project site: Failed executing '/bin/sh -c "cd /DemoSite/site && /usr/lib/jvm/java-6-sun-1.6.0.26/jre/../bin/keytool -genkeypair -keystore /DemoSite/site/target/mycompany/WEB-INF/blc-example.keystore -storepass '*****' -alias '*****' -dname cn=localhost -keypass '*****' -keyalg RSA"' - exitcode 1 -> [Help 1]
[artifact:mvn] [ERROR]
[artifact:mvn] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[artifact:mvn] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[artifact:mvn] [ERROR]
[artifact:mvn] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[artifact:mvn] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[artifact:mvn] Java Result: 1

Re: Build failure (genkey?)

Posted: Fri Nov 16, 2012 4:08 pm
by jefffischer
You'll need to rerun maven with the -e switch to get more specific insight into the problem.

Re: Build failure (genkey?)

Posted: Fri Jun 13, 2014 9:08 am
by retxed07
I am having the same problem when I try to build the project using java 1.8.

Failed to execute goal org.codehaus.mojo:keytool-maven-plugin:1.2:genkey (genkey) on project admin: Execution genkey of goal org.codehaus.mojo:keytool-maven-plugin:1.2:genkey failed: Unable to load the mojo 'genkey' (or one of its required components) from the plugin 'org.codehaus.mojo:keytool-maven-plugin:1.2': com.google.inject.ProvisionException: Guice provision errors:

1) No implementation for org.codehaus.mojo.keytool.KeyToolCommandLineBuilder was bound.
while locating org.codehaus.mojo.keytool.DefaultKeyTool
at ClassRealm[plugin>org.codehaus.mojo:keytool-maven-plugin:1.2, parent: sun.misc.Launcher$AppClassLoader@5c647e05]
at ClassRealm[plugin>org.codehaus.mojo:keytool-maven-plugin:1.2, parent: sun.misc.Launcher$AppClassLoader@5c647e05]
while locating org.codehaus.mojo.keytool.KeyTool
while locating org.codehaus.mojo.keytool.GenkeyMojo
at ClassRealm[plugin>org.codehaus.mojo:keytool-maven-plugin:1.2, parent: sun.misc.Launcher$AppClassLoader@5c647e05]
while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.codehaus.mojo:keytool-maven-plugin:1.2:genkey)

1 error
role: org.apache.maven.plugin.Mojo
roleHint: org.codehaus.mojo:keytool-maven-plugin:1.2:genkey
-> [Help 1]

Re: Build failure (genkey?)

Posted: Fri Jun 13, 2014 10:12 am
by RapidTransit
You need to update keytool, the API changed so its not just change version number, also Broadleaf will not work if you compile to JDK8 (Well it works almost), Spring throws exceptions version 4 supports JDK8

Re: Build failure (genkey?)

Posted: Fri Jun 13, 2014 11:07 am
by phillipuniverse
FYI, this is the commit that I made in DemoSite that updates that plugin for Java 8: https://github.com/BroadleafCommerce/De ... 7fd1980f66.

Also, RapidTransit is right: you can run Broadleaf 3.1.3-GA and 3.0.11-GA on a Java 8 JVM (older versions will not work because of Spring) but you cannot use Java 8 bytecode just yet. The maximum target compilation in the Maven compiler is 1.7.

We are tentatively scheduling Spring 4 for Broadleaf 3.2.0-GA (https://github.com/BroadleafCommerce/Br ... e/pull/930) but we're still discussing it internally, we might push Spring 4 to a later Broadleaf release. Spring 4+ is the only compatible Java 8 source code line.