-
Bug
-
Resolution: Duplicate
-
Major
-
Jenkins 2.7.1 LTS
workflow-cps-global-lib-plugin 2.5
When attempting to execute a pipeline that loads a library written in Groovy I receive the following exception:
Unsupported expression for CPS transformation @ line -1, column -1
The Groovy class that is referenced is a simple POGO with the class-level annotation
@EqualsAndHashCode
. Removing the annotation resolves the exception for that class.
This is a major problem with the plugin and it almost makes it unusable. For any non-trivial library it will most likely make use of Groovy language features such as class annotations. To remove the annotations would require extensive refactoring throughout the library and introduce a lot of boiler plate.
Lack of support for Groovy class annotations is not explicitly documented (as far as I can see) either in this plugin or in the [workflow-cps-plugin](https://github.com/jenkinsci/workflow-cps-plugin).
A workaround or solution would be very much appreciated!
- duplicates
-
JENKINS-45901 Allow common groovy annotation in Pipeline Shared Library Classes
- Open