Skip to content

Latest commit

 

History

History
132 lines (95 loc) · 3.22 KB

File metadata and controls

132 lines (95 loc) · 3.22 KB

Development Overview

This short document summarizes the important information extracted from the project's pom.xml files to help developers build and run the project locally.

Important POMs

Notes

  • Java version: 21 (see the POM properties).
  • Formatting and checks: Spotless is configured and executed in the validate phase across modules.
  • Extensions are built as PF4J plugins; the aggregator and module POMs configure assembly/manifest entries for plugin metadata.

Running the Application

BOM

To build the BOM, execute the following command from the project root:

mvn clean install

API

To build the API module, execute the following command from the project root:

cd api

mvn spotless:apply

mvn clean install

Extensions

To build all extensions, execute the following command from the project root:

cd extensions

mvn spotless:apply

mvn clean package

# Build only single module, e.g. rest-adapter-extension
mvn clean package -pl rest-adapter-extension

Framework

First copy the extensions jars to the framework extensions directory by executing the following scripts:

# Windows
cd scripts 
.\copy-jars.ps1

## Linux
bash ./scripts/copy-jars.sh

To build the framework module, execute the following command from the project root:

cd framework

mvn spotless:apply

mvn spring-boot:run
# Or run with application-dev.yaml 
mvn spring-boot:run "-Dspring-boot.run.profiles=dev"

# Bundle the application into a jar file
mvn clean package

To debug the framework with the extensions set log level to DEBUG:

mvn spring-boot:run "-Dspring-boot.run.arguments=--logging.level.root=DEBUG"

Or add the following to the application.yaml:

logging:
  level:
    root: DEBUG

Running spotless

To run spotless checks across all modules, execute the following command from the project root:

# Run spotless apply
mvn spotless:apply

# Run spotless checks
mvn spotless:check 

Use maven wrapper

To use the maven wrapper, execute the commands with:

# From project root 
mvnw <command>

# From module directory, e.g. framework
..\mvnw <command>

Manually build the docker image

Normally the docker image is built by the CI pipeline, but you can also build it locally by executing the following command from the project root:

# Build the framework module first to generate the jar file for the docker image
cd framework
mvn clean package

# Replace "your-tag" with the desired tag for the docker image

# Go to project root to build the docker image
cd ..
docker build -f ./framework/Dockerfile -t ghcr.io/fraunhoferiosb/dataspaceconsumer-framework:your-tag .

# Login to GitHub Container Registry (if not already logged in)
docker login ghcr.io

# Push the image to GitHub Container Registry
docker push ghcr.io/fraunhoferiosb/dataspaceconsumer-framework:your-tag