{"id":36417871,"url":"https://github.com/chrisdchristo/capsule-maven-plugin","last_synced_at":"2026-01-11T17:01:12.591Z","repository":{"id":19392387,"uuid":"22633611","full_name":"chrisdchristo/capsule-maven-plugin","owner":"chrisdchristo","description":"Capsule Maven Plugin","archived":false,"fork":false,"pushed_at":"2019-12-30T10:21:50.000Z","size":314,"stargazers_count":58,"open_issues_count":2,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-03T12:49:12.095Z","etag":null,"topics":["capsule","java","maven-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisdchristo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-05T06:55:06.000Z","updated_at":"2023-05-17T23:10:14.000Z","dependencies_parsed_at":"2022-09-11T15:31:38.555Z","dependency_job_id":null,"html_url":"https://github.com/chrisdchristo/capsule-maven-plugin","commit_stats":null,"previous_names":["christokios/capsule-maven-plugin","chrischristo/capsule-maven-plugin"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/chrisdchristo/capsule-maven-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdchristo%2Fcapsule-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdchristo%2Fcapsule-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdchristo%2Fcapsule-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdchristo%2Fcapsule-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisdchristo","download_url":"https://codeload.github.com/chrisdchristo/capsule-maven-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdchristo%2Fcapsule-maven-plugin/sbom","scorecard":{"id":279473,"data":{"date":"2025-08-11","repo":{"name":"github.com/chrisdchristo/capsule-maven-plugin","commit":"f878c2fb94d0c06ada1d03ea52eac0dc95733066"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-2qrg-x229-3v8q","Warn: Project is vulnerable to: GHSA-65fg-84f6-3jq3","Warn: Project is vulnerable to: GHSA-f7vh-qwp3-x37m","Warn: Project is vulnerable to: GHSA-fp5r-v3w9-4333","Warn: Project is vulnerable to: GHSA-w9p3-5cr8-m3jj","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-2f88-5hg8-9x2x","Warn: Project is vulnerable to: GHSA-8vhq-qq4p-grq3","Warn: Project is vulnerable to: GHSA-g6ph-x5wf-g337","Warn: Project is vulnerable to: GHSA-jcwr-x25h-x5fh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T15:23:00.250Z","repository_id":19392387,"created_at":"2025-08-17T15:23:00.250Z","updated_at":"2025-08-17T15:23:00.250Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capsule","java","maven-plugin"],"created_at":"2026-01-11T17:00:29.668Z","updated_at":"2026-01-11T17:01:12.577Z","avatar_url":"https://github.com/chrisdchristo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Capsule Maven Plugin\n====================\n\n[![Version](http://img.shields.io/badge/version-1.5.1-blue.svg?style=flat)](https://github.com/chrisdchristo/capsule-maven-plugin/releases)\n[![Maven Central](http://img.shields.io/badge/maven_central-1.5.1-blue.svg?style=flat)](http://mvnrepository.com/artifact/com.github.chrisdchristo/capsule-maven-plugin/)\n[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://opensource.org/licenses/MIT)\n\nA maven plugin to build a [capsule](https://github.com/puniverse/capsule) out of your app.\n\nSee more at [capsule](https://github.com/puniverse/capsule) and the [demo using the plugin](https://github.com/chrisdchristo/capsule-maven-plugin-demo).\n\nA pro? [Skip to the plugin reference](https://github.com/chrisdchristo/capsule-maven-plugin#reference).\n\nRequires java version 1.7+ and maven 3.1.x+\n\nSupports [Capsule v1.0.3](https://github.com/puniverse/capsule/releases/tag/v1.0.3) \u0026 [CapsuleMaven v1.0.3](https://github.com/puniverse/capsule-maven/releases/tag/v1.0.3) and below (It may also work with new versions of Capsule, but use at your own risk).\n\n- [Building From Source](https://github.com/chrisdchristo/capsule-maven-plugin#building-from-source)\n- [Quick Start](https://github.com/chrisdchristo/capsule-maven-plugin#quick-start)\n- [Building Automatically](https://github.com/chrisdchristo/capsule-maven-plugin#building-automatically)\n- [Capsule Contents](https://github.com/chrisdchristo/capsule-maven-plugin#capsule-contents)\n\t- [The Simple Types](https://github.com/chrisdchristo/capsule-maven-plugin#the-simple-types)\n\t- [Custom Builds](https://github.com/chrisdchristo/capsule-maven-plugin#custom-builds)\n\t- [Including Dependencies based on source](https://github.com/chrisdchristo/capsule-maven-plugin#including-dependencies-based-on-source)\n\t- [Including Dependencies based on scope](https://github.com/chrisdchristo/capsule-maven-plugin#including-dependencies-based-on-scope)\n\t- [Include Optional Dependencies](https://github.com/chrisdchristo/capsule-maven-plugin#include-optional-dependencies)\n\t- [Include Transitive Dependencies](https://github.com/chrisdchristo/capsule-maven-plugin#include-transitive-dependencies)\n\t- [Understanding Dependency Scope](https://github.com/chrisdchristo/capsule-maven-plugin#understanding-dependency-scope)\n- [Runtime Resolution](https://github.com/chrisdchristo/capsule-maven-plugin#runtime-resolution)\n- [Really Executable Capsules](https://github.com/chrisdchristo/capsule-maven-plugin#really-executable-capsules-maclinux-only)\n- [Providing Your App System Properties](https://github.com/chrisdchristo/capsule-maven-plugin#providing-your-app-system-properties)\n- [Additional Manifest Entries](https://github.com/chrisdchristo/capsule-maven-plugin#additional-manifest-entries)\n- [Custom File Name](https://github.com/chrisdchristo/capsule-maven-plugin#custom-file-name)\n- [Modes](https://github.com/chrisdchristo/capsule-maven-plugin#modes)\n- [FileSets](https://github.com/chrisdchristo/capsule-maven-plugin#filesets)\n- [DependencySets](https://github.com/chrisdchristo/capsule-maven-plugin#dependencysets)\n- [Custom Capsule Version](https://github.com/chrisdchristo/capsule-maven-plugin#custom-capsule-version)\n- [Caplets](https://github.com/chrisdchristo/capsule-maven-plugin#caplets)\n- [Maven Exec Plugin Integration](https://github.com/chrisdchristo/capsule-maven-plugin#maven-exec-plugin-integration)\n- [Reference](https://github.com/chrisdchristo/capsule-maven-plugin#reference)\n\n## Building From source\n\nClone the project and run a maven install:\n\n```\ngit clone https://github.com/chrisdchristo/capsule-maven-plugin.git\ncd capsule-maven-plugin\nmvn install\n```\n\nAlternatively you can let maven pick up the latest version from [maven central](http://mvnrepository.com/artifact/chrisdchristo/capsule-maven-plugin).\n\n\n## Quick Start\n\nIn the simplest form, you can add the following snippet in your `pom.xml`:\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\t\u003ctype\u003efat\u003c/type\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nAnd then run:\n\n```\nmvn package capsule:build\n```\n\nPlease note that the `package` command must have been executed before the `capsule:build` command can be run.\n\nThe only requirement is to have the `\u003cappClass\u003e` attribute in the configuration. This is the class of your app that contains the main method which will be fired on startup. You must include the package path along with the class name (`hello` is the package and `HelloWorld` is the class name above).\n\nIt is recommended to have specified the `capsule.version` property in your pom so that the capsule plugin knows which version of capsule to use.\nIf none is specified, the default version of Capsule will be used as specified at the top of the readme (which may not be the latest).\n\nYou can also set the `capsule.maven.version` property to tell the plugin which version of CapsuleMaven to use.\n\n\n## Building Automatically\n\nIt is recommended to have an execution setup to build the capsules, thus eliminating you to run an additional maven command to build them.\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cexecutions\u003e\n\t\t\u003cexecution\u003e\n\t\t\t\u003cgoals\u003e\n\t\t\t\t\u003cgoal\u003ebuild\u003c/goal\u003e\n\t\t\t\u003c/goals\u003e\n\t\t\t\u003cconfiguration\u003e\n\t\t\t\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\t\t\t\u003ctype\u003efat\u003c/type\u003e\n\t\t\t\u003c/configuration\u003e\n\t\t\u003c/execution\u003e\n\t\u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\nBy default the `build` goal runs during the package phase.\n\nSo now if you were to run simply `mvn package` then the build goal will execute which will build the capsules into your build directory.\n\nOr alternatively you could use the `maven-exec-plugin` to run your app (as you develop), and then only build the capsule(s) when you want to deploy to a server. This plugin integrates nicely with the `maven-exec-plugin`, [see here](https://github.com/chrisdchristo/capsule-maven-plugin#maven-exec-plugin-integration).\n\n## Capsule Contents\n\nEssentially Capsule can be packaged with as much or as little as you want.\n\nTwo things you need to think about to make up a capsule are, the app jar and the dependency jars. And these, as you will see, can be optionally included!\n\nThe source of dependencies is taken from two places. Firstly, from the ```\u003cdependencies\u003e``` tag defined under the root ```\u003cproject\u003e``` tag, namely the app dependencies. Secondly the dependencies defined under the ```\u003cdependencies\u003e``` tag within the ```\u003cplugin\u003e``` tag for this plugin, also known as the plugin dependencies.\n\nYou have the option to include all, none or some of the dependencies.\n\nThis can be done with various flags as you will see later, based on their source, scope, their ```optional``` flag and if they are direct (root) or indirect (transitive) dependencies.\n\n### The Simple Types\n\nGenerally, the most common types of capsules are the following three:\n\n- `fat`: This capsule jar will contain your app's jar as well as **all** its dependencies. When the fat-jar is run, then Capsule will simply setup the app and run it.\n- `thin`: This capsule jar will contain your app's classes but **no** dependencies. Capsule will resolve these dependencies at runtime (in the cache).\n- `empty`: This capsule will not even include your app, or any of its dependencies. It will only contain the name of your app declared in the jar's manifest, along with capsule's classes. Capsule will read the manifest entry ```Application``` and resolve the app and its dependencies in Capsule's own cache (default `~/.capsule`).\n\nThese are just the popular types that fit neatly into a box, and thus the plugin provides a simple flag to build these. Namely the ```\u003ctype\u003e``` field can be set to ```fat```, ```thin``` or ```empty```.\n\nTo build a ```fat``` capsule simply include the following:\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t  \u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t  \u003ctype\u003efat\u003c/type\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nAnd similarly for ```thin``` and ```empty```:\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t  \u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t  \u003ctype\u003ethin\u003c/type\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t  \u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t  \u003ctype\u003eempty\u003c/type\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nNote that the three simple types apply to only the ```compile``` and ```runtime``` scoped dependencies (but cover the transitive dependencies). More on this later.\n\nIf none of these quite fit, then the plugin can accommodate a wide range of different setups, it is encouraged you build the capsule with your own specific requirements without being bogged down on the three specific types listed above.\n\n### Custom Builds\n\n(Note, to make a custom build, the ```\u003ctype\u003e``` tag must not be set!)\n\nIf the types defined in the ```\u003ctype\u003e``` don't quite fit your needs and you need something a little different, then you can easily customise the jar to a vast array of options.\n\nEssentially it comes down to the following scenarios; whether or not to include the app or resolve it at runtime; what dependencies to include based on their source, scope etc and which to resolve at runtime; and same question for the transitive dependencies.\n\nSo to cover all these ideas, you have the following flags:\n\n```\n\u003cincludeApp\u003efalse\u003c/includeApp\u003e\n\u003cincludeAppDep\u003efalse\u003c/includeAppDep\u003e\n\u003cincludePluginDep\u003efalse\u003c/includePluginDep\u003e\n\u003cincludeTransitiveDep\u003efalse\u003c/includeTransitiveDep\u003e\n\u003cincludeCompileDep\u003efalse\u003c/includeCompileDep\u003e\n\u003cincludeRuntimeDep\u003efalse\u003c/includeRuntimeDep\u003e\n\u003cincludeProvidedDep\u003efalse\u003c/includeProvidedDep\u003e\n\u003cincludeSystemDep\u003efalse\u003c/includeSystemDep\u003e\n\u003cincludeTestDep\u003efalse\u003c/includeTestDep\u003e\n\u003cincludeOptionalDep\u003efalse\u003c/includeOptionalDep\u003e\n\n\u003cresolveApp\u003efalse\u003c/resolveApp\u003e\n\u003cresolveAppDep\u003efalse\u003c/resolveAppDep\u003e\n\u003cresolvePluginDep\u003efalse\u003c/resolvePluginDep\u003e\n\u003cresolveTransitiveDep\u003efalse\u003c/resolveTransitiveDep\u003e\n\u003cresolveCompileDep\u003efalse\u003c/resolveCompileDep\u003e\n\u003cresolveRuntimeDep\u003efalse\u003c/resolveRuntimeDep\u003e\n\u003cresolveProvidedDep\u003efalse\u003c/resolveProvidedDep\u003e\n\u003cresolveSystemDep\u003efalse\u003c/resolveSystemDep\u003e\n\u003cresolveTestDep\u003efalse\u003c/resolveTestDep\u003e\n\u003cresolveOptionalDep\u003efalse\u003c/resolveOptionalDep\u003e\n```\n\nAll of the above settings are ```false``` by default.\n\nThese ```includeXYZ``` flags essentially tell the plugin what to include/embed in the jar. Of course if there are any of these that you exclude from the capsule jar, and in turn they are needed for the launch, then runtime resolution will be needed by marking some ```resolveXYZ``` to ```true```.\n\nA ```fat``` capsule essentially is equivalent to having only the following set to ```true```:\n\n```\n\u003cincludeApp\u003etrue\u003c/includeApp\u003e\n\u003cincludeAppDep\u003etrue\u003c/includeAppDep\u003e\n\u003cincludePluginDep\u003etrue\u003c/includePluginDep\u003e\n\u003cincludeCompileDep\u003etrue\u003c/includeCompileDep\u003e\n\u003cincludeRuntimeDep\u003etrue\u003c/includeRuntimeDep\u003e\n\u003cincludeTransitiveDep\u003etrue\u003c/includeTransitiveDep\u003e\n```\n\nSo as you can see, we include the app, and all its compile and runtime dependencies (including the transitive dependencies).\n\nSo if a ```thin``` capsule is desired, it can be done like so:\n\n```\n\u003cincludeApp\u003etrue\u003c/includeApp\u003e\n\u003cresolveAppDep\u003etrue\u003c/resolveAppDep\u003e\n\u003cresolvePluginDep\u003etrue\u003c/resolvePluginDep\u003e\n\u003cresolveCompileDep\u003etrue\u003c/resolveCompileDep\u003e\n\u003cresolveRuntimeDep\u003etrue\u003c/resolveRuntimeDep\u003e\n\u003cresolveTransitiveDep\u003etrue\u003c/resolveTransitiveDep\u003e\n```\n\nAnd similarly an ```empty``` capsule is done with the following:\n\n```\n\u003cresolveApp\u003etrue\u003c/resolveApp\u003e\n\u003cresolveAppDep\u003etrue\u003c/resolveAppDep\u003e\n\u003cresolvePluginDep\u003etrue\u003c/resolvePluginDep\u003e\n\u003cresolveCompileDep\u003etrue\u003c/resolveCompileDep\u003e\n\u003cresolveRuntimeDep\u003etrue\u003c/resolveRuntimeDep\u003e\n\u003cresolveTransitiveDep\u003etrue\u003c/resolveTransitiveDep\u003e\n```\n\n### Including Dependencies based on source\n\nThe source of dependencies is taken from two places. Firstly, from the ```\u003cdependencies\u003e``` tag defined under the root ```\u003cproject\u003e``` tag, namely the app dependencies. Secondly the dependencies defined under the ```\u003cdependencies\u003e``` tag within the ```\u003cplugin\u003e``` tag for this plugin, also known as the plugin dependencies.\n\nYou can choose to include a source by using ```\u003cincludeAppDep\u003etrue\u003c/includeAppDep\u003e``` or ```\u003cincludePluginDep\u003etrue\u003c/includeAppDep\u003e```.\n\n\n### Including Dependencies based on scope\n\nYou can include certain dependencies by setting the scope of the dependency to something that you will be including in the built capsule.\n\nAll possible options for scope are ```compile```, ```runtime```, ```provided```, ```system``` or ```test```.\n\nNote that the plugin dependencies can only have scope ```compile```, ```runtime``` or ```system```.\n\nSo you could set your dependency to scope ```runtime``` like so:\n\n```\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.google.guava\u003c/groupId\u003e\n\t\u003cartifactId\u003eguava\u003c/artifactId\u003e\n\t\u003cversion\u003e17.0\u003c/version\u003e\n\t\u003cscope\u003eruntime\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nAnd then mark the necessary flags:\n\n```\n\u003cconfiguration\u003e\n\t\u003cincludeRuntimeDep\u003etrue\u003c/includeRuntimeDep\u003e\n\u003c/configuration\u003e\n```\n\nor if you want to resolve them instead:\n\n```\n\u003cconfiguration\u003e\n\t\u003cresolveRuntimeDep\u003etrue\u003c/resolveRuntimeDep\u003e\n\u003c/configuration\u003e\n```\n\nSo the above will not include the dependencies marked with ```runtime``` scope, however it will resolve them at launch.\n\nJust make sure you have a source also set to true for example, ```\u003cincludeAppDep\u003etrue\u003cincludeAppDep\u003e``` or ```\u003cresolveAppDep\u003etrue\u003cresolveAppDep\u003e```.\n\n### Include Optional Dependencies\n\nDependencies can be marked with the ```\u003coptional\u003e``` tag, for example:\n\n```\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.google.guava\u003c/groupId\u003e\n\t\u003cartifactId\u003eguava\u003c/artifactId\u003e\n\t\u003coptional\u003etrue\u003c/optional\u003e\n\u003c/dependency\u003e\n```\n\nTo include optional dependencies in the capsule, you simply need to turn on a flag:\n\n```\n\u003cconfiguration\u003e\n\t\u003cincludeOptionalDep\u003etrue\u003c/includeOptionalDep\u003e\n\u003c/configuration\u003e\n```\n\nor if you want to resolve them instead:\n\n```\n\u003cconfiguration\u003e\n\t\u003cresolveOptionalDep\u003etrue\u003c/resolveOptionalDep\u003e\n\u003c/configuration\u003e\n```\n\nJust make sure you have a source also set to true for example, ```\u003cincludeAppDep\u003etrue\u003cincludeAppDep\u003e``` or ```\u003cresolveAppDep\u003etrue\u003cresolveAppDep\u003e```.\n\n### Include Transitive Dependencies\n\nTransitive dependencies are essentially the deep dependencies or in other wors the dependencies of your dependencies.\n\nYou can include transitive dependencies by setting the configuration property `includeTransitiveDep` to true:\n\n```\n\u003cconfiguration\u003e\n\t\u003cincludeTransitiveDep\u003etrue\u003c/includeTransitiveDep\u003e\n\u003c/configuration\u003e\n```\n\nor if you want to resolve them instead:\n\n```\n\u003cconfiguration\u003e\n\t\u003cresolveTransitiveDep\u003etrue\u003c/resolveTransitiveDep\u003e\n\u003c/configuration\u003e\n```\n\nJust make sure you have a source also set to true for example, ```\u003cincludeAppDep\u003etrue\u003cincludeAppDep\u003e``` or ```\u003cresolveAppDep\u003etrue\u003cresolveAppDep\u003e```.\n\n### Understanding Dependency Scope\n\nIn maven, you can essentially define the following five scopes for your dependencies; ```compile```, ```runtime```, ```provided```, ```system``` and ```test```.\n\nYou set the scope on each of the project's direct dependencies. Although transitive dependencies will have defined scope also, this only applies specifically to their own project.\n\nThe scope of transitive dependencies in relation to the main project will be directly affected by the scope of its parent dependency. We call this the 'direct-scope'.\n\nAlso note, that transitive dependencies with scope other than ```compile``` or ```runtime``` are not applicable to the main project and thus are **excluded always**.\n\nSo for each direct dependency with scope:\n\n* ```compile```\n\t- ```compile``` transitive dependencies have ```compile``` direct-scope.\n  - ```runtime``` transitive dependencies have ```runtime``` direct-scope.\n* ```runtime```\n\t- ```compile``` transitive dependencies have ```compile``` direct-scope.\n\t- ```runtime``` transitive dependencies have ```runtime``` direct-scope.\n* ```provided```\n\t- ```compile``` \u0026 ```runtime``` transitive dependencies have ```provided``` direct-scope.\n* ```system```\n  - ```compile``` \u0026 ```runtime``` transitive dependencies have ```system``` direct-scope.\n* ```test```\n\t- ```compile``` \u0026 ```runtime``` transitive dependencies have ```test``` direct-scope.\n\nSo, all the ```includeXYZ``` and ```resolveXYZ``` follow the above rules.\n\n\n\n\n## Runtime Resolution\n\nTo perform the resolution at runtime (such as needed by the ```thin``` and ```empty``` types), the capsule will include the necessary code to do this (namely the ```MavenCaplet```). This adds slightly to the overall file size of the generated capsule jar. This additional code is obviously mandatory if any dependencies (or the app itself) needs to be resolved at runtime.\n\nTo build the capsule without this additional code, make sure none of the ```resolveXYZ``` flags are set to true (by default all set to false or the ```\u003ctype\u003e``` is set to ```fat```).\n\nIf making a custom build and resolution is needed at runtime, then add the desired ```resolveXYZ``` tags in the ```\u003cconfiguration\u003e``` tag like so:\n\n```\n\u003cconfiguration\u003e\n\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\u003cresolveApp\u003etrue\u003cresolveApp\u003e\n\t\u003cresolveCompileDep\u003etrue\u003cresolveCompileDep\u003e\n\u003c/configuration\u003e\n```\n\n## Really Executable Capsules (Mac/Linux only)\n\nIt is possible to `chmod+x` a jar so it can be run without needing to prefix the command with `java -jar`. You can see more info about this concept [here](https://github.com/brianm/really-executable-jars-maven-plugin) and [here](http://skife.org/java/unix/2011/06/20/really_executable_jars.html).\n\nThe plugin can build really executable jars for you automatically!\n\nAdd the `\u003cchmod\u003etrue\u003c/chmod\u003e` to your configuration (default is false).\n\n```\n\u003cconfiguration\u003e\n\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\u003cchmod\u003etrue\u003c/chmod\u003e\n\u003c/configuration\u003e\n```\n\nThe plugin will then output the really executables with the extension `.x`.\n\n```\ntarget/my-app-1.0-cap.jar\ntarget/my-app-1.0-cap.x\n```\n\nSo normally you would run the capsule like so:\n\n```\njava -jar target/my-app-1.0-cap.jar\n```\n\nHowever with the really executable builds, you can alternatively run the capsule nice and cleanly:\n\n```\n./target/my-app-1.0-cap.x\n```\n\nor\n\n```\nsh target/my-app-1.0-cap.x\n```\n\n##### Trampoline\n\nWhen a capsule is launched, two processes are involved: first, a JVM process runs the capsule launcher, which then starts up a second, child process that runs the actual application. The two processes are linked so that killing or suspending one, will do the same for the other. While this model works well enough in most scenarios, sometimes it is desirable to directly launch the process running the application, rather than indirectly. This is supported by \"capsule trampoline\". [See more here at capsule](http://www.capsule.io/user-guide/#the-capsule-execution-process).\n\nEssentially the concept defines that that when you execute the built Capsule jar, it will simply just output (in text) the full command needed to run the app (this will be a long command with all jvm and classpath args defined). The idea is then to just copy/paste the command and execute it raw.\n\nIf you would like to build 'trampoline' executable capsules you can add the `\u003ctrampoline\u003etrue\u003c/trampoline\u003e` flag to the plugin's configuration:\n\n```\n\u003cconfiguration\u003e\n\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\u003ctrampoline\u003etrue\u003c/trampoline\u003e\n\u003c/configuration\u003e\n```\n\nThis will build `.tx` files like so:\n\n```\ntarget/my-app-1.0-cap.jar\ntarget/my-app-1.0-cap.tx\n```\n\nWhich you can run:\n\n```\n./target/my-app-1.0-cap.tx\n```\n\nThis will output the command which you then have to copy and paste and run it yourself manually, thus ensuring you have only one process for your app.\n\n## Providing your app System Properties\n\nCapsule also supports providing your app with system properties. This can be done at runtime but its also convenient to define some properties at build time too.\n\nSimply add the `\u003cproperties\u003e` tag in the plugin's configuration and declare any properties.\n\n```\n\u003cconfiguration\u003e\n\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\u003cproperties\u003e\n\t\t\u003cproperty\u003e\n\t\t\t\u003ckey\u003eboo\u003c/key\u003e\n\t\t\t\u003cvalue\u003eya\u003c/value\u003e\n\t\t\u003c/property\u003e\n\t\u003c/properties\u003e\n\u003c/configuration\u003e\n```\n\nThen, anywhere in your app's code you call upon this system property:\n\n```\npackage hello;\npublic class HelloWorld {\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(System.getProperty(\"boo\")); // outputs 'ya'\n\t}\n}\n```\n\n## Additional Manifest Entries\n\nCapsule supports a number of manifest entries to configure your app to your heart's content. See the full reference [here](http://www.capsule.io/reference/#manifest-attributes).\n\nSo for e.g if you would like to set the `JVM-Args`:\n\n```\n\u003cconfiguration\u003e\n\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\u003cmanifest\u003e\n\t\t\u003centry\u003e\n\t\t\t\u003ckey\u003eJVM-Args\u003c/key\u003e\n\t\t\t\u003cvalue\u003e-Xmx512m\u003c/value\u003e\n\t\t\u003c/entry\u003e\n\t\u003c/manifest\u003e\n\u003c/configuration\u003e\n```\n\nNote you do **not** need `Main-Class`, `Application-Class`, `Application`, `Dependencies` and `System-Properties` as these are generated automatically by the plugin.\n\n## Custom File Name\n\nThe output capsule jar's name is as per the `\u003cfinalName\u003e` tag with the appending of the ```-capsule```, by default.\n\nEssentially this is ```\u003cfinalName\u003e-capsule.jar``` so for example your app might be ```app-capsule.jar```.\n\nIf you wish to have custom text, then you can optionally set either of parameters ```fileName``` and ```fileDesc``` which make up the format:\n\n```\n\u003cfileName\u003e\u003cfileDesc\u003e.jar\n```\n\nSo for example if you'd like to have your output capsule jar like 'my-amazing-app-cap.jar' then you would do the following:\n\n```\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    \u003cplugin\u003e\n      \u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n      \u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n      \u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n      \u003cconfiguration\u003e\n        \u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n        \u003cfileName\u003emy-amazing-app\u003c/fileName\u003e\n        \u003cfileDesc\u003e-cap\u003c/fileDesc\u003e\n      \u003c/configuration\u003e\n    \u003c/plugin\u003e\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n## Modes\n\nCapsule supports the concept of modes, which essentially means defining your app jar into different ways depending on certain characteristics.\nYou define different modes for your app by setting specific manifest and/or system properties for each mode. So for e.g you could have a test mode which will define a test database connection, and likewise a production mode which will define a production database connection.\nYou can then easily run your capsule in a specific mode by adding the `-Dcapsule.mode=MODE` argument at the command line. See more at [capsule modes](http://www.capsule.io/user-guide/#modes-platform--and-version-specific-configuration).\n\nThe maven plugin supports a convenient way to define modes for your capsule (include the below in the `\u003cconfiguration\u003e` tag).\n\n```\n\u003cmodes\u003e\n\t\u003cmode\u003e\n\t\t\u003cname\u003eproduction\u003c/name\u003e\n\t\t\u003cproperties\u003e\n\t\t\t\u003cproperty\u003e\n\t\t\t\t\u003ckey\u003edbConnectionServer\u003c/key\u003e\n\t\t\t\t\u003cvalue\u003eaws.amazon.example\u003c/value\u003e\n\t\t\t\u003c/property\u003e\n\t\t\u003c/properties\u003e\n\t\t\u003cmanifest\u003e\n\t\t\t\u003centry\u003e\n\t\t\t\t\u003ckey\u003eJVM-Args\u003c/key\u003e\n\t\t\t\t\u003cvalue\u003e-Xmx1024m\u003c/value\u003e\n\t\t\t\u003c/entry\u003e\n\t\t\u003c/manifest\u003e\n\t\u003c/mode\u003e\n\u003c/modes\u003e\n```\n\nA mode must have the `\u003cname\u003e` tag, and you may define two things for each mode, namely, `\u003cproperties\u003e` and `\u003cmanifest\u003e` (in exactly the same syntax as above).\n\nIf the mode is activated at runtime (`-Dcapsule.mode=production`) then the properties listed in the mode will completely override the properties set in the main configuration. Thus, only the properties listed in the mode section will be available to the app.\n\nHowever, the mode's manifest entries will be appended to the existing set of entries defined in the main section (unless any match up, then the mode's entry will override).\n\nOf course, you can define multiple modes.\n\n## FileSets\n\nIf you'd like to copy over specific files from some local folder then you can use the\n assembly style `\u003cfileSets\u003e` in the `\u003cconfiguration\u003e` tag.\n\n```\n\u003cfileSets\u003e\n\t\u003cfileSet\u003e\n\t\t\u003cdirectory\u003econfig/\u003c/directory\u003e\n\t\t\u003coutputDirectory\u003econfig/\u003c/outputDirectory\u003e\n\t\t\u003cincludes\u003e\n\t\t\t\u003cinclude\u003emyconfig.yml\u003c/include\u003e\n\t\t\u003c/includes\u003e\n\t\u003c/fileSet\u003e\n\u003c/fileSets\u003e\n```\n\nSo from above we copy over the myconfig.yml file that we have in our config folder and place it within the config directory in the capsule jar (the plugin will create this folder in the capsule jar).\n\nYou specify a number of `\u003cfileSet\u003e` which must contain the `\u003cdirectory\u003e` (the location of the folder to copy), the `\u003coutputDirectory\u003e` (the destination directory within the capsule jar) and finally a set of `\u003cinclude\u003e` to specify which files from the `\u003cdirectory\u003e` to copy over.\n\nThe `\u003cinclude\u003e` tag supports a single wildcard `*`. So for example `\u003cinclude\u003e*.yml\u003c/include\u003e`, `\u003cinclude\u003emyconfig*\u003c/include\u003e` or `\u003cinclude\u003emy*.yml\u003c/include\u003e` can work.\n\n\n## DependencySets\n\nIf you'd like to copy over specific files from files embedded in some dependency then you can use the\n assembly style `\u003cdependencySets\u003e` in the `\u003cconfiguration\u003e` tag.\n\n```\n\u003cdependencySets\u003e\n\t\u003cdependencySet\u003e\n\t\t\u003cgroupId\u003ecom.google.guava\u003c/groupId\u003e\n\t\t\u003cartifactId\u003eguava\u003c/artifactId\u003e\n\t\t\u003coutputDirectory\u003econfig/\u003c/outputDirectory\u003e\n\t\t\u003cincludes\u003e\n\t\t\t\u003cinclude\u003eMETA-INF/MANIFEST.MF\u003c/include\u003e\n\t\t\u003c/includes\u003e\n\t\u003c/dependencySet\u003e\n\u003c/dependencySets\u003e\n```\n\nSo from the above we pull the manifest file from within Google Guava's jar and place it within the config directory in the capsule jar (the plugin will create this folder in the capsule jar).\n\nYou specify a number of `\u003cdependencySet\u003e` which must contain the coords (`\u003cgroupdId\u003e`, `\u003cartifactId\u003e`, `\u003cclassifier\u003e`, `\u003cversion\u003e`) of a project dependency (the classifier and version are optional), the `\u003coutputDirectory\u003e` (the destination directory within the capsule jar) and finally a set of `\u003cinclude\u003e` to specify which files from the dependency to copy over.\n\nThe `\u003cinclude\u003e` tag supports a single wildcard `*`. So for example `\u003cinclude\u003eMETA-INF/*\u003c/include\u003e`, `\u003cinclude\u003e*MANIFEST.MF\u003c/include\u003e` or `\u003cinclude\u003eMETA-INF/*.MF\u003c/include\u003e` can work.\n\n\nYou could also copy over the whole dependency directly if you leave out the ```includes``` tag:\n\n```\n\u003cdependencySets\u003e\n\t\u003cdependencySet\u003e\n\t\t\u003cgroupId\u003ecom.google.guava\u003c/groupId\u003e\n\t\t\u003cartifactId\u003eguava\u003c/artifactId\u003e\n\t\t\u003coutputDirectory\u003econfig/\u003c/outputDirectory\u003e\n\t\u003c/dependencySet\u003e\n\u003c/dependencySets\u003e\n```\n\nYou could also copy over the whole dependency in an **unpacked** form if you mark the ```\u003cunpack\u003etrue\u003c/unpack\u003e``` flag.\n\n```\n\u003cdependencySets\u003e\n\t\u003cdependencySet\u003e\n\t\t\u003cgroupId\u003ecom.google.guava\u003c/groupId\u003e\n\t\t\u003cartifactId\u003eguava\u003c/artifactId\u003e\n\t\t\u003coutputDirectory\u003econfig/\u003c/outputDirectory\u003e\n\t\t\u003cunpack\u003etrue\u003c/unpack\u003e\n\t\u003c/dependencySet\u003e\n\u003c/dependencySets\u003e\n```\n\n\n## Custom Capsule Version\n\nThs plugin can support older or newer versions of capsule (at your own risk). You can specify a maven property for the capsule version (this will be the version of capsule to package within the build of the capsules).\n\n```\n\u003cproperties\u003e\n\t\u003ccapsule.version\u003e0.6.0\u003c/capsule.version\u003e\n\u003c/properties\u003e\n```\nOtherwise, the default version of capsule will be used automatically. This is recommended.\n\n## Caplets\n\nCapsule supports defining your own Capsule class by extending the `Capsule.class`. If you want to specify your custom Capsule class, add a manifest entry pointing to it:\n\n```\n\u003cconfiguration\u003e\n\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\t\u003ccaplets\u003eMyCapsule\u003c/caplets\u003e\n\u003c/configuration\u003e\n```\n\nIf you have more than one, just add a space in between each one for e.g `\u003ccaplets\u003eMyCapsule MyCapsule2\u003c/caplets\u003e`.\n\nIf you want to use a caplet that's not a local class (i.e from a dependency) then you must specify the full coordinates of it like so:\n\n`\u003ccaplets\u003eco.paralleluniverse:capsule-daemon:0.1.0\u003c/caplets\u003e`\n\nAnd you can mix local and non-local caplets too:\n\n`\u003ccaplets\u003eMyCapsule co.paralleluniverse:capsule-daemon:0.1.0\u003c/caplets\u003e`\n\nSee more info on [caplets](http://www.capsule.io/caplets/).\n\n## Maven Exec Plugin Integration\n\nThe [maven exec plugin](http://www.mojohaus.org/exec-maven-plugin/) is a useful tool to run your jar all from within maven (using its classpath).\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003eorg.codehaus.mojo\u003c/groupId\u003e\n\t\u003cartifactId\u003eexec-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${maven.exec.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003cmainClass\u003ehello.HelloWorld\u003c/mainClass\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nYou can then run your normal jar by:\n\n```\nmvn package exec:java\n```\n\nNotice that the exec plugin provides a configuration where you can specify the `\u003cmainClass\u003e` as well as other fields such as `\u003csystemProperties\u003e`. The Capsule plugin provides the ability to pull this config and apply it to the built capsules, thus saving you from having to enter it twice (once at the exec plugin and second at the capsule plugin).\n\nIn the capsule plugin you can set the `\u003cexecPluginConfig\u003e` tag to do this:\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003cexecPluginConfig\u003eroot\u003c/execPluginConfig\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\nThe value `root` will tell the capsule plugin to pull the config from the `\u003cconfiguration\u003e` element at the root of the exec plugin.\n\nIf you are using executions within the exec plugin like so:\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003eorg.codehaus.mojo\u003c/groupId\u003e\n\t\u003cartifactId\u003eexec-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${maven.exec.plugin.version}\u003c/version\u003e\n\t\u003cexecutions\u003e\n\t\t\u003cexecution\u003e\n\t\t\t\u003cid\u003edefault-cli\u003c/id\u003e\n\t\t\t\u003cgoals\u003e\n\t\t\t\t\u003cgoal\u003ejava\u003c/goal\u003e\n\t\t\t\u003c/goals\u003e\n\t\t\t\u003cconfiguration\u003e\n\t\t\t\t\u003cmainClass\u003ehello.HelloWorld\u003c/mainClass\u003e\n\t\t\t\u003c/configuration\u003e\n\t\t\u003c/execution\u003e\n\t\u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\nThen you can specify the `\u003cexecPluginConfig\u003e` to the ID of the execution:\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003cexecPluginConfig\u003edefault-cli\u003c/execPluginConfig\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n##### How the capsule plugin maps the config from the exec plugin\n\nThe capsule plugin will map values from the exec plugin:\n\n```\nmainClass -\u003e appClass\nsystemProperties -\u003e properties\narguments -\u003e JVM-Args (manifest entry)\n```\n\nSo the `\u003cmainClass\u003e` element in the exec's `\u003cconfiguration\u003e` will be the `\u003cappClass\u003e` in the capsules's `\u003cconfiguration\u003e`.\n\n##### A complete solution\n\nSo essentially you can setup as follows:\n\n```\n\u003cplugin\u003e\n\t\u003cgroupId\u003eorg.codehaus.mojo\u003c/groupId\u003e\n\t\u003cartifactId\u003eexec-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${maven.exec.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003cmainClass\u003ehello.HelloWorld\u003c/mainClass\u003e\n\t\t\u003csystemProperties\u003e\n\t\t\t\u003cproperty\u003e\n\t\t\t\t\u003ckey\u003epropertyName1\u003c/key\u003e\n\t\t\t\t\u003cvalue\u003epropertyValue1\u003c/value\u003e\n\t\t\t\u003c/property\u003e\n\t\t\u003c/systemProperties\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\t\t\u003cexecPluginConfig\u003eroot\u003c/execPluginConfig\u003e\n\t\u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n##### Overriding the exec plugin config\n\nNote that if you do specify the `\u003cappClass\u003e`, `\u003cproperties\u003e` or `JVM-Args` (in the `\u003cmanifest\u003e`) of the capsule plugin, then these will override the config of the exec plugin.\n\n## Reference\n\n* `\u003cappClass\u003e`: The class with the main method (with package declaration) of your app that the capsule should run. This can be optional too, if you are using the maven exec plugin and have specified a `execPluginConfig`.\n* `\u003cchmod\u003e (Optional)`: If executable (chmod +x) versions of the capsules should be built in the form of '.x' files (Applicable for Mac/Unix style systems). See [here](https://github.com/brianm/really-executable-jars-maven-plugin) and [here](http://skife.org/java/unix/2011/06/20/really_executable_jars.html) for more info. Defaults to false.\n* `\u003ctrampoline\u003e (Optional)`: This will create trampoline style executable capsules in the form of '.tx' files. See more info [here](https://github.com/chrisdchristo/capsule-maven-plugin#trampoline).\n* `\u003coutputDir\u003e (Optional)`: Specifies the output directory. Defaults to the `${project.build.directory}`.\n* `\u003cexecPluginConfig\u003e (Optional)`: Specifies the ID of an execution within the exec-maven-plugin. The configuration from this execution will then be used to configure the capsules. If you specify 'root' then the `\u003cconfiguration\u003e` at root will be used instead of a particular execution. The exec's `\u003cmainClass\u003e` will map to Capsule's `\u003cappClass\u003e`. The exec's `\u003csystemProperties\u003e` will map to capsule's `\u003cproperties\u003e`. If you specify this tag then the `\u003cappClass\u003e` tag does not need to present.\n* `\u003cproperties\u003e (Optional)`: The system properties to provide the app with.\n* `\u003ctype\u003e (Optional)`: Can be either ```empty```, ```thin``` or ```fat```. Tells the plugin to build a capsule based on of these predefined builds. If present, the plugin will ignore all of the ```\u003cincludeXYZ\u003e``` and ```\u003cresolveXYZ\u003e```.\n* `\u003csetManifestRepos\u003e (Optional)`: Can either be ```true``` or ```false```, default is ```false```. This will append a manifest entry ```Repositories``` with values as defined by the project's ```pom.xml```.\n* `\u003cincludeApp\u003e (Optional)`: Specify whether the app itself should be embedded. Default is true. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeAppDep\u003e (Optional)`: Specify whether normal app dependencies should be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludePluginDep\u003e (Optional)`: Specify whether the plugin dependencies should be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeTransitiveDep\u003e (Optional)`: Specify whether transitive dependencies should also be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeCompileDep\u003e (Optional)`: Specify whether compile scope dependencies should be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeRuntimeDep\u003e (Optional)`: Specify whether runtime scope dependencies should be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeProvidedDep\u003e (Optional)`: Specify whether provided scope dependencies should be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeSystemDep\u003e (Optional)`: Specify whether system scope dependencies should be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeTestDep\u003e (Optional)`: Specify whether test scope dependencies should be embedded. Default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cincludeOptionalDep\u003e (Optional)`: Specify whether optional dependencies should also be embedded. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveApp\u003e (Optional)`: Specifies whether the app should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveAppDep\u003e (Optional)`: Specifies whether the app dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolvePluginDep\u003e (Optional)`: Specifies whether the plugin dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveTransitiveDep\u003e (Optional)`: Specifies whether the transitive dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveCompileDep\u003e (Optional)`: Specifies whether the compile scoped dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveRuntimeDep\u003e (Optional)`: Specifies whether the runtime scoped dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveProvidedDep\u003e (Optional)`: Specifies whether the system scoped dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveSystemDep\u003e (Optional)`: Specifies whether the system scoped dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveTestDep\u003e (Optional)`: Specifies whether the test scoped dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cresolveOptionalDep\u003e (Optional)`: Specifies whether the optional dependencies should be resolved at launch. The default is false. Also, this is ignored if ```\u003ctype\u003e``` is present.\n* `\u003cmanifest\u003e (Optional)`: The set of additional manifest entries, for e.g `JVM-Args`. See [capsule](http://www.capsule.io/reference/) for an exhaustive list. Note you do **not** need `Main-Class`, `Application-Class`, `Application`, `Dependencies` and `System-Properties` as these are generated automatically.\n* `\u003cmodes\u003e (Optional)`: Define a set of `\u003cmode\u003e` with its own set of `\u003cproperties\u003e` and `\u003cmanifest\u003e` entries to categorise the capsule into different modes. The mode can be set at runtime. [See more here](https://github.com/chrisdchristo/capsule-maven-plugin#modes).\n* `\u003cfileSets\u003e (Optional)`: Define a set of `\u003cfileSet\u003e` to copy over files into the capsule. [See more here](https://github.com/chrisdchristo/capsule-maven-plugin#filesets-and-dependencysets).\n* `\u003cdependencySets\u003e (Optional)`: Define a set of `\u003cdependencySet\u003e` to copy over files contained within remote dependencies into the capsule. [See more here](https://github.com/chrisdchristo/capsule-maven-plugin#filesets-and-dependencysets).\n* `\u003ccaplets\u003e (Optional)`: Define a list of caplets (custom Capsule classes). [See more here](https://github.com/chrisdchristo/capsule-maven-plugin#caplets).\n* `\u003cfileName\u003e (Optional)`: The custom text for the file name part of the name of the output jar. By default this is ```\u003cfinalName\u003e````.\n* `\u003cfileDesc\u003e (Optional)`: The custom text for the descriptor part of the name of the output jar. This combined with the ```\u003cfileName\u003e``` tag creates the output name of the jar.\n\n```\n\u003c!-- BUILD CAPSULES --\u003e\n\u003cplugin\u003e\n\t\u003cgroupId\u003ecom.github.chrisdchristo\u003c/groupId\u003e\n\t\u003cartifactId\u003ecapsule-maven-plugin\u003c/artifactId\u003e\n\t\u003cversion\u003e${capsule.maven.plugin.version}\u003c/version\u003e\n\t\u003cconfiguration\u003e\n\n\t\t\u003cappClass\u003ehello.HelloWorld\u003c/appClass\u003e\n\n\t\t\u003coutputDir\u003etarget\u003c/outputDir\u003e\n\t\t\u003ccaplets\u003eMyCapsule MyCapsule2\u003c/caplets\u003e\n\n\t\t\u003ctype\u003efat\u003c/type\u003e\n\t\t\u003cchmod\u003etrue\u003c/chmod\u003e\n\t\t\u003ctrampoline\u003etrue\u003c/trampoline\u003e\n\t\t\u003csetManifestRepos\u003etrue\u003c/setManifestRepos\u003e\n\n\t\t\u003cincludeApp\u003etrue\u003c/includeApp\u003e\n\t\t\u003cincludeAppDep\u003efalse\u003c/includeAppDep\u003e\n\t\t\u003cincludePluginDep\u003efalse\u003c/includePluginDep\u003e\n\t\t\u003cincludeTransitiveDep\u003efalse\u003c/includeTransitiveDep\u003e\n\t\t\u003cincludeCompileDep\u003efalse\u003c/includeCompileDep\u003e\n\t\t\u003cincludeRuntimeDep\u003efalse\u003c/includeRuntimeDep\u003e\n\t\t\u003cincludeProvidedDep\u003efalse\u003c/includeProvidedDep\u003e\n\t\t\u003cincludeSystemDep\u003efalse\u003c/includeSystemDep\u003e\n\t\t\u003cincludeTestDep\u003efalse\u003c/includeTestDep\u003e\n\t\t\u003cincludeOptionalDep\u003efalse\u003c/includeOptionalDep\u003e\n\n\t\t\u003cresolveApp\u003efalse\u003c/resolveApp\u003e\n\t\t\u003cresolveAppDep\u003efalse\u003c/resolveAppDep\u003e\n\t\t\u003cresolvePluginDep\u003efalse\u003c/resolvePluginDep\u003e\n\t\t\u003cresolveTransitiveDep\u003efalse\u003c/resolveTransitiveDep\u003e\n\t\t\u003cresolveCompileDep\u003efalse\u003c/resolveCompileDep\u003e\n\t\t\u003cresolveRuntimeDep\u003efalse\u003c/resolveRuntimeDep\u003e\n\t\t\u003cresolveProvidedDep\u003efalse\u003c/resolveProvidedDep\u003e\n\t\t\u003cresolveSystemDep\u003efalse\u003c/resolveSystemDep\u003e\n\t\t\u003cresolveTestDep\u003efalse\u003c/resolveTestDep\u003e\n\t\t\u003cresolveOptionalDep\u003efalse\u003c/resolveOptionalDep\u003e\n\n\t\t\u003cexecPluginConfig\u003eroot\u003c/execPluginConfig\u003e\n\t\t\u003cfileName\u003emy-amazing-app\u003c/fileName\u003e\n\t\t\u003cfileDesc\u003e-cap\u003c/fileDesc\u003e\n\n\t\t\u003cproperties\u003e\n\t\t\t\u003cproperty\u003e\n\t\t\t\t\u003ckey\u003epropertyName1\u003c/key\u003e\n\t\t\t\t\u003cvalue\u003epropertyValue1\u003c/value\u003e\n\t\t\t\u003c/property\u003e\n\t\t\u003c/properties\u003e\n\n\t\t\u003cmanifest\u003e\n\t\t\t\u003centry\u003e\n\t\t\t\t\u003ckey\u003eJVM-Args\u003c/key\u003e\n\t\t\t\t\u003cvalue\u003e-Xmx512m\u003c/value\u003e\n\t\t\t\u003c/entry\u003e\n\t\t\t\u003centry\u003e\n\t\t\t\t\u003ckey\u003eMin-Java-Version\u003c/key\u003e\n\t\t\t\t\u003cvalue\u003e1.8.0\u003c/value\u003e\n\t\t\t\u003c/entry\u003e\n\t\t\u003c/manifest\u003e\n\n\t\t\u003cmodes\u003e\n\t\t\t\u003cmode\u003e\n\t\t\t\t\u003cname\u003eproduction\u003c/name\u003e\n\t\t\t\t\u003cproperties\u003e\n\t\t\t\t\t\u003cproperty\u003e\n\t\t\t\t\t\t\u003ckey\u003edbConnectionServer\u003c/key\u003e\n\t\t\t\t\t\t\u003cvalue\u003eaws.amazon.example\u003c/value\u003e\n\t\t\t\t\t\u003c/property\u003e\n\t\t\t\t\u003c/properties\u003e\n\t\t\t\t\u003cmanifest\u003e\n\t\t\t\t\t\u003centry\u003e\n\t\t\t\t\t\t\u003ckey\u003eJVM-Args\u003c/key\u003e\n\t\t\t\t\t\t\u003cvalue\u003e-Xmx1024m\u003c/value\u003e\n\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\u003c/manifest\u003e\n\t\t\t\u003c/mode\u003e\n\t\t\u003c/modes\u003e\n\n\t\t\u003cfileSets\u003e\n\t\t\t\u003cfileSet\u003e\n\t\t\t\t\u003cdirectory\u003econfig/\u003c/directory\u003e\n\t\t\t\t\u003coutputDirectory\u003econfig/\u003c/outputDirectory\u003e\n\t\t\t\t\u003cincludes\u003e\n\t\t\t\t\t\u003cinclude\u003emyconfig.yml\u003c/include\u003e\n\t\t\t\t\u003c/includes\u003e\n\t\t\t\u003c/fileSet\u003e\n\t\t\u003c/fileSets\u003e\n\n\t\t\u003cdependencySets\u003e\n\t\t\t\u003cdependencySet\u003e\n\t\t\t  \u003cgroupId\u003ecom.google.guava\u003c/groupId\u003e\n\t\t\t  \u003cartifactId\u003eguava\u003c/artifactId\u003e\n\t\t\t  \u003cversion\u003eoptional\u003c/version\u003e\n\t\t\t  \u003coutputDirectory\u003econfig/\u003c/outputDirectory\u003e\n\t\t\t  \u003c!--\u003cunpack\u003etrue\u003c/unpack\u003e--\u003e\n\t\t\t  \u003cincludes\u003e\n\t\t\t    \u003cinclude\u003eMETA-INF/MANIFEST.MF\u003c/include\u003e\n\t\t\t  \u003c/includes\u003e\n\t\t\t\u003c/dependencySet\u003e\n\t\t\u003c/dependencySets\u003e\n\n\t\u003c/configuration\u003e\n\t\u003cexecutions\u003e\n\t\t\u003cexecution\u003e\n\t\t\t\u003cgoals\u003e\n\t\t\t\t\u003cgoal\u003ebuild\u003c/goal\u003e\n\t\t\t\u003c/goals\u003e\n\t\t\u003c/execution\u003e\n\t\u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\n## License\n\nThis project is released under the [MIT license](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisdchristo%2Fcapsule-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisdchristo%2Fcapsule-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisdchristo%2Fcapsule-maven-plugin/lists"}