generated from lengors/maven-java-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
lengors edited this page Sep 7, 2024
·
1 revision
This guide will help you set up and use the maven-lombok-template repository for your Java projects.
- Java Development Kit (JDK): Install JDK 8 or later.
- Maven: Install Apache Maven 3.6.0 or later.
Clone the repository
git clone https://github.com/lengors/maven-lombok-template.git
cd maven-lombok-template
Build the project
Ensure you have Maven and JDK installed. Run:
./mvnw clean install
Run tests
./mvnw clean test
To sign your artifacts using GPG:
- Set up GPG with a private key on your machine.
- Add the passphrase to your environment variables:
export MAVEN_GPG_PASSPHRASE=your_passphrase
- Alternatively, you can specify the passphrase in the
core/pom.xml
file.
To publish artifacts to Maven Central:
- Set up your Maven Central credentials in
~/.m2/settings.xml
or use the existingsettings.xml
:
<servers>
<server>
<id>ossrh</id>
<username>${MAVEN_CENTRAL_USERNAME}</username>
<password>${MAVEN_CENTRAL_PASSWORD}</password>
</server>
</servers>
-
Ensure you have your private key setup on your gpg environment.
-
Ensure you have the following environment variables configured:
MAVEN_CENTRAL_USERNAME
MAVEN_CENTRAL_PASSWORD
MAVEN_GPG_PASSPHRASE
Refer to the .releaserc.yml
file for pipeline specifics.