Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.48 KB

03-build.md

File metadata and controls

57 lines (37 loc) · 1.48 KB

Build

Prerequisites

  • JDK 21 or later
  • Maven 3.9+

Compile and run tests

mvn verify

Tests are integration tests that spin up a reactor-netty proxy instance and MockServer-based OIDC/backend stubs. They run entirely in-process on random ports — no external services required.

Build a runnable JAR

mvn package -DskipTests
java -jar target/webadmin-proxy-1.0.0-SNAPSHOT.jar

The JAR expects a configuration.json file in the working directory (or the path set by the CONFIGURATION_FILE system property — check WebAdminProxyMain for the exact flag).

Build a Docker image with JIB

JIB builds a Docker image without requiring a local Docker daemon.

Push to a registry:

mvn compile jib:build -Djib.to.image=<registry>/webadmin-proxy:<tag>

Build to local Docker daemon:

mvn compile jib:dockerBuild

The default image name is linagora/webadmin-proxy. The base image is eclipse-temurin:27-jre-resolute. Both can be overridden:

mvn compile jib:build \
  -Djib.base.image=eclipse-temurin:21-jre-jammy \
  -Djib.to.image=myregistry.example.com/webadmin-proxy:1.0

The JIB build bundles src/main/conf/configuration.json into /root/conf/ inside the image. Edit that file (or mount a custom one at runtime) before building.

Checkstyle

The build enforces import ordering via Checkstyle. The rules are in checkstyle.xml. Violations fail mvn compile. Run the check explicitly with:

mvn checkstyle:check