Open alexsedova opened 6 years ago
Found two scripts bitbucket. groovy and artifactory.groovy. The problem is it tries to download classes by name not by classpath. To avoid that it needs to create a special object using Class.forName(String: "whole-package-class-path") and call this class constructor using getDeclaredConstructor() default method.
Jenkins as a code setup has good numbers of groovy scripts for many different plugins configurations. However, we don't want users to install all plugins the setup is supporting. One of the option to prevent compilation during Jenkins startup is to use a def dynamic variable and whole classpath. It seems some scripts don't meet these requirements and fail during startup with a compilation error. For example, artifactory.groovy.