Skip to content

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.

Prerequisites

  • Java Development Kit (JDK): Install JDK 8 or later.
  • Maven: Install Apache Maven 3.6.0 or later.

Setting Up the Project

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

Configuring GPG for Signing

To sign your artifacts using GPG:

  1. Set up GPG with a private key on your machine.
  2. Add the passphrase to your environment variables:
export MAVEN_GPG_PASSPHRASE=your_passphrase
  1. Alternatively, you can specify the passphrase in the core/pom.xml file.

Publishing to Maven Central

To publish artifacts to Maven Central:

  1. Set up your Maven Central credentials in ~/.m2/settings.xml or use the existing settings.xml:
<servers>
  <server>
    <id>ossrh</id>
      <username>${MAVEN_CENTRAL_USERNAME}</username>
      <password>${MAVEN_CENTRAL_PASSWORD}</password>
    </server>
</servers>
  1. Ensure you have your private key setup on your gpg environment.

  2. 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.