Discussion:
'Messages' class in getter methods of Descriptors - where are they defined
Kamil Dzierżanowski
2018-11-15 14:59:52 UTC
Permalink
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
--
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-users+***@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.
Devin Nusbaum
2018-11-15 15:08:40 UTC
Permalink
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/ <https://jenkins.io/doc/developer/internationalization/i18n-source-code/> and https://wiki.jenkins.io/display/JENKINS/Internationalization#Internationalization-GenerationofMessagesclasses <https://wiki.jenkins.io/display/JENKINS/Internationalization#Internationalization-GenerationofMessagesclasses>.
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
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6a55c589-bf85-4a6c-ab0e-bb8ce6c1cba7%40googlegroups.com <https://groups.google.com/d/msgid/jenkinsci-users/6a55c589-bf85-4a6c-ab0e-bb8ce6c1cba7%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/B401C80D-1001-4B68-9382-E1CCFE673D40%40cloudbees.com.
For more options, visit https://groups.google.com/d/optout.
Kamil Dzierżanowski
2018-11-15 15:54:16 UTC
Permalink
Awesome! Thank you very much Devin.
Post by Devin Nusbaum
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
https://jenkins.io/doc/developer/internationalization/i18n-source-code/
and *https://wiki.jenkins.io/display/JENKINS/Internationalization#Internationalization-GenerationofMessagesclasses
<https://wiki.jenkins.io/display/JENKINS/Internationalization#Internationalization-GenerationofMessagesclasses>.*
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
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/6a55c589-bf85-4a6c-ab0e-bb8ce6c1cba7%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/6a55c589-bf85-4a6c-ab0e-bb8ce6c1cba7%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7dd05efb-273a-4722-adf7-78b9fbe74ea2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...