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

Plugins should switch to '$class' from 'stapler-class' and 'kind'

      The field name used to specify class names in structured form is changed to $class from stapler-class and kind.
      Plugins using `stapler-class` or `kind` should follow that change as they may not get to work in future versions of Jenkins.

      They doesn't stop working immediately as Jenkins keeps the backward compatibility (it continues to send and receive stapler-class and kind).

      Instructions for plugins:

      • For plugins using stapler-class or kind in jelly files
        • You should use proper tags provided by Jenkins core, such as descriptorRadioList and dropdownDescriptorSelector.
        • lib/form/class-entry will be provided in the next version of Jenkins.
      • For plugins using stapler-class or kind in Java codes
        • Do like this:
          String clazzName = formData.optString("$class", null);
          if (clazzName == null) {
              // Fall back on the legacy stapler-class attribute.
              clazzName = formData.optString("stapler-class", null);
          }
          
        • Jenkins core should provide an alternate way in a future release so that plugins no longer need to access stapler-class and $class.

      See:

          [JENKINS-25403] Plugins should switch to '$class' from 'stapler-class' and 'kind'

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java
          http://jenkins-ci.org/commit/flexible-publish-plugin/8f952fcdfe26c460494eeb42bc744bc3d64e727a
          Log:
          JENKINS-25403 Fixed the error message for no $class or stapler-class.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java http://jenkins-ci.org/commit/flexible-publish-plugin/8f952fcdfe26c460494eeb42bc744bc3d64e727a Log: JENKINS-25403 Fixed the error message for no $class or stapler-class.

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/hudson/plugins/build_timeout/BuildTimeOutUtility.java
          http://jenkins-ci.org/commit/build-timeout-plugin/33b21d98ae412d5ff2657f3d442173d06b0bee9c
          Log:
          JENKINS-25403 Fixed the error message for no $class or stapler-class.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/build_timeout/BuildTimeOutUtility.java http://jenkins-ci.org/commit/build-timeout-plugin/33b21d98ae412d5ff2657f3d442173d06b0bee9c Log: JENKINS-25403 Fixed the error message for no $class or stapler-class.

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/hudson/plugins/build_timeout/BuildTimeOutUtility.java
          http://jenkins-ci.org/commit/build-timeout-plugin/4b827f5a1c6000a737841b072e326444d93b1f20
          Log:
          Merge pull request #35 from mattmoor/master

          JENKINS-25403 Add support for the upcoming '$class' annotation change while maintaining support for older cores.

          Compare: https://github.com/jenkinsci/build-timeout-plugin/compare/db17163973b6...4b827f5a1c60

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/build_timeout/BuildTimeOutUtility.java http://jenkins-ci.org/commit/build-timeout-plugin/4b827f5a1c6000a737841b072e326444d93b1f20 Log: Merge pull request #35 from mattmoor/master JENKINS-25403 Add support for the upcoming '$class' annotation change while maintaining support for older cores. Compare: https://github.com/jenkinsci/build-timeout-plugin/compare/db17163973b6...4b827f5a1c60

          ikedam added a comment -

          ikedam added a comment - https://github.com/jenkinsci/jenkins/pull/1563 might break the backward compatibility. (I haven't tested that, but reported in https://wiki.jenkins-ci.org/display/JENKINS/Extensible+Choice+Parameter+plugin?focusedCommentId=78676310#comment-78676310

          ikedam added a comment -

          The problem of extensible-choice-parameter was not actually related to this issue...
          Revert severity.

          ikedam added a comment - The problem of extensible-choice-parameter was not actually related to this issue... Revert severity.

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/org/jenkinsci/plugins/authorizeproject/AuthorizeProjectProperty.java
          http://jenkins-ci.org/commit/authorize-project-plugin/440d75a4ea5e3d070751c0ea45010c66c4ee0893
          Log:
          Merge pull request #7 from mattmoor/master

          JENKINS-25403 Add support for upcoming $class annotation change

          Compare: https://github.com/jenkinsci/authorize-project-plugin/compare/a2eee2fb9741...440d75a4ea5e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkinsci/plugins/authorizeproject/AuthorizeProjectProperty.java http://jenkins-ci.org/commit/authorize-project-plugin/440d75a4ea5e3d070751c0ea45010c66c4ee0893 Log: Merge pull request #7 from mattmoor/master JENKINS-25403 Add support for upcoming $class annotation change Compare: https://github.com/jenkinsci/authorize-project-plugin/compare/a2eee2fb9741...440d75a4ea5e

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition.java
          src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition/config.jelly
          http://jenkins-ci.org/commit/extensible-choice-parameter-plugin/4273077469844aa67b65f9febca8e4781a6f0f9f
          Log:
          [FIXED JENKINS-28046]JENKINS-25403 Now uses f:dropdownDescriptorSelector, which is provided by Jenkins core. This avoids problem with Jenkins-1.610. / Now handles also $class not only stapler-class.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition.java src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/ExtensibleChoiceParameterDefinition/config.jelly http://jenkins-ci.org/commit/extensible-choice-parameter-plugin/4273077469844aa67b65f9febca8e4781a6f0f9f Log: [FIXED JENKINS-28046] JENKINS-25403 Now uses f:dropdownDescriptorSelector, which is provided by Jenkins core. This avoids problem with Jenkins-1.610. / Now handles also $class not only stapler-class.

          ikedam added a comment -

          extensible-choice-parameter is fixed with 1.3.0.

          ikedam added a comment - extensible-choice-parameter is fixed with 1.3.0.

          ikedam added a comment -

          fixed authorize-project-plugin with 1.1.0.

          ikedam added a comment - fixed authorize-project-plugin with 1.1.0.

          ikedam added a comment -

          updates-sites-manager was refactored and no longer depends on `stapler-class` or `kind` anymore in update-sites-manager-2.0.0.

          ikedam added a comment - updates-sites-manager was refactored and no longer depends on `stapler-class` or `kind` anymore in update-sites-manager-2.0.0.

            ikedam ikedam
            ikedam ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: