Reason for executable Jars not resolving icons packs
See original GitHub issueGood day.
There are several open issues (#11, #24) that have a problem of executable jar
(with dependencies being extracted to this executable jar
, instead of linked by manifest to their respective jars) not being able to to resolve icon packs. A workaround was proposed in this post, that suggests to move the icon dependency up the hierarchy. I’ve figured out the reason why it matters: both ikonli.core
and ikonli.<icon pack>
have a org.kordamp.ikonli.IkonHandler
file in META-INF/services
directory. For the application to successfully resolve icons, the ikonli.<icon pack>
's version of the file has to be included in the executable jar
. In certain cases this can be alleviated by altering dependency order (like in IntelliJ). But in other cases (like Gradle’s jar
task) there’s no way of specifying the order in which dependendencies should be extracted (or is there?). Nevertheless, the main point is that this is an issue that has to be handled by library itself, rather than leaving users of this library scratching their heads.
Your response is very much appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5
Top GitHub Comments
Problem solved
For maven-shade-plugin users, add this to your transformers
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
For more information about Resource Transformers, refer to this page
According to the documentation, this should be enough
Or even this