Skip to main content

Useful commands

Dependencies​

List the dependencies of a module:

mvn dependency:list

Show them as a tree, as Quarkus resolves them:

mvn quarkus:dependency-tree

Containers​

Build a container with Jib, usable with Docker:

mvn install -Dquarkus.container-image.build=true -Dquarkus.container-image.tag=1.0.0 -Dquarkus.jib.docker-executable-name=docker -Dquarkus.container-image.registry=<your-registry>

Running a module as a container​

A module run as a container needs the /open-ent/data volume and the port it exposes.

Set a log level per Java package. Here the fr.wseduc package logs at DEBUG:

docker run -p 8089:8089 -v /open-ent/data:/open-ent/data -e QUARKUS_LOG_CATEGORY__fr.wseduc__LEVEL=DEBUG ghcr.io/open-ent/open-ent/appregistry:1.0.1-dev

Start the container in development mode:

SettingEffect
QUARKUS_LAUNCH_DEVMODE=trueStarts the application in development mode: hot reload of classes and resources, more verbose logs, and the Quarkus developer console
quarkus.package.jar.type=mutable-jarPackages the application as a mutable JAR, which keeps an unpacked directory structure so that classes and resources can be reloaded without rebuilding the container
docker run -p 8089:8089 -v /open-ent/data:/open-ent/data -e QUARKUS_LOG_CATEGORY__fr.wseduc__LEVEL=DEBUG -e QUARKUS_LAUNCH_DEVMODE=true -e quarkus.package.jar.type=mutable-jar ghcr.io/open-ent/open-ent/appregistry:1.0.1-dev

Copying a file into a running container​

Containers built with Jib do not include tools such as tar, which kubectl cp relies on. Copy a file by streaming it instead:

cat /open-ent/data/i18n/en.json | kubectl exec -i openent-portal-5b6468d6cf-vsvsz -- sh -c 'cat > /open-ent/data/i18n/en.json'

User interfaces​

Format the code with Prettier:

yarn nx format:write