Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25643

Not able to use example build.gradle file with Java 8

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gradle-jpi-plugin
    • None

      Downloaded the repository from https://github.com/jenkinsci/gradle-jpi-plugin and tried to use the build.gradle file in the "doc" folder (https://github.com/jenkinsci/gradle-jpi-plugin/tree/master/doc).

      $ ../gradlew build.gradle
      Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
      
      FAILURE: Build failed with an exception.
      
      * Where:
      Script 'https://raw.github.com/jenkinsci/gradle-jpi-plugin/master/install' line: 22
      
      * What went wrong:
      A problem occurred evaluating script.
      > Failed to apply plugin [id 'org.jenkins-ci.jpi']
         > Plugin with id 'org.jenkins-ci.jpi' not found.
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      
      BUILD FAILED
      
      Total time: 4.355 secs
      

      Using Java 1.8.0_25 on Windows 7.

      Also tried to copy the build.gradle file from README.md (https://github.com/jenkinsci/gradle-jpi-plugin/blob/master/README.md)

      With the gradle wrapper from gradle-jpi-plugin:

      $ ../gradle-jpi-plugin-master/gradlew build
      Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
      :localizer
      :stapler
      :compileJava UP-TO-DATE
      :compileGroovy UP-TO-DATE
      :processResources UP-TO-DATE
      :classes UP-TO-DATE
      :javadoc UP-TO-DATE
      :javadocJar
      :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
      
      Total time: 1 mins 13.436 secs
      

      Gradle wrapper version of the gradle-jpi-plugin:

      $ ../gradle-jpi-plugin-master/gradlew -version
      Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
      
      ------------------------------------------------------------
      Gradle 2.1
      ------------------------------------------------------------
      
      Build time:   2014-09-08 10:40:39 UTC
      Build number: none
      Revision:     e6cf70745ac11fa943e19294d19a2c527a669a53
      
      Groovy:       2.3.6
      Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
      JVM:          1.8.0_05 (Oracle Corporation 25.5-b02)
      OS:           Windows 7 6.1 amd64
      

          [JENKINS-25643] Not able to use example build.gradle file with Java 8

          Tried changing the Gradle wrapper version to latest 2.3 build (in a fresh download from gradle-jpi-plugin repo):

          task wrapper(type: Wrapper) {
              gradleVersion = '2.3'
              distributionUrl = 'http://downloads.gradle.org/distributions-snapshots/gradle-2.3-20141026230040%200000-bin.zip'
          }
          

          Running gradle in main project:

          $ ./gradlew wrapper
          Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
          :wrapper
          
          BUILD SUCCESSFUL
          
          Total time: 4.809 secs
          
          $ ./gradlew build
          Downloading http://downloads.gradle.org/distributions-snapshots/gradle-2.3-20141026230040%200000-bin.zip
          .............................................................................................................................................................................................................
          .............................................................................................................................................................................................................
          .................................................................
          Unzipping C:\Users\hnygard\.gradle\wrapper\dists\gradle-2.3-20141026230040 0000-bin\6fbv8gucgle3a8ve1h8epjf2bi\gradle-2.3-20141026230040 0000-bin.zip to C:\Users\hnygard\.gradle\wrapper\dists\gradle-2.3-2014102623
          :compileJava
          warning: [options] bootstrap class path not set in conjunction with -source 1.6
          :compileGroovy
          :processResources
          :classes
          :jar
          :signArchives SKIPPED
          :assemble
          :codenarcMain
          Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.5/groovy-all-1.7.5.pom
          Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.5/groovy-all-1.7.5.jar
          :codenarcTest
          :compileTestJava UP-TO-DATE
          :compileTestGroovy
          :processTestResources
          :testClasses
          :test
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > basics FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:32
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin class FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:54
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > dependency FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:89
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > dependencies FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:112
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > optional dependency FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:134
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > optional dependencies FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:157
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > complex dependencies FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:182
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > compatible since version FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:202
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > mask classes FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:222
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin first class loader FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:242
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > sandbox status FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:262
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin developer FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:288
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin developers FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:317
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > support dynamic loading yes FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:341
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > support dynamic loading maybe FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:341
          
          org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > support dynamic loading no FAILED
              org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:341
          Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
          
          49 tests completed, 16 failed
          :test FAILED
          
          FAILURE: Build failed with an exception.
          
          * What went wrong:
          Execution failed for task ':test'.
          > There were failing tests. See the report at: file:///C:/git/tmp/gradle-jpi-plugin-master/build/reports/tests/index.html
          
          * Try:
          Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
          
          BUILD FAILED
          
          Total time: 1 mins 29.252 secs
          

          Still same error for the doc folder

          $ cd doc/
          $ ../gradlew build
          
          FAILURE: Build failed with an exception.
          
          * Where:
          Script 'https://raw.github.com/jenkinsci/gradle-jpi-plugin/master/install' line: 22
          
          * What went wrong:
          A problem occurred evaluating script.
          > Plugin with id 'org.jenkins-ci.jpi' not found.
          
          * Try:
          Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
          
          BUILD FAILED
          
          Total time: 15.171 secs
          

          The build.gradle file in README.md:

          $ ../gradle-jpi-plugin-master/gradlew build
          The PluginContainer.apply(Class) method has been deprecated and is scheduled to be removed in Gradle 3.0. Please use the PluginAware.apply(Map) or PluginAware.apply(Closure) method instead.
          :localizer FAILED
          
          FAILURE: Build failed with an exception.
          
          * What went wrong:
          Execution failed for task ':localizer'.
          > java.lang.ClassNotFoundException: org.jvnet.localizer.GeneratorTask
          
          * Try:
          Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
          
          BUILD FAILED
          
          Total time: 4.154 secs
          

          Hallvard Nygård added a comment - Tried changing the Gradle wrapper version to latest 2.3 build (in a fresh download from gradle-jpi-plugin repo): task wrapper(type: Wrapper) { gradleVersion = '2.3' distributionUrl = 'http://downloads.gradle.org/distributions-snapshots/gradle-2.3-20141026230040%200000-bin.zip' } Running gradle in main project: $ ./gradlew wrapper Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 :wrapper BUILD SUCCESSFUL Total time: 4.809 secs $ ./gradlew build Downloading http://downloads.gradle.org/distributions-snapshots/gradle-2.3-20141026230040%200000-bin.zip ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ................................................................. Unzipping C:\Users\hnygard\.gradle\wrapper\dists\gradle-2.3-20141026230040 0000-bin\6fbv8gucgle3a8ve1h8epjf2bi\gradle-2.3-20141026230040 0000-bin.zip to C:\Users\hnygard\.gradle\wrapper\dists\gradle-2.3-2014102623 :compileJava warning: [options] bootstrap class path not set in conjunction with -source 1.6 :compileGroovy :processResources :classes :jar :signArchives SKIPPED :assemble :codenarcMain Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.5/groovy-all-1.7.5.pom Download https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.5/groovy-all-1.7.5.jar :codenarcTest :compileTestJava UP-TO-DATE :compileTestGroovy :processTestResources :testClasses :test org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > basics FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:32 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin class FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:54 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > dependency FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:89 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > dependencies FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:112 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > optional dependency FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:134 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > optional dependencies FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:157 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > complex dependencies FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:182 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > compatible since version FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:202 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > mask classes FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:222 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin first class loader FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:242 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > sandbox status FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:262 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin developer FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:288 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > plugin developers FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:317 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > support dynamic loading yes FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:341 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > support dynamic loading maybe FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:341 org.jenkinsci.gradle.plugins.jpi.JpiManifestSpec > support dynamic loading no FAILED org.spockframework.runtime.SpockComparisonFailure at JpiManifestSpec.groovy:341 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 49 tests completed, 16 failed :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///C:/git/tmp/gradle-jpi-plugin-master/build/reports/tests/index.html * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 1 mins 29.252 secs Still same error for the doc folder $ cd doc/ $ ../gradlew build FAILURE: Build failed with an exception. * Where: Script 'https://raw.github.com/jenkinsci/gradle-jpi-plugin/master/install' line: 22 * What went wrong: A problem occurred evaluating script. > Plugin with id 'org.jenkins-ci.jpi' not found. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 15.171 secs The build.gradle file in README.md: $ ../gradle-jpi-plugin-master/gradlew build The PluginContainer.apply(Class) method has been deprecated and is scheduled to be removed in Gradle 3.0. Please use the PluginAware.apply(Map) or PluginAware.apply(Closure) method instead. :localizer FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':localizer'. > java.lang.ClassNotFoundException: org.jvnet.localizer.GeneratorTask * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 4.154 secs

          Seems to be an issue with Gradle user home being a network share (corporate setup). The example in "doc" does not work.

          Hallvard Nygård added a comment - Seems to be an issue with Gradle user home being a network share (corporate setup). The example in "doc" does not work.

          Will be fixed in the next release.

          https://github.com/jenkinsci/gradle-jpi-plugin/pull/37

          Daniel Spilker added a comment - Will be fixed in the next release. https://github.com/jenkinsci/gradle-jpi-plugin/pull/37

          Fixed in 0.8.0.

          Daniel Spilker added a comment - Fixed in 0.8.0.

            daspilker Daniel Spilker
            hnygard Hallvard Nygård
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: