{"id":40898901,"url":"https://github.com/hdsdi3g/linux-springboot-packager","last_synced_at":"2026-01-22T02:28:58.761Z","repository":{"id":142524841,"uuid":"259883988","full_name":"hdsdi3g/linux-springboot-packager","owner":"hdsdi3g","description":"Create Linux DEB, RPM packages and Windows installers for a Spring Boot project","archived":false,"fork":false,"pushed_at":"2024-04-10T13:17:33.000Z","size":99,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T09:40:06.326Z","etag":null,"topics":["deb","dpkg","installer","java","liquibase","maven","nsis","nsis-installer","rpm","rpm-packages","springboot","winsw"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hdsdi3g.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}},"created_at":"2020-04-29T09:38:18.000Z","updated_at":"2023-12-26T23:30:03.000Z","dependencies_parsed_at":"2024-04-08T22:04:35.671Z","dependency_job_id":null,"html_url":"https://github.com/hdsdi3g/linux-springboot-packager","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/hdsdi3g/linux-springboot-packager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdsdi3g%2Flinux-springboot-packager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdsdi3g%2Flinux-springboot-packager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdsdi3g%2Flinux-springboot-packager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdsdi3g%2Flinux-springboot-packager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hdsdi3g","download_url":"https://codeload.github.com/hdsdi3g/linux-springboot-packager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hdsdi3g%2Flinux-springboot-packager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28651582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":["deb","dpkg","installer","java","liquibase","maven","nsis","nsis-installer","rpm","rpm-packages","springboot","winsw"],"created_at":"2026-01-22T02:28:58.699Z","updated_at":"2026-01-22T02:28:58.752Z","avatar_url":"https://github.com/hdsdi3g.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Linux Packager\n\nThis script collection will create:\n - a [RPM package](man-make-springboot-rpm.md)\n - a [DEB package](man-make-springboot-deb.md)\n - a [Windows self installer](man-make-springboot-exe.md) (via [NSIS](https://sourceforge.net/projects/nsis/) and [WinSW](https://github.com/winsw/winsw))\n\nFor a **Spring Boot** project, runned as service, or as command line interface (CLI / shell), and build npm/front during packaging.\n\nVia _bash_, on Linux (RHEL/Debian) and Windows/WSL, not tested on macOS.\n\n**See the md/man files on the project root for more informations.**\n\nFree feel to add corrections and/or new features (it's really not rocket science).\n\nAnd you can found two others scripts (see below):\n\n - a RPM package to install this scripts collection\n - a DEB package to install this scripts collection\n\n[![Tests on Ubuntu](https://github.com/hdsdi3g/linux-springboot-packager/actions/workflows/tests-ubuntu.yml/badge.svg)](https://github.com/hdsdi3g/linux-springboot-packager/actions/workflows/tests-ubuntu.yml)\n\n[![Shellcheck analysing](https://github.com/hdsdi3g/linux-springboot-packager/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/hdsdi3g/linux-springboot-packager/actions/workflows/shellcheck.yml)\n\n[![Install app DEB on Ubuntu](https://github.com/hdsdi3g/linux-springboot-packager/actions/workflows/install-ubuntu.yml/badge.svg)](https://github.com/hdsdi3g/linux-springboot-packager/actions/workflows/install-ubuntu.yml)\n\n## make-springboot-deb and make-springboot-rpm\n\nFor build RPMs and/or DEB files, you will need, in addition to `maven` and `java`:\n - `realpath`\n - `basename`\n - `pandoc`\n - `xmlstarlet`\n - `mktemp`\n - `dpkg-deb` (DEB)\n - `lintian` (DEB)\n - `rpmbuild` (RPM)\n - `rpmlint` (RPM)\n - and optionnaly `npm`\n\n### Install the DEB/RPM files\n\nThe builded DEB/RPM will run some install/uninstall scripts and do a few things, apart from that, it's a classic, non-signed DEB and RPM files.\n\nThe setup script check the presence of `bash`, `man`, `useradd` (not for CLI), and `systemctl` (idem), and will deploy:\n - A man file ([template here](src/usr/lib/linux-springboot-packager/templates/template-man.md)), as `man artifactId`\n - some example files (not for CLI):\n   - An configuration file (`application.yml`)\n   - An configuration log file (`log4j2.xml` or `logback.xml`)\n   - An default file\n - The application `jar` file\n - A `Systemd` service file, deployed, ready to run (not for CLI)\n - A command line runner (only for CLI)\n - THIRD-PARTY and LICENCE files if available.\n - An user/group and home dir for this user, as service name, to run the created service (not for CLI).\n - A log directory ready to get log files (not for CLI)\n\nAll templates are in the `src/usr/lib/linux-springboot-packager/templates` directory.\n\nJava presence will _not be_ checked by the installer. The default service file will expect to found it in `/usr/bin/java`. Change it as you what after setup.\n\nBefore deploy files, the service will be stopped (if exists and if running). After deploy files, it will be enabled, at boot, but not started (not for CLI).\n\nRun the setup with:\n\n#### DEB\n\n```bash\n# Install / upgrade\nsudo dpkg -i \u003cartifactid-version.deb\u003e\n\n# Remove\nsudo dpkg -r \u003cartifactid\u003e\n```\n\n#### RPM\n\n```bash\n# Install / upgrade\nsudo rpm -U \u003cartifactid-version.rpm\u003e\n\n# Remove\nsudo rpm -e \u003cartifactid\u003e\n\n# Remove \"all\"\nsudo rpm -e --allmatches \u003cartifactid\u003e\n```\n\nYou can run manually service with:\n\n```bash\nrunuser -u \u003cSERVICE_NAME\u003e \\\n  -- java -Dlogging.config=/etc/\u003cSERVICE_NAME\u003e/log4j2.xml|logback.xml \\\n  -jar /usr/lib/\u003cSERVICE_NAME\u003e/\u003cartifactId\u003e-bin.jar \\\n  --spring.config.location=/etc/\u003cSERVICE_NAME\u003e/application.yml\n```\n\nAnd can run CLI with:\n```bash\n\u003cartifactId\u003e [params] [...]\n```\n\n## CLI or Service mode\n\nBy default, all service options (systemd, user, logs...) will be setup.\n\nTo switch to CLI mode, just add a POM proprerty on project pom (or it's ancestry) as:\n\n```xml\n\u003cproperties\u003e\n  \u003clinux-springboot-packager.kind\u003ecli\u003c/linux-springboot-packager.kind\u003e\n\u003c/properties\u003e\n```\n\nAnd you **MUST** provide a **MAN** page. Free feel to generate it as you want. The _first_ `.man` file founded on project directory will be used. This call will be done after generate JAR with Maven, so you can link `mvn package` and *man* generation.\n\nOn Service building, the man page will be provided (see `template-man.md`).\n\nOn all cases, the man page will be displayed with:\n\n```bash\nman \u003cartifactId\u003e\n```\n\n## make-springboot-exe\n\nExecutable files, and uninstaller will be placed on `C:\\Program Files\\\u003cproject name\u003e`, and \"variable files\" like log and application.yml in `C:\\ProgramData\\\u003cproject name\u003e`.\n\nAn uninstall script add an entry in \"Add/Remove programs\" is setup.\n\nSetup script are crafted to be simply \"over installed\": the next setup will uninstall the previous one (with a service stop and remove), but keep the actual \"variable files\".\n\nBy default, the service run will need a valid `application.yml` and `log4j2.xml`. Samples/examples are provided.\n\nActually, Windows builds don't support logback/log4j automatic switch as Linux does. `log4j.xml` still is here the only option now.\n\nCLI option is not setup for Windows.\n\n### Install the EXE files\n\nJust run setup files with admin rights. If you use WinSW with a _.NET_ dependency, you should install it before.\n\nAfter the setup, with the help of WinSW, a Windows service in declared, but not started and set to Manual.\n\nFree feel to edit `servicewinsw.xml` before build the setup, or edit the production file `winsw.xml`. Please to refer to WinSW documentation.\n\nDon't forget to setup a compatible JVM, and put java.exe directory in PATH.\n\n## How to make a DEB/RPM installer for this app\n\nDo a\n\n```bash\n./make-deb.bash\n./make-rpm.bash\n```\n\nYou will need `git`, `realpath`, `man`, `pandoc`, `rpmlint`, `rpmbuild`, `rpm`, `dpkg-deb` and `lintian` to run it.\n\nIt's fonctionnal for RPM on _Debian-like_ hosts (to build it, not run it), and vice-versa on DEB on _RHEL-like_ hosts.\n\nDon't forget to install/setup `java`, `maven`, `pandoc`...\n\n## Run internal self tests\n\nDo a\n\n```bash\n./run-tests.bash\n```\n\nIt will create a test DEB and RPM files for a demo java project on `test/demospringboot` and `test/democlispringboot` for CLI option, and optionnaly a EXE file.\n\nYou will need all the mandatory DEB and RPM deps, optionnaly EXE deps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhdsdi3g%2Flinux-springboot-packager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhdsdi3g%2Flinux-springboot-packager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhdsdi3g%2Flinux-springboot-packager/lists"}