I am trying to extract a ZIP file from my current JAR using:
InputStream resource = getClass().getClassLoader().getResourceAsStream(name);
Thanks to @PaulBGD's answer above. It saved me hours to figure out what happened to my system I add the following new snippets into my pom.xml file (which I didn't realize is the root cause before reading Paul's answer):
src/main/resources
true
**/*.version
**/*.properties
**/*.xml
**/*.csv
**/*.txt
**/*.gif
**/*.json
**/*.xlsx
rythm/**
However I didn't take Paul's answer directly, instead I don't think those xlsx files should go through the resource plugin's filtering pipeline, thus I added another resource into pom:
src/main/resources
false
**/*.xlsx
And it fixed my problem without changing the source encoding setting from UTF-8 to ISO-8859-1