Hi.
if (jenkinsVersion >= 1.571) {
// use new <l:icon> tag ...
} else {
// use display icon in traditional way (as <img>)
}
This all seemed a bit clumsy/ugly/messy to me, requiring multiple icon related tags... plugin release management for the shim plugin etc etc. So I decided to try creating a simple <icon> taglib jar (i.e. not putting the <icon> taglib in Jenkins Core). Then, Jenkins Core and whatever plugins wish to upgrade (to using the new <icon> tag) simple add this new taglib as a dependency, independently of each other. So long as the <icon> taglib does not use anything in a newer release of Jenkins, then the plugin should work all the way back down the Jenkins releases:
I have some code here [2]. It works fine from a Jenkins Core perspective. I'm going to change the Credentials plugin now and test that it works on new and old versions of Jenkins. I'm fairly confident it will. The icon taglib is currently in an "icon" module of the root the project. I know that's probably not a good long-term location - if the idea sticks, we can easily move it to a new home.
--
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 jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If there is a bug in your little library that is fixed and released, all plugins using it will probably have to update the dependency and release a new version of the plugin, until it appears in core.
If the library was a plugin all plugins would get the bugfix when the new icon plugin version gets installed.
Robert Sandell
Software Tools Engineer - SW Environment and Product Configuration
Sony Mobile Communications
--
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/YiR-u6wz6lI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
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/YiR-u6wz6lI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
Yes, that’s true, but a bit confusing. In the scenario where many plugins are using the lib in a Jenkins core that doesn’t have it; the plugin that loads first would dictate what version of the lib to use for the other plugins, even though it is bundled in each plugin (unless they use pluginFirstClassLoader), and that could cause confision/issues like the once we have with guava today for example.
But when the user upgrades to a core that has the lib then core will be the one dictating what version of the lib to use.