1. Create a Quarkus-App at quarkus.io
-
browse to https://quarkus.io/
-
click on START CODING
Create a repo and push to gh. The first time, you have to approve the push to github.
Clone the repo to your local machine
git clone https://github.com/htl-leonding/gh-actions-demo.git
1.1. First Try - Run your Quarkus App
./mvnw clean compile quarkus:dev
curl localhost:8080/hello
result
Hello RESTEasy
1.2. Change Quarkus Package Type
-
To deploy the jar-file on the remote server, we have to include all dependencies into the jar-file.
1.2.1. Package Types
-
quarkus.package.type=uber-jar
-
fast-jar
(default) -
legacy-jar
for the pre-1.12 default jar packaging, -
uber-jar
-
native
-
1.2.2. Configuration in Quarkus
-
There are plenty of configuration options available (more information)
-
Basically there are three ways to configure a quarkus app
-
Add an entry to application.properties
quarkus.package.type=uber-jar
-
Add an parameter when invoking maven
./mvnw clean package -Dquarkus.package.type=uber-jar
-
Add an entry to the pom.xml
<properties> <quarkus.package.type>uber-jar</quarkus.package.type> ... </properties>
-
1.3. Compile the Quarkus App
After compiling and packaging …
./mvnw clean package -Dquarkus.package.type=uber-jar
...you get a -runner - jar with all dependencies included
-rw-r--r-- 1 stuetz staff 10M Mar 13 19:17 gh-actions-demo-1.0.0-SNAPSHOT-runner.jar -rw-r--r-- 1 stuetz staff 4.7K Mar 13 19:17 gh-actions-demo-1.0.0-SNAPSHOT.jar.original