Skip to content

Quarkus MicroProfile example using maven, gradle and docker

Notifications You must be signed in to change notification settings

daggerok/java-mp-quarkus-example

Repository files navigation

Quarkus MicroProfile example Build Status

Simple quarkus.io MicroProfile quickstart example for maven, gradle and docker

dev mode

maven

./mvnw quarkus:list-extensions
./mvnw compile quarkus:dev

http :8080/health
http :8080/openapi
http :8080/api/v1/hello
http :8080/api/v1/hello/world

gradle

./gradlew listExtensions

http :8080/health
http :8080/openapi
http :8080/api/v1/hello
http :8080/api/v1/hello/world

build and run jar

maven

./mvnw compile quarkus:build
# or: ./mvnw package

java -cp ./target/lib -jar ./target/*-runner.jar

gradle

./gradlew quarkusBuild

java -cp ./build/lib -jar ./build/*-runner.jar

docker-compose

maven

./mvnw -P docker docker-compose:up

http :8080/api/v1/hello

./mvnw docker-cpompose:down

gradle

./gradlew composeUp

http :8080/api/v1/hello

./gradlew composeDown

plain docker-compose

gradle

./gradlew
docker-compose -f ./src/main/docker/docker-compose-gradle.yaml up
# ...
docker-compose -f ./src/main/docker/docker-compose-gradle.yaml down

maven

./mvnw
docker-compose -f ./src/main/docker/docker-compose-maven.yaml up
# ...
docker-compose -f ./src/main/docker/docker-compose-maven.yaml down

getting starting project quicker...

mvn io.quarkus:quarkus-maven-plugin:0.12.0:create \
  -DprojectGroupId=com.github.daggerok \
  -DprojectArtifactId=java-mp-quarkus-example \
  -DprojectVersion=1.0-SNAPSHOT \
  -DclassName="com.github.daggerok.ApplicationResource" \
  -B
cd java-mp-quarkus-example/
gradle init --type=basic --dsl=kotlin --project-name=java-mp-quarkus-example
# ...

links: