oleg-nenashev / gradle-quarkus-plugin-demo

Demonstrates using Gradle Quarkus Plugin for an app, with WireMock Dev Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo: Quarkus web service with Gradle

WARNING:: This branch delibirately includes old Quarkus version with CVE-2023-4853 in io.quarkus:quarkus-vertx-http

Demonstrates using Gradle Quarkus Plugin for building a Quarkus a web application with Gradle, with the WireMock dev service being used for development purposes. It uses Hacker News as a data source and mocks its REST API for local development.

Components:

If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .

Running the application in dev mode

You can run your application in dev mode that enables live coding using:

quarkus dev

Or:

./gradlew --console=plain quarkusDev

NOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.

Packaging and running the application

The application can be packaged using:

./gradlew quarkusBuild

It produces the quarkus-run.jar file in the build/quarkus-app/ directory. Be aware that it’s not an über-jar as the dependencies are copied into the build/quarkus-app/lib/ directory.

The application is now runnable using java -jar build/quarkus-app/quarkus-run.jar.

Uber JAR

If you want to build an über-jar, execute the following command:

./gradlew quarkusBuild -Dquarkus.package.type=uber-jar

The application, packaged as an über-jar, is now runnable using java -jar build/*-runner.jar.

About

Demonstrates using Gradle Quarkus Plugin for an app, with WireMock Dev Service

License:Apache License 2.0


Languages

Language:HTML 98.1%Language:Java 1.9%