Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Latest commit

 

History

History
54 lines (35 loc) · 1.9 KB

File metadata and controls

54 lines (35 loc) · 1.9 KB

capsule

Package and Deploy JVM Applications with Capsule.

A capsule is a single executable JAR that contains everything your application needs to run either in the form of embedded files or as declarative metadata. More at capsule.io

usage

Capsule integration is provided via Maven Profiles using the capsule-maven-plugin.

  • Write a capsule.activator file inside the src/etc directory

  • Open a console and type: mvn clean package

  • It builds a [app-name]-capsule-fat.jar file inside the target directory

It generates a fat capsule by default inside the target directory.

If you are a Gradle user, checkout the capsule gradle example.

profile activation

The capsule Maven profile is activated by the presence of the src/etc/capsule.activator file (file content doesn't matter, just the file presence).

options

The integration provides the following defaults:

<properties>
  <capsule.resolve>false</capsule.resolve>
  <capsule.chmod>true</capsule.chmod>
  <capsule.trampoline>false</capsule.trampoline>
  <capsule.JVM-Args>-Xms512m -Xmx512m</capsule.JVM-Args>
  <capsule.types>fat</capsule.types>
  <capsule.caplets>Capsule</capsule.caplets>
</properties>

For example, if you need or prefer a thin capsule, follow these steps:

  • Open your pom.xml
  • Go to the <properties> section and add/set:
<properties>
  <capsule.resolve>true</capsule.resolve>
  <capsule.types>thin</capsule.types>
</properties>
  • Open a console and type: mvn clean package

You'll find your thin capsule in the target directory.