hammock icon indicating copy to clipboard operation
hammock copied to clipboard

Integrate with Capsule packaging tool

Open shamoh opened this issue 9 years ago • 10 comments

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 avatar Oct 07 '16 06:10 shamoh

@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 avatar Oct 15 '16 21:10 johnament

@johnament Yes, example should work. And I believe it could fix CXF uber-jar issue.

shamoh avatar Oct 16 '16 22:10 shamoh

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.

johnament avatar Dec 30 '16 00:12 johnament

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.

shamoh avatar Dec 30 '16 13:12 shamoh

Ok, I've sent you a contributor link. There's also this wiki page: https://github.com/hammock-project/hammock/wiki/PackagingUsingCapsule

johnament avatar Dec 30 '16 13:12 johnament

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.

shamoh avatar Dec 30 '16 14:12 shamoh

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.

shamoh avatar Dec 30 '16 21:12 shamoh

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!

johnament avatar Jan 02 '17 03:01 johnament

oh and RE the build size, are you using normal packaging? or their delayed auto install feature?

johnament avatar Jan 02 '17 03:01 johnament

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)

shamoh avatar Jan 02 '17 09:01 shamoh