Is there a way to obfuscate exploded/packaged output of jib-maven-plugin with yGuard (or some other obfuscator)?
I can think of a way using other tools such as exec-maven-plugin + jib cli.
Another possible way can be to devise a 3rd party jib-extension or even fork/hack jib-maven-plugin all together.
Maybe someone can share their experience with that.
For context I am trying to ship a Spring Boot application build using Maven and AntRun for yGuard.
I managed to figure it out myself.
Here is my exec-maven-plug + jib cli solution for anyone out there.
To test paste it, adapt it to your environment, and run
mvn clean package -P local.This
pom.xmlis from a multi-module setup, so you may have to refactor or omit the<parent></parent>tag to suit you needs.What it does:
BOOT-INFoutput directorydocker build,docker pushunder the hood through jib clidocker pullat the end (for debug purposes)Here is an associate
jib.yamlfile forjib clito work:I also had to write a small throw-away class to generate custom mapping for unique class and package names for yGuard (apparently it cannot manage to do it on its own):