GetStatic Jelly Tag

21 views
Skip to first unread message

Bryan Stopp

unread,
Dec 7, 2023, 11:44:35 AM12/7/23
to Jenkins Developers
(Caveat: I'm making the assumption here that the classloader functions the same when running stand-alone vs mvn hpi:run)

This seems to only function on Jenkins class-loader context. It does not find my packages/classes in my plugin for referencing static values.

Is this the intended behavior, or is my previously stated assumption incorrect? (And if so how to fix?)

-B


Jesse Glick

unread,
Dec 7, 2023, 1:54:11 PM12/7/23
to jenkin...@googlegroups.com
On Thu, Dec 7, 2023 at 11:44 AM Bryan Stopp <bryan...@gmail.com> wrote:
I'm making the assumption here that the classloader functions the same when running stand-alone vs mvn hpi:run

Probably an invalid assumption.

I would advise never using the https://commons.apache.org/proper/commons-jelly/tags.html#core:getStatic or https://commons.apache.org/proper/commons-jelly/tags.html#core:invokeStatic tags at all. Do as much as you possibly can in a Java class associated with the view, and have the Jelly XML limit itself to calling methods on that from JEXL, like ${it.someProperty} or ${descriptor.someMethod(someObject)}.

Daniel Beck

unread,
Dec 7, 2023, 2:34:26 PM12/7/23
to jenkin...@googlegroups.com
On Thu, Dec 7, 2023 at 5:44 PM Bryan Stopp <bryan...@gmail.com> wrote:
It does not find my packages/classes in my plugin for referencing static values.

Bryan Stopp

unread,
Dec 7, 2023, 4:13:55 PM12/7/23
to jenkin...@googlegroups.com
Thanks Daniel & Jesse. I didn't see the referenced ticket - it is what I'm seeing. I'll update to use a reference rather than the taglib.

-B

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/gx6mjqzOFKQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0_kN%3DaTgRVBgTprMG_tBB9x38j60%2Bg_N_d_4JJJrnAWQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages