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

Move from gmaven-plugin to gmavenplus-plugin; or remove entirely

      Jenkins plugins use a custom version of the gmaven-plugin that hasn't been updated in years.

      There is a gmavenplus-plugin that is maintained and is Java 11 compatible.

      https://github.com/groovy/GMavenPlus

      The pipeline-model-definition plugin recently switched to using gmavenplus with only some additional spotbugs issues.

      Jenkins parent-pom should switch to gmavenplus and exclude gmaven.

          [JENKINS-58028] Move from gmaven-plugin to gmavenplus-plugin; or remove entirely

          Jesse Glick added a comment -

          Ideally only in a profile activated by the presence of Groovy sources.

          Or just remove all support for Groovy from the parent POM, as it is a niche thing we do not really recommend. At least I would like to get rid of workflow-cps-plugin/src/test/groovy/ and its ilk. The main trouble with this option is that people do not read release notes when updating the parent POM (incl. most users of Dependabot), and in some cases a plugin using some Groovy would continue to compile yet be missing functionality—so we would either need to do a search for affected plugins, or introduce some kind of automated warning.

          Jesse Glick added a comment - Ideally only in a profile activated by the presence of Groovy sources. Or just remove all support for Groovy from the parent POM, as it is a niche thing we do not really recommend. At least I would like to get rid of workflow-cps-plugin/src/test/groovy/ and its ilk. The main trouble with this option is that people do not read release notes when updating the parent POM (incl. most users of Dependabot), and in some cases a plugin using some Groovy would continue to compile yet be missing functionality—so we would either need to do a search for affected plugins, or introduce some kind of automated warning.

          Liam Newman added a comment -

          jglick
          It seems like something we could find a way to produce a warning/error for - https://maven.apache.org/enforcer/enforcer-rules/bannedPlugins.html .
          We could make both available to start and then ban gmaven in a later release.

          I understand you have a strong opinion about how groovy should and should not be used in the project, but that is a much larger change. This change, on the other hand, is almost a drop in replacement that unblocked one of our core plugins to build and run on Java 11.

          Liam Newman added a comment - jglick It seems like something we could find a way to produce a warning/error for - https://maven.apache.org/enforcer/enforcer-rules/bannedPlugins.html . We could make both available to start and then ban gmaven in a later release. I understand you have a strong opinion about how groovy should and should not be used in the project, but that is a much larger change. This change, on the other hand, is almost a drop in replacement that unblocked one of our core plugins to build and run on Java 11.

          Jesse Glick added a comment -

          Hacktoberfest idea:

          • Translate all src/main/groovy/**/*.groovy to src/main/java/**/*.java in pipeline-model-definition modules. (Can be done incrementally, in dependency order.)
            • Some but not most src/main/resources/**/*.groovy could also be translated: simple classes which do not need to be CPS-transformed.
          • Remove Groovy source support from plugin-pom, with a warning in the release notes that this would be incompatible for plugins out there which still build Groovy sources via Maven.

          Would reduce the maintenance burden on Declarative Pipeline somewhat, and generally reduce technical debt.

          References:

          Jesse Glick added a comment - Hacktoberfest idea: Translate all src/main/groovy/**/*.groovy to src/main/java/**/*.java in pipeline-model-definition modules. (Can be done incrementally, in dependency order.) Some but not most src/main/resources/**/*.groovy could also be translated: simple classes which do not need to be CPS-transformed. Remove Groovy source support from plugin-pom , with a warning in the release notes that this would be incompatible for plugins out there which still build Groovy sources via Maven. Would reduce the maintenance burden on Declarative Pipeline somewhat, and generally reduce technical debt. References: https://github.com/cloudbees/groovy-cps/pull/59 https://github.com/jenkinsci/groovy-sandbox/pull/32 https://github.com/jenkinsci/plugin-pom/pull/337#issuecomment-677634750 https://github.com/jenkinsci/workflow-cps-plugin/pull/296#pullrequestreview-250485464

            Unassigned Unassigned
            bitwiseman Liam Newman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: