The gradle-jpi-plugin 0.7.2 can be used with Gradle 1.12 and JDK 7. Make sure to update the wrapper when changing Gradle versions.
That said, I released gradle-jpi-plugin 0.8.0 which must be used with Gradle 2.2.1 and JDK7 or JDK8. Have a look at the changelog: https://github.com/jenkinsci/gradle-jpi-plugin/blob/0.8.0/CHANGELOG.md Daniel On Tue, Jan 6, 2015 at 12:07 PM, Thomas Goeppel <[email protected]> wrote: > Daniel, > > thanks for the fast reply! > > Your hint was good, even if I already had been using Java 7 in my > programming environment. After downgrading to Java 6, "groovyw jpi" works! > > But what should I say, installing an outdated version of Java is a small > price to pay if the goal is using a modern programming language :-) > > Cheers, > Thomas > > On Monday, January 5, 2015 9:18:31 PM UTC+1, Daniel Spilker wrote: >> >> Hi! >> >> Sorry, the documentation does not give any recommendations. The >> recommended Gradle version for the Gradle JPI Plugin is 1.12. Newer >> versions will cause problems, the next version will support Gradle 2.2.1. >> >> You have to use Java 7 since Java 8 also causes problems ( >> https://issues.jenkins-ci.org/browse/JENKINS-25643). If you want to >> share your plugin with other users, you should probably stick to JDK6 since >> that's the minimum version supported by Jenkins, see >> https://wiki.jenkins-ci.org/display/JENKINS/Java+5+Compatibility. >> >> Jenkins will provide a Groovy runtime for plugins (which is currently >> 1.8.9), you should use that version to avoid problems. It's added to the >> dependencies automatically by the Gradle JPI plugin. >> >> Daniel >> >> On Mon, Jan 5, 2015 at 8:57 PM, Thomas Goeppel <[email protected]> >> wrote: >> >>> Hello developers community! >>> >>> I'd like to experiment with Jenkins plugins written in Groovy, and to >>> get started I'm trying to build a Groovy Jenkins plugin demo from Shiran >>> Rubin's talk at the 2014 Jenkins conference in Israel (video >>> <https://www.youtube.com/watch?v=h_epgCWJ8lE>, slides >>> <https://www.cloudbees.com/sites/default/files/juc_presentation.pdf>, >>> my fork of the github-repository >>> <https://github.com/TG9541/frogballs-plugin>). >>> >>> The build fails with the following error message: >>> >>> >>> :compileGroovy >>> :processResources UP-TO-DATE >>> :classes >>> :jpi FAILED >>> >>> FAILURE: Build failed with an exception. >>> >>> * What went wrong: >>> Execution failed for task ':jpi'. >>> > java/util/HashMap$Entry >>> >>> * Try: >>> Run with --stacktrace option to get the stack trace. Run with --info or >>> --debug option to get more log output. >>> >>> BUILD FAILED >>> >>> I'm using Ubuntu 14.04, and since I couldn't find tool version >>> requirements, I installed most things from packages. >>> >>> "gradle -version" prints the following versions: >>> ------------------------------------------------------------ >>> Gradle 1.4 >>> ------------------------------------------------------------ >>> >>> Gradle build time: Monday, September 9, 2013 8:44:25 PM UTC >>> Groovy: 1.8.6 >>> Ant: Apache Ant(TM) version 1.9.3 compiled on April 8 2014 >>> JVM: 1.7.0_65 (Oracle Corporation 24.65-b04) >>> OS: Linux 3.13.0-44-generic amd64 >>> >>> >>> I tried the following, without seeing the error message change: >>> >>> >>> - build with the "--debug" option, and Gradle prior to 2.0 had issues >>> with Java1.8 >>> >>> <http://forums.gradle.org/gradle/topics/gradle_fails_on_jdk8_with_java_lang_classnotfoundexception_java_util_hashmap_entry> >>> -> I downgraded to Java/JDK1.7 * changed the gradle-jpi-plugin dependency >>> from version 0.5.0 to 0.7.2 >>> - used the dependencies I found in the job-dsl-plugin >>> <https://github.com/jenkinsci/job-dsl-plugin/blob/master/build.gradle> >>> (e.g. "gradleVersion = '1.12'") >>> >>> >>> A generally recommendation in the Gradle forums is upgrading Gradle, and >>> Groovy, to version 2.x. I do that, since it's not clear to me how the >>> Groovy version used in Jenkins relates to the version used by the build >>> tools (e.g. version of groovyc in the environment). >>> >>> It would be nice if someone with more experience could have a look at >>> it, and could shed some light on the Groovy version tool/build dependencies! >>> >>> Thanks in advance! >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Jenkins Developers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/jenkinsci-dev/2092c5b5-1d1d-475e-a251-c0d690720601% >>> 40googlegroups.com >>> <https://groups.google.com/d/msgid/jenkinsci-dev/2092c5b5-1d1d-475e-a251-c0d690720601%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/cab8da26-8fbe-43a5-a7aa-c88a71ef226a%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/cab8da26-8fbe-43a5-a7aa-c88a71ef226a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAKqW32BW_Pv%2BLvjeQHhQC1kwm5KzJAm8uU23zEQTKMjCjfSbkg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
