I need to unzip a spring boot executable jar as a part of my maven build.
I have tried two approaches, one using maven-dependency-plugin
second - maven-antrun-plugin
. Both plugins silently output nothing.
I went to debug maven-dependency-plugin
and it seems like the library used to unzip the jar is not able to understand the executable jar format.
I understand that spring-boot executable jar is not a regular archive (as it has a shell script embedded into it).
My question is, how do I extract files from the jar using maven?
I think a combination exec-maven-plugin
and unzip
command will work but this will make my build unportable, so I would like to avoid it.
EDIT: Here's the outup of antrun plugin:
$ mvn antrun:run@unpack-jar
...
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (unpack-jar) @ subscriber-rpm ---
[INFO] Executing tasks
main:
[unzip] Expanding: D:\path\conf.jar into D:\path\target\config
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
However, D:\path\target\config
is not even created. maven-dependency plugin has a similar result.