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

Job-dsl "standalone" stop working from 1.82 version after rename

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • job-dsl-plugin
    • None
    • OS: Ubuntu 18.04.6 LTS
      Java version: openjdk 11.0.19 2023-04-18

      I could execute job-dsl-core-1.81.1-standalone.jar without any problem with this command.

      java -Done-jar.main.class=org.codehaus.groovy.tools.FileSystemCompiler -jar job-dsl-core-1.81.1-standalone.jar --help

      When I want to execute job-dsl-core-1.82-jar-with-dependencies.jar with the same command.

      java -Done-jar.main.class=org.codehaus.groovy.tools.FileSystemCompiler -jar job-dsl-core-1.82-jar-with-dependencies.jar --help

      Error:

      Exception in thread "main" java.io.FileNotFoundException: --help (No such file or directory)

      I get same error with latest 1.85 version.

      java -Done-jar.main.class=org.codehaus.groovy.tools.FileSystemCompiler -jar job-dsl-core-1.85-jar-with-dependencies.jar --help

      Please check and fix this issue.

          [JENKINS-72121] Job-dsl "standalone" stop working from 1.82 version after rename

          Mark Waite added a comment -

          Please check and fix this issue.

          gabor523 since the Job DSL plugin is up for adoption, you may not get much response to this request.

          You could adopt the Job DSL plugin, investigate and resolve the issue, and release a new version. That would meet your needs and would help others in case they encounter the same problem. See "Adopt a plugin" for instructions on the process.

          Mark Waite added a comment - Please check and fix this issue. gabor523 since the Job DSL plugin is up for adoption, you may not get much response to this request. You could adopt the Job DSL plugin, investigate and resolve the issue, and release a new version. That would meet your needs and would help others in case they encounter the same problem. See "Adopt a plugin" for instructions on the process.

          Jamie Tanna added a comment -

          Thanks Mark - yes I'm currently seeking support with the plugin as noted in the README (https://groups.google.com/g/jenkinsci-dev/c/WtNZKVWVlJ0/m/Zbd7SH_GFAAJ)

          Jamie Tanna added a comment - Thanks Mark - yes I'm currently seeking support with the plugin as noted in the README ( https://groups.google.com/g/jenkinsci-dev/c/WtNZKVWVlJ0/m/Zbd7SH_GFAAJ )

          Gabor added a comment -

          Thank you for answer.

          My assumption that it does not only renaming happened in job-dsl-core 1.82 version.

          The standalone JAR job-dsl-core-1.81-standalone.jar has been renamed to job-dsl-core-1.82-jar-with-dependencies.jar. 

          Because the "-d" attribute not acceptable since 1.82 version.

          Could you send me to url of related source code where is this helper defined?

          $ java -Done-jar.main.class=org.codehaus.groovy.tools.FileSystemCompiler -jar job-dsl-core-1.81.1-standalone.jar --help
          [Boot] INFO:  setProperties(com.simontuffs.onejar.JarClassLoader@4a574795)
          [Boot] INFO:  using JarClassLoader: com.simontuffs.onejar.JarClassLoader
          usage: groovyc [options] <source-files>
          options:
           -b,--basescript <class&gt;    Base class name for scripts (must derive from
                                      Script)
           -classpath <path>          Specify where to find the class files - must be
                                      first argument
              --configscript <arg>    A script for tweaking the configuration options
           -cp,--classpath <path>     Aliases for '-classpath'
           -d <arg>                   Specify where to place generated class files
           -e,--exception             Print stack trace on error
              --encoding <encoding>   Specify the encoding of the user class files
           -F <flag>                  passed to javac for joint compilation
           -h,--help                  Print a synopsis of standard options
              --indy                  enables compilation using invokedynamic
           -j,--jointCompilation      Attach javac compiler to compile .java files
           -J <property=value>        name-value pairs to pass to javac
              --sourcepath <path>     Specify where to find the source files
              --temp <temp>           Specify temporary directory
           -v,--version               Print the version 

          Because it is not available since 1.82 version.

          $ java -Done-jar.main.class=org.codehaus.groovy.tools.FileSystemCompiler -jar job-dsl-core-1.82-jar-with-dependencies.jar --help
          WARNING: An illegal reflective access operation has occurred
          WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/repo/egbobrc/vsbg/tools/ci/job-dsl-core-1.82-jar-with-dependencies.jar) to method java.lang.Object.finalize()
          WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
          WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
          WARNING: All illegal access operations will be denied in a future release
          Exception in thread "main" java.io.FileNotFoundException: --help (No such file or directory)
                  at java.base/java.io.FileInputStream.open0(Native Method)
                  at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
                  at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
                  at org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:1616)
                  at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:610)
                  at org.codehaus.groovy.runtime.dgm$965.invoke(Unknown Source)
                  at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
                  at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
                  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
                  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
                  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
                  at javaposse.jobdsl.Run$_main_closure2.doCall(Run.groovy:43)
                  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
                  at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
                  at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
                  at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
                  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
                  at groovy.lang.Closure.call(Closure.java:420)
                  at groovy.lang.Closure.call(Closure.java:436)
                  at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)
                  at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1980)
                  at org.codehaus.groovy.runtime.dgm$160.invoke(Unknown Source)
                  at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
                  at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
                  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
                  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
                  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
                  at javaposse.jobdsl.Run.main(Run.groovy:41) 

          Thanks and Regards,

          Gabor

          Gabor added a comment - Thank you for answer. My assumption that it does not only renaming happened in job-dsl-core 1.82 version. The standalone JAR job-dsl-core-1.81-standalone.jar has been renamed to job-dsl-core-1.82-jar-with-dependencies.jar. Because the "-d" attribute not acceptable since 1.82 version. Could you send me to url of related source code where is this helper defined? $ java -Done-jar.main.class=org.codehaus.groovy.tools.FileSystemCompiler -jar job-dsl-core-1.81.1-standalone.jar --help [Boot] INFO:  setProperties(com.simontuffs.onejar.JarClassLoader@4a574795) [Boot] INFO:  using JarClassLoader: com.simontuffs.onejar.JarClassLoader usage: groovyc [options] <source-files> options:  -b,--basescript < class& gt;    Base class name for scripts (must derive from                             Script)  -classpath <path>          Specify where to find the class files - must be                             first argument     --configscript <arg>    A script for tweaking the configuration options  -cp,--classpath <path>     Aliases for '-classpath'  -d <arg>                   Specify where to place generated class files  -e,--exception             Print stack trace on error     --encoding <encoding>   Specify the encoding of the user class files  -F <flag>                  passed to javac for joint compilation  -h,--help                  Print a synopsis of standard options     --indy                  enables compilation using invokedynamic  -j,--jointCompilation      Attach javac compiler to compile .java files  -J <property=value>        name-value pairs to pass to javac     --sourcepath <path>     Specify where to find the source files     --temp <temp>           Specify temporary directory  -v,--version               Print the version Because it is not available since 1.82 version. $ java -Done-jar.main.class=org.codehaus.groovy.tools.FileSystemCompiler -jar job-dsl-core-1.82-jar-with-dependencies.jar --help WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/repo/egbobrc/vsbg/tools/ci/job-dsl-core-1.82-jar-with-dependencies.jar) to method java.lang. Object .finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Exception in thread "main" java.io.FileNotFoundException: --help (No such file or directory)         at java.base/java.io.FileInputStream.open0(Native Method)         at java.base/java.io.FileInputStream.open(FileInputStream.java:219)         at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)         at org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:1616)         at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:610)         at org.codehaus.groovy.runtime.dgm$965.invoke(Unknown Source)         at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)         at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)         at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)         at javaposse.jobdsl.Run$_main_closure2.doCall(Run.groovy:43)         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.base/java.lang.reflect.Method.invoke(Method.java:566)         at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)         at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)         at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)         at groovy.lang.Closure.call(Closure.java:420)         at groovy.lang.Closure.call(Closure.java:436)         at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)         at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1980)         at org.codehaus.groovy.runtime.dgm$160.invoke(Unknown Source)         at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)         at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)         at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)         at javaposse.jobdsl.Run.main(Run.groovy:41) Thanks and Regards, Gabor

            jamietanna Jamie Tanna
            gabor523 Gabor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: