On Tue, Jun 6, 2017 at 4:38 PM, Ullrich Hafner <[email protected]> wrote:
> java.lang.ClassNotFoundException: hudson.plugins.analysis.core.GlobalSettings
>
> The exception is thrown by the following snippet:
>
> <j:invokeStatic var="settings" 
> className="hudson.plugins.analysis.core.GlobalSettings" method="instanceā€œ/>

Unfortunately you cannot use this tag on classes in plugins, only
Jenkins core and its dependencies, I guess since Jenkins fails to
communicate the `uberClassLoader` to Stapler. At least I recall
running into that problem in the past. Instead find some handy `it`,
`instance`, etc. object already in scope and define an instance method
on it to give you whatever object you really need, keeping the logic
in Java code. In this case `DryTabDetail` could have a method

public List<SomeType> getWarnings() {
    return DuplicateCode.filter(getAnnotations().getSortedAnnotations());
}

and then you would just need to write

<j:forEach var="warning" items="${it.warnings}">

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1FcqnMqQuvuwfRj82RzO%2Bzm0%3D3r9ew-RUbzc%2ByT_KQXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to