https://github.com/mathieusoysal/java-maven-library-template
Template to easily create a Java library and automatically publish it to GitHub Package and Maven Central.
https://github.com/mathieusoysal/java-maven-library-template
hacktoberfest java library-template maven maven-library-template
Last synced: about 2 months ago
JSON representation
Template to easily create a Java library and automatically publish it to GitHub Package and Maven Central.
- Host: GitHub
- URL: https://github.com/mathieusoysal/java-maven-library-template
- Owner: MathieuSoysal
- License: apache-2.0
- Created: 2021-12-25T20:09:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T09:45:05.000Z (over 2 years ago)
- Last Synced: 2025-02-08T20:52:35.630Z (11 months ago)
- Topics: hacktoberfest, java, library-template, maven, maven-library-template
- Language: Java
- Homepage:
- Size: 263 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://sonarcloud.io/summary/new_code?id=MathieuSoysal_Java-Maven-library-template)
[](https://sonarcloud.io/summary/new_code?id=MathieuSoysal_Java-Maven-library-template)
[](https://sonarcloud.io/summary/new_code?id=MathieuSoysal_Java-Maven-library-template)

[](CODE_OF_CONDUCT.md)
[](https://mathieusoysal.github.io/Java-Maven-library-template/javadoc/)
#
Java Maven Library Template [](LICENSE)
Template to easily create a Java Maven library and publish it automatically on GitHub Package and Maven Central, the publication is automated via the repo versions.
## Use template
To use this template, you just need to click on "Use this template" at the top of the main page of this repository, or you can copy/paste this repository.
## Requirements
- [ ] [Create an account on Sonatype](https://issues.sonatype.org/secure/Signup!default.jspa)
- [ ] [Create a JIRA ticket on Sonatype to approve your groupId (io.github.YOUR-GITHUB-USERNAME)](https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134)
- [ ] [Generate a gpg key and distribute the public key to a keyserver](https://central.sonatype.org/publish/requirements/gpg/)
## Template configurations :
- [ ] **Fix pom.xml**
- *To guide you, a FIXME tag has been added to all lines to be edited.*
- [ ] **Config SonarCloud**
- To configure SonarCloud for your project you must go to https://sonarcloud.io
- Replace the file at [/.github/workflows/sonar.yml](.github/workflows/sonar.yml) with your own yaml file at https://sonarcloud.io and if your Java project is not on Java 11 edit that yaml file.
- [ ] **Create your GitHub secrets on your repository**
- *NEXUS_USERNAME* with your username used on Sonatype
- *NEXUS_PASSWORD* with your password used on Sonatype
- *GPG_PRIVATE_KEY* with the private key of your generated pgp key
- to get the private key `gpg --armor --export-secret-key > privkey.asc`
- *GPG_PASSPHRASE* with the passphrase of your gpg key
- [ ] **Activate the JavaDoc GitHub page**
- To enable the JavaDoc GitHub Page, you need to enable the GitHub page in your repository settings for the *javadoc* branch.
## Badges
Don't forget to add your own SonarCloud badges to your readme 😉
- to get your maven-central badge : https://shields.io/category/platform-support
- to get your JavaDoc Badge :
```Markdown
[](https://.github.io//javadoc/)
```
On the link of JavaDoc badge, replace `` by your GitHub username, `` by the name of your GitHub repository.
## Contact
If you have any problems setting up CI, CD or other, do not hesitate to contact me at Mathieu.Soysal@etu.umontpellier.fr