{"id":15494900,"url":"https://github.com/fracpete/bootstrapp","last_synced_at":"2025-07-28T19:10:07.666Z","repository":{"id":144520056,"uuid":"240856072","full_name":"fracpete/bootstrapp","owner":"fracpete","description":"Command-line tool for bootstrapping Java applications by using Maven dependencies and/or external jar files.","archived":false,"fork":false,"pushed_at":"2025-05-28T20:06:27.000Z","size":9420,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-28T21:20:47.727Z","etag":null,"topics":["bootstrapping","debian-packaging","docker","java","maven","rpm-packaging"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fracpete.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-16T08:21:36.000Z","updated_at":"2025-05-28T20:06:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"aca7042d-8e3a-443e-8bb1-fbf5255b9320","html_url":"https://github.com/fracpete/bootstrapp","commit_stats":{"total_commits":116,"total_committers":3,"mean_commits":"38.666666666666664","dds":"0.025862068965517238","last_synced_commit":"52a88bc1471ba6c1324eb4141e88179a666690a6"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/fracpete/bootstrapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fbootstrapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fbootstrapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fbootstrapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fbootstrapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fracpete","download_url":"https://codeload.github.com/fracpete/bootstrapp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Fbootstrapp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267569990,"owners_count":24109178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bootstrapping","debian-packaging","docker","java","maven","rpm-packaging"],"created_at":"2024-10-02T08:15:33.946Z","updated_at":"2025-07-28T19:10:07.588Z","avatar_url":"https://github.com/fracpete.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bootstrapp\nCommand-line tool for bootstrapping Java applications by using Maven dependencies \nand/or external jar files. It allows you to generate cross-platform applications, \nby using shell scripts for Linux/Mac and batch files for Windows, or Linux \npackages for Debian (`.deb`) and/or Redhat (`.rpm`). [Docker](https://www.docker.com/) \nimages can be generated as well by generating `Dockerfile` output.\n\n\n## Command-line options\n\n```\nBootstrapping Java applications with Maven dependencies and/or jar files.\n\n\nUsage: [--help] [-m DIR] [-u FILE] [-j DIR] [-n NAME] [-V VERSION]\n       [-d DEPENDENCY...] [-D DEPENDENCY_FILE...]\n       [-J JAR_OR_DIR...] [-x EXCLUSION...] [-r REPOSITORY...] [-C]\n       [-s] [-S JAR_OR_DIR...] [-p FILE] -o DIR [-c CLASSNAME]\n       [-v JVM...] [-e] [-l] [-b] [--deb] [--deb_snippet FILE] [--rpm]\n       [--rpm_snippet FILE] [--docker] [--docker_base_image IMAGE]\n       [--docker_snippet FILE] [-z]\n\nOptions:\n-m, --maven_home DIR\n\tThe directory with a local Maven installation to use instead of the\n\tdownloaded one.\n\n-u, --maven_user_settings FILE\n\tThe file with the maven user settings to use other than\n\t$HOME/.m2/settings.xml.\n\n-j, --java_home DIR\n\tThe Java home to use for the Maven execution.\n\n-n, --name NAME\n\tThe name to use for the project in the pom.xml. Also used as library\n\tdirectory and executable name when generating Debian/Redhat packages.\n\n-V, --version VERSION\n\tThe version to use for the project in the pom.xml\n\n-d, --dependency DEPENDENCY\n\tThe maven dependencies to use for bootstrapping the application\n\t(group:artifact:version), e.g.: nz.ac.waikato.cms.weka:weka-dev:3.9.4\n\n-D, --dependency_file DEPENDENCY_FILE\n\tThe file(s) with maven dependencies to use for bootstrapping the\n\tapplication (group:artifact:version), one dependency per line.\n\n-J, --external-jar JAR_OR_DIR\n\tThe external jar or directory with jar files to also include in the\n\tapplication.\n\n-x, --exclusion EXCLUSION\n\tThe maven artifacts to exclude from all the dependencies\n\t('group:artifact').\n\n-r, --repository REPOSITORY\n\tThe maven repository to use for bootstrapping the application (id;name;\n\turl), e.g.: bedatadriven;bedatadriven public repo;\n\thttps://nexus.bedatadriven.com/content/groups/public/\n\n-C, --clean\n\tIf enabled, the 'clean' goals gets executed.\n\n-s, --sources\n\tIf enabled, source jars of the Maven artifacts will get downloaded as\n\twell and stored in a separated directory.\n\n-S, --external-source JAR_OR_DIR\n\tThe external source jar or directory with source jar files to also\n\tinclude in the application.\n\n-p, --pom_template FILE\n\tThe alternative template for the pom.xml to use.\n\n-o, --output_dir DIR\n\tThe directory to output the bootstrapped application in.\n\n-c, --main_class CLASSNAME\n\tThe main class to execute after bootstrapping the application.\n\n-v, --jvm JVM\n\tThe parameters to pass to the JVM before launching the application.\n\n-e, --scripts\n\tIf enabled, shell/batch scripts get generated to launch the main class.\n\n-l, --launch\n\tIf enabled, the supplied main class will get launched.\n\n-b, --spring_boot\n\tIf enabled, a spring-boot jar is generated utilizing the main class\n\t(single jar with all dependencies contained).\n\n--deb\n\tIf enabled, a Debian .deb package is generated. Required tools: fakeroot,\n\tdpkg-deb\n\n--deb_snippet FILE\n\tThe custom Maven pom.xml snippet for generating a Debian package.\n\n--rpm\n\tIf enabled, a Redhat .rpm package is generated.\n\n--rpm_snippet FILE\n\tThe custom Maven pom.xml snippet for generating a Redhat package.\n\n--docker\n\tIf enabled, a Dockerfile is generated.\n\n--docker_base_image IMAGE\n\tThe base image to use for the docker image, e.g.,\n\t'openjdk:11-jdk-slim-buster'.\n\n--docker_snippet FILE\n\tThe file with custom docker instructions.\n\n-z, --compress_dir_structure\n\tIf enabled, the directory structure gets compressed (ie 'target' left\n\tout). However, side-effect in combination with '--clean' is that the\n\t'pom.xml' disappears.\n```\n\n## Examples\n\n**Note:**  The following examples use [Weka](https://www.cs.waikato.ac.nz/ml/weka/)\nas the application that we bootstrap. Since Weka is released under the\n[GPLv3](https://www.gnu.org/licenses/gpl-3.0.txt) license, which requires you to\nprovide the sources alongside the binaries, we always set the flag to include\nthe *sources* as well. For other licenses, like [MIT](https://opensource.org/licenses/MIT) \nor [Apache 2.0](https://opensource.org/licenses/Apache-2.0), you do not need\nto do that. Also, for projects that are only used in-house and not publicly\navailable, then the requirement to bundle the source code as well, does not\napply either. However, I consider it good practice to always bundle the source \ncode with the binaries. ;-) \n\n\n### Cross-platform\n\nThe following example will bootstrap Weka 3.9.4 (incl. sources)\nin directory `./out` and create start scripts (shell/batch) for\nWeka's GUIChooser, using 1GB of heap size:\n\n```\njava -jar bootstrapp-X.Y.Z-spring-boot.jar \\\n  -C \\\n  -d nz.ac.waikato.cms.weka:weka-dev:3.9.4 \\\n  -s \\\n  -o ./out \\\n  -v -Xmx1g \\\n  -c weka.gui.GUIChooser \\\n  -e\n```\n\nThe same example from within Java:\n\n```java\nimport com.github.fracpete.bootstrapp.Main;\nimport java.io.File;\n\npublic static class TestBootstrapp {\n  \n  public static void main(String[] args) throws Exception {\n    Main main = new Main();\n    String result = main\n        .clean(true)\n        .dependencies(\"nz.ac.waikato.cms.weka:weka-dev:3.9.4\")\n        .sources(true)\n        .outputDir(new File(\"./out\"))\n        .jvm(\"-Xmx1g\")\n        .mainClass(\"weka.gui.GUIChooser\")\n        .scripts(true)\n        .execute();\n    if (result != null)\n      System.err.println(result);\n  }\n}\n```\n\n### Debian package\n\nInstead of generating a cross-platform application, the following example\nwill generated a .deb package for Debian-based Linux distributions:\n\n```\njava -jar bootstrapp-X.Y.Z-spring-boot.jar \\\n  -C \\\n  -d nz.ac.waikato.cms.weka:weka-dev:3.9.4 \\\n  -s \\\n  -o ./out \\\n  -v -Xmx1g \\\n  -c weka.gui.GUIChooser \\\n  -n weka\n  -V 3.9.4\n  --deb\n```\n\nAnd again, from within Java:\n\n```java\nimport com.github.fracpete.bootstrapp.Main;\nimport java.io.File;\n\npublic static class TestBootstrapp {\n  \n  public static void main(String[] args) throws Exception {\n    Main main = new Main();\n    String result = main\n        .clean(true)\n        .dependencies(\"nz.ac.waikato.cms.weka:weka-dev:3.9.4\")\n        .sources(true)\n        .outputDir(new File(\"./out\"))\n        .jvm(\"-Xmx1g\")\n        .mainClass(\"weka.gui.GUIChooser\")\n        .name(\"weka\")\n        .version(\"3.9.4\")\n        .debian(true)\n        .execute();\n    if (result != null)\n      System.err.println(result);\n  }\n}\n```\n\n**Note:** The *name* is used as package name and executable for launching the\napplication, in this case you will get `/usr/bin/weka`.\n\n\n### Docker\n\nThe following example generates a `Dockerfile` for Weka 3.9.4, which allows you\nto launch Weka from within a Docker container using `/bootstrapp/weka-3.9.4.sh` \n(`name-version.sh`). In order to get the Java Swing user interface working, \nsome additional libraries need to get installed on top of the `openjdk:11-jdk-slim-buster` base image \n([docker.additional](src/main/resources/com/github/fracpete/bootstrapp/docker.additional)). \n\n```\njava -jar bootstrapp-X.Y.Z-spring-boot.jar \\\n  --dependency nz.ac.waikato.cms.weka:weka-dev:3.9.4 \\\n  --sources\n  --output_dir ./out \\\n  --clean \\\n  --jvm -Xmx1g \\\n  --main_class weka.gui.GUIChooser \\\n  --name weka \\\n  --version 3.9.4 \\\n  --docker \\\n  --docker_base_image openjdk:11-jdk-slim-buster \\\n  --docker_snippet ./docker.additional\n```\n\nThe command-line in Java code:\n\n```java\nimport com.github.fracpete.bootstrapp.Main;\nimport java.io.File;\n\npublic static class TestBootstrapp {\n  \n  public static void main(String[] args) throws Exception {\n    Main main = new Main();\n    String result = main\n        .dependencies(\"nz.ac.waikato.cms.weka:weka-dev:3.9.4\")\n        .sources(true)\n        .outputDir(new File(\"./out\"))\n        .clean(true)\n        .jvm(\"-Xmx1g\")\n        .mainClass(\"weka.gui.GUIChooser\")\n        .name(\"weka\")\n        .version(\"3.9.4\")\n        .docker(true)\n        .dockerBaseImage(\"openjdk:11-jdk-slim-buster\")\n        .dockerSnippet(new File(\"./docker.additional\"))\n        .execute();\n    if (result != null)\n      System.err.println(result);\n  }\n}\n```\n\nBuild the docker image as follows (tagging it as `weka394`):\n\n```\ncd ./out\n[sudo] docker build -t weka394 .\n```\n\nIf not already done in the current session, you need to expose your xhost in \norder to allow the Docker container to display the Weka user interface using \nyour local X-Server:\n\n```\nxhost +local:root\n```\n\nLaunch the `weka394` image:\n\n```\n[sudo] docker run -it --env=\"DISPLAY\" \\\n  -v \"/tmp/.X11-unix:/tmp/.X11-unix:rw\" \\\n  weka394:latest \\\n  /bootstrapp/weka-3.9.4.sh\n```\n\n**NB:** Windows and Mac users can refer to [this MOA blog](https://moa.cms.waikato.ac.nz/how-to-use-moa-in-docker/)\nfor details on how to get it working on their platforms.\n\n\n## Releases\n\nBelow are executable spring-boot jars for download that can be executed\nvia `java -jar XYZ.jar [options]`:\n\n* [0.1.13](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.13/bootstrapp-0.1.13-spring-boot.jar)\n* [0.1.12](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.12/bootstrapp-0.1.12-spring-boot.jar)\n\nOld Releases:\n\n* [0.1.11](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.11/bootstrapp-0.1.11-spring-boot.jar)\n[0.1.10](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.10/bootstrapp-0.1.10-spring-boot.jar), \n[0.1.9](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.9/bootstrapp-0.1.9-spring-boot.jar), \n[0.1.8](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.8/bootstrapp-0.1.8-spring-boot.jar), \n[0.1.7](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.7/bootstrapp-0.1.7-spring-boot.jar), \n[0.1.6](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.6/bootstrapp-0.1.6-spring-boot.jar), \n[0.1.5](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.5/bootstrapp-0.1.5-spring-boot.jar), \n[0.1.4](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.4/bootstrapp-0.1.4-spring-boot.jar), \n[0.1.3](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.3/bootstrapp-0.1.3-spring-boot.jar), \n[0.1.2](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.2/bootstrapp-0.1.2-spring-boot.jar), \n[0.1.1](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.1/bootstrapp-0.1.1-spring-boot.jar), \n[0.1.0](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.1.0/bootstrapp-0.1.0-spring-boot.jar), \n[0.0.3](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.0.3/bootstrapp-0.0.3-spring-boot.jar), \n[0.0.2](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.0.2/bootstrapp-0.0.2-spring-boot.jar), \n[0.0.1](https://github.com/fracpete/bootstrapp/releases/download/bootstrapp-0.0.1/bootstrapp-0.0.1-spring-boot.jar)\n\n\n## Maven\n\n```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.github.fracpete\u003c/groupId\u003e\n      \u003cartifactId\u003ebootstrapp\u003c/artifactId\u003e\n      \u003cversion\u003e0.1.13\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffracpete%2Fbootstrapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffracpete%2Fbootstrapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffracpete%2Fbootstrapp/lists"}