'Messages' class in getter methods of Descriptors - where are they defined

21 views
Skip to first unread message

Kamil Dzierżanowski

unread,
Nov 15, 2018, 9:59:52 AM11/15/18
to Jenkins Users
Hi!

In most of the plugins' source code, I can find a 'Messages' class used in the getters of the Descriptor. This class is not present in the source, and is not pulled automatically as a dependency, so the plugins won't compile.
I am probably missing some background on plugin development here, but I don't really have time now to deep-dive into the topic, so I was hoping - maybe there is a shorthand way to explain how this works. I will be grateful for any clues.

Best,
Kamil

Devin Nusbaum

unread,
Nov 15, 2018, 10:08:52 AM11/15/18
to jenkins...@googlegroups.com
These classes are auto-generated from Messages.properties files in the plugins' resource directories. If you run `mvn clean compile` from the command line, everything should work correctly, but if you are using an IDE you may need to manually mark target/generated-sources/localizer as generated source code for them to be recognized correctly. You can find more information at these links: https://jenkins.io/doc/developer/internationalization/i18n-source-code/ and https://wiki.jenkins.io/display/JENKINS/Internationalization#Internationalization-GenerationofMessagesclasses.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6a55c589-bf85-4a6c-ab0e-bb8ce6c1cba7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kamil Dzierżanowski

unread,
Nov 15, 2018, 10:54:17 AM11/15/18
to Jenkins Users
Awesome! Thank you very much Devin.
Reply all
Reply to author
Forward
0 new messages