Integrate with Capsule packaging tool
Parallel Universe' Capsule (http://www.capsule.io/) is an open-source packaging and deployment tool for JVM applications.
IMO Capsule packaging is better than common fat jar created by Maven Shade plugin. Capsule provides nested jar, there are no file name conflicts, no need to merge same files into single one.
@shamoh did you mean to include this in examples? Or documentation perhaps? The only shaded output is
- dist-micrprofile
- util-cxf
the CXF one is because of an issue specifically with running CXF in uber-jars. microprofile is specifically to simplify the coordinates.
@johnament Yes, example should work. And I believe it could fix CXF uber-jar issue.
BTW, I've since dropped util-cxf since the packaging is on the user. It also turns out you can run hammock using spring boot maven plugin. I'm planning to put together documentation around that.
OK, I'm now working on an example and a blog post about Hammock and Capsule using together. If possible it would be great to be moved to hammock-examples repo.
Ok, I've sent you a contributor link. There's also this wiki page: https://github.com/hammock-project/hammock/wiki/PackagingUsingCapsule
Maybe you could also mention executions part of plugin configuration, e.g.:
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
And my must say I have different experience with capsule size. For me capsule jar is little bit smaller than shaded one. I don't know reason, maybe version of JDK.
Example app is prepared (https://github.com/shamoh/hammock-capsule) but blog post will be done next year. :( Let me know if you see there any mistakes. Thanks.
Looks good. Would it make sense to be able to execute the example as a test? That's my aim for the next round of updates to the examples. Also, I'd be happy to include it in the examples repo if you want to commit there. But up to you. Thanks for picking this up!
oh and RE the build size, are you using normal packaging? or their delayed auto install feature?
Sure, I'll provide test.
What do you mean by "normal packaging" or "auto install feature"? I don't see context. Please, try to build my example and compare size. For me the hammock-capsule-0.1-SNAPSHOT-capsule.jar has 10MB. (Maven 3.3.9, Java 1.8.0_112)