{"id":21512912,"url":"https://github.com/hpehl/maven-multi-module-template","last_synced_at":"2025-06-10T18:09:39.714Z","repository":{"id":59398119,"uuid":"536535865","full_name":"hpehl/maven-multi-module-template","owner":"hpehl","description":"Template for a multi module project using Maven 3.2.x and Java 11+.","archived":false,"fork":false,"pushed_at":"2024-04-15T07:56:59.000Z","size":266,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-16T11:13:10.226Z","etag":null,"topics":["java","maven","template"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/hpehl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-14T10:57:44.000Z","updated_at":"2024-04-18T06:34:06.121Z","dependencies_parsed_at":"2023-02-09T02:00:52.214Z","dependency_job_id":"2e5d382c-217e-4811-9a27-66c8baf44000","html_url":"https://github.com/hpehl/maven-multi-module-template","commit_stats":null,"previous_names":[],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpehl%2Fmaven-multi-module-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpehl%2Fmaven-multi-module-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpehl%2Fmaven-multi-module-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpehl%2Fmaven-multi-module-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hpehl","download_url":"https://codeload.github.com/hpehl/maven-multi-module-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248090383,"owners_count":21046078,"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","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":["java","maven","template"],"created_at":"2024-11-23T22:48:06.922Z","updated_at":"2025-04-09T18:43:02.952Z","avatar_url":"https://github.com/hpehl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maven Multi Module Template\n\nTemplate for a multi module project using Maven 3.2.x and Java 17+.\n\n# Features\n\n- [Maven Wrapper](https://maven.apache.org/wrapper/)\n- Inherits from [JBoss Parent POM](https://github.com/jboss/jboss-parent-pom)\n- Multi module:\n  - Parent POM with basic info, properties and minimal plugin definitions\n  - Build config containing checkstyle rules, formatter definition and license template\n  - BOM declaring project dependencies\n  - Parent code module with dependency and plugin management  \n  - Code module with some dummy code\n- [WildFly](https://github.com/wildfly/wildfly-checkstyle-config) [checkstyle](https://checkstyle.sourceforge.io/) configuration\n- [Maven Enforcer Plugin](https://maven.apache.org/enforcer/maven-enforcer-plugin/) with rules enforcing\n  - secure repositories over HTTPS\n  - Java \u003e=17\n  - Maven \u003e= 3.2.5\n- [Maven License Plugin](https://mycila.carbou.me/license-maven-plugin/)\n- [Maven Formatter Plugin](https://code.revelc.net/formatter-maven-plugin/)\n- [Maven ImpSort Plugin](https://code.revelc.net/impsort-maven-plugin/)\n- Sample dependencies [Eclipse Collections](https://www.eclipse.org/collections/) and [JUnit 5](https://junit.org/junit5/)\n- [SLF4J](https://www.slf4j.org/) and [Logback](https://logback.qos.ch/) support\n- Empty JUnit 5 unit test\n- Support for [keeping a changelog](https://keepachangelog.com/en/1.0.0/)\n- Sample code of conduct and contribution guide\n- Release profile which generates and signs source and JavaDoc JARs\n- Deployment to Maven Central using a GitHub workflow\n\n# Get Started\n\n1. Clone or copy the repo\n2. Adjust Maven coordinates in `pom.xml`\n3. Adjust name, description, URL, organization and developers in `pom.xml`\n4. Adjust `repo.scm.connection` and `repo.scm.url` in `pom.xml`\n5. Adjust or remove unnecessary plugins/configuration in `pom.xml`\n6. Add dependencies, code, and tests\n\nIf you want to keep the contribution guide, make the following adjustments:\n\n- Replace all URLs and paths containing `maven-multi-module-template` in `CONTRIBUTING.md`\n\n# Release Management \u0026 Deployment\n\nThere are many options for how to release and deploy new versions. This project takes an opinionated approach using a bash script to kick off a new release and a GitHub workflow for doing the actual release and deploying all artifacts to Maven Central.\n\nThe project already fulfills all requirements and recommendations for deploying to Maven Central:\n\n- the POM contains all [required metadata](https://central.sonatype.org/publish/requirements/#sufficient-metadata)\n- [source and Javadoc JARs](https://central.sonatype.org/publish/requirements/#supply-javadoc-and-sources) are produced\n- all artifacts are [signed](https://central.sonatype.org/publish/requirements/#sign-files-with-gpgpgp)\n- the [Nexus Staging Maven Plugin](https://central.sonatype.org/publish/publish-maven/#nexus-staging-maven-plugin-for-deployment-and-release) is used for deployment\n\nThe project uses https://s01.oss.sonatype.org/ for the deployment to Maven Central. It's configured as property `repo.sonatype.url` in the POM. Please change the URL to your needs.\n\n## Release Script\n\nThe script `release.sh` starts a new release. You should make the following adjustments:\n\n- specify your git remotes using the array `GIT_REMOTES`. If you're working on a forked repository this is most likely `(\"origin\" \"upstream\")`\n- adjust the variable `WORKFLOW_URL` to your needs\n\nThe release script requires two parameters:\n\n```shell\n./release.sh \u003crelease-version\u003e \u003cnext-version\u003e\n```\n\nThe release script verifies\n\n- that you don't have uncommitted changes\n- that both `release-version` and `next-version` are semantic versions\n- that `next-version` is greater than `release-version`\n- that no tag `v\u003crelease-version\u003e` exists\n\nIf everything is fine, the script\n\n1. bumps the project version to `\u003crelease-version\u003e`\n2. updates the header and links in the changelog (there should already be entries made by you!)\n3. commits \u0026 pushes the changes\n4. creates \u0026 pushes a new tag `v\u003crelease-version\u003e` (which triggers the release workflow)\n5. bumps to the next snapshot version `\u003cnext-version\u003e-SNAPSHOT`\n6. commits \u0026 pushes changes\n\nBy pushing the tag to GitHub, the release workflow kicks in.\n\n## Release Workflow\n\nThe release workflow is defined in `release.yml`. It operates fully automated and relies on several secrets that have to be configured:\n\n- `OSSRH_USERNAME`: The username for the Sonatype JIRA\n- `OSSRH_PASSWORD`: The password for the Sonatype JIRA\n- `MAVEN_GPG_PASSPHRASE`: The passphrase for your private GPG key\n- `MAVEN_GPG_PRIVATE_KEY`: The private key in ASCII format. You can use a command like `gpg --armor --export-secret-keys \u003ckey-id\u003e | pbcopy` to export and copy the private key to the clipboard (on macOS).\n\nThe release workflow builds and deploys the project. Upon successful execution, a new GitHub release is created. The name of the release uses the name of the project as specified in the POM followed by `\u003crelease-version\u003e.Final`.\n\n# Scripts\n\nThis repository contains various scripts to automate tasks.\n\n## `format.sh`\n\nFormats the codebase by applying the following maven goals:\n\n- [`license-maven-plugin:format`](https://mycila.carbou.me/license-maven-plugin/#goals)\n- [`formatter-maven-plugin:format`](https://code.revelc.net/formatter-maven-plugin/format-mojo.html)\n- [`impsort-maven-plugin:sort`](https://code.revelc.net/impsort-maven-plugin/sort-mojo.html)\n\nThe goals use the plugin configuration in [pom.xml](pom.xml) and the resources in [etc](etc).\n\n## `validate.sh`\n\nValidates the codebase by applying the following maven goals:\n\n- [`enforcer:enforce`](https://maven.apache.org/enforcer/maven-enforcer-plugin/enforce-mojo.html)\n- [`checkstyle:check`](https://maven.apache.org/plugins/maven-checkstyle-plugin/check-mojo.html)\n- [`license-maven-plugin:check`](https://mycila.carbou.me/license-maven-plugin/#goals)\n- [`formatter-maven-plugin:validate`](https://code.revelc.net/formatter-maven-plugin/validate-mojo.html)\n- [`impsort-maven-plugin:check`](https://code.revelc.net/impsort-maven-plugin/check-mojo.html)\n\nThe goals use the plugin configuration in [pom.xml](pom.xml) and the resources in [etc](etc).\n\n## `release.sh`\n\nStarts a new release (see [above](#release-management--deployment)). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpehl%2Fmaven-multi-module-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpehl%2Fmaven-multi-module-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpehl%2Fmaven-multi-module-template/lists"}