Some years ago, I wrote a series of articles about Quarkus. Now it was time to reinvestigate Quarkus again.
In this article, I will share with you the steps I took to set up a demo environment, so I could get started with Quarkus again. My goal for now was to get the demo environment working and try out the “Get Started with Quarkus” section of the documentation.
For more information, please see: https://quarkus.io/
What is Quarkus?
Traditional Java stacks were engineered for monolithic applications with long startup times and large memory requirements in a world where the cloud, containers, and Kubernetes did not exist. Java frameworks needed to evolve to meet the needs of this new world.
Quarkus was created to enable Java developers to create applications for a modern, cloud-native world. Quarkus is a Kubernetes-native Java framework tailored for GraalVM and HotSpot, crafted from best-of-breed Java libraries and standards. The goal is to make Java the leading platform in Kubernetes and serverless environments while offering developers a framework to address a wider range of distributed application architectures.
[https://quarkus.io/about/]
Open Source Utterly and Absolutely
Quarkus is an Open Source project licensed under the Apache License version 2.0. First and foremost, it is an open community where contributions, ideas and discussions are done in the open and contributors are welcome. Let’s join forces in building the future of Java applications.
[https://quarkus.io/about/]
Quarkus Benefits
What Makes Quarkus Different? These are the Quarkus benefits mentioned on the website:
- Developer Joy
A cohesive platform for optimized developer joy with unified configuration and no hassle native executable generation. Zero config, live reload in the blink of an eye and streamlined code for the 80% common usages, flexible for the remainder 20%.
[https://quarkus.io/developer-joy/]
- Performance
Quarkus streamlines framework optimizations in the build phase to reduce runtime dependencies and improve efficiency. By precomputing metadata and optimizing class loading, it ensures fast startup times for JVM and native binary deployments, cutting down on memory usage.
[https://quarkus.io/performance/]
- Kube-Native
The combination of Quarkus and Kubernetes provides an ideal environment for creating scalable, fast, and lightweight applications. Quarkus significantly increases developer productivity with tooling, pre-built integrations, application services, and more.
[https://quarkus.io/kubernetes-native/]
- Community and Standards
Quarkus provides a cohesive, fun to use, full-stack framework by leveraging a growing list of over fifty best-of-breed libraries that you love and use. All wired on a standard backbone.
[https://quarkus.io/standards/]
- Reactive Core
Built on a robust reactive core, Quarkus ensures fast and efficient performance, supporting the development of a wide variety of modern applications.
[https://quarkus.io/versatility/]
- Container First
Quarkus tailors your application for GraalVM and HotSpot. Amazingly fast boot time, incredibly low RSS memory (not just heap size!) offering near instant scale up and high density memory utilization in container orchestration platforms like Kubernetes. We use a technique we call compile time boot.
[https://quarkus.io/container-first/]
Quarkus – Get Started
In order to get started with Quarkus, according to the documentation, the following steps are to be taken:
- Step 1: Install via Command Line Interface
- Step 2: Create the Getting Started Application
- Step 3: Run the Getting Started Application
- Step 4: Live Coding with Quarkus
[https://quarkus.io/get-started/]
As you may know, on my Windows laptop, I use Vagrant a lot when I need an environment for training and demo purposes, in order to keep everything separated and structured. An example how I set this up, can be found in a previous article I wrote: “Rapidly spinning up a VM with Ubuntu, Docker and Minikube (using the –vm-driver=none option) –on my Windows laptop using Vagrant and Oracle VirtualBox”
[https://technology.amis.nl/2019/02/12/rapidly-spinning-up-a-vm-with-ubuntu-docker-and-minikube-using-the-vm-drivernone-option-on-my-windows-laptop-using-vagrant-and-oracle-virtualbox/]
So, this time, I wanted to use a demo environment with an Ubuntu guest Operating System within an Oracle VirtualBox appliance, with the help of Vagrant.
I created a Vagrantfile with the following content:
Vagrant.configure("2") do |config| config.vm.box = "generic/ubuntu2204" config.vm.define "ubuntu_quarkus" do |ubuntu_quarkus| config.vm.synced_folder "C:\\My\\AMIS\\MySharedFolder", "/mnt/mysharedfolder", automount: true config.vm.network "forwarded_port", guest: 8001, host: 8001, auto_correct: true config.vm.network "forwarded_port", guest: 8080, host: 8080, auto_correct: true config.vm.network "forwarded_port", guest: 8090, host: 8090, auto_correct: true config.vm.network "forwarded_port", guest: 8443, host: 8443, auto_correct: true config.vm.provider "virtualbox" do |vb| vb.name = "Ubuntu Quarkus" vb.memory = "8192" vb.cpus = "1" args = [] config.vm.provision "quarkus shell script", type: "shell", path: "scripts/quarkus.sh", args: args end end end
Here, you can see I added some ports needed for the Quarkus guided code examples, I will be using later on (and cover in future articles).
In the env/scripts directory on my Windows laptop, I created the file quarkus.sh with the following content:
#!/bin/bash echo "**** Begin installing Quarkus" echo "**** End installing Quarkus"
Later on, I will change the content of this file and add some commands.
From the directory named env on my Windows laptop, I opened a Windows Command Prompt (cmd) and typed: vagrant up
With the following output:
Bringing machine 'ubuntu_quarkus' up with 'virtualbox' provider... ==> ubuntu_quarkus: Importing base box 'generic/ubuntu2204'... ==> ubuntu_quarkus: Matching MAC address for NAT networking... ==> ubuntu_quarkus: Checking if box 'generic/ubuntu2204' version '4.3.12' is up to date... ==> ubuntu_quarkus: Setting the name of the VM: Ubuntu Quarkus … ==> ubuntu_quarkus: Machine booted and ready! ==> ubuntu_quarkus: Checking for guest additions in VM... ubuntu_quarkus: The guest additions on this VM do not match the installed version of ubuntu_quarkus: VirtualBox! In most cases this is fine, but in rare cases it can ubuntu_quarkus: prevent things such as shared folders from working properly. If you see ubuntu_quarkus: shared folder errors, please make sure the guest additions within the ubuntu_quarkus: virtual machine match the version of VirtualBox you have installed on ubuntu_quarkus: your host and reload your VM. ubuntu_quarkus: ubuntu_quarkus: Guest Additions Version: 6.1.38 ubuntu_quarkus: VirtualBox Version: 7.0 ==> ubuntu_quarkus: Mounting shared folders... ubuntu_quarkus: /mnt/mysharedfolder => C:/My/AMIS/MySharedFolder ==> ubuntu_quarkus: Running provisioner: 2025 quarkus shell script (shell)... ubuntu_quarkus: Running: C:/Users/marc_l/AppData/Local/Temp/vagrant-shell20250408-4476-no8bk3.sh ubuntu_quarkus: **** Begin installing Quarkus ubuntu_quarkus: **** **** End installing Quarkus
My Virtual Machine with Ubuntu was now available.
As you can see, I now also had a shared folder available.
[https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/sharedfolders.html]
For me and the Linux environment I created, in order to get started with Quarkus, according to the documentation (https://quarkus.io/get-started/), the following steps were to be taken:
- Step 1: Install via Command Line Interface
Open your favorite terminal and use JBang to install the Quarkus CLI. You do not need to have Java installed first.
curl -Ls https://sh.jbang.dev | bash -s - trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/ curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio
If it’s your first time to install, you’ll need to restart your shell.
- Step 2: Create the Getting Started Application
Run this script in your CLI:
quarkus create && cd code-with-quarkus
- Step 3: Run the Getting Started Application
Run this script in your CLI:
quarkus dev
Boom! Your Quarkus app is now running at localhost:8080
- Step 4: Live Coding with Quarkus
So, I executed these steps.
Step 1: Install via Command Line Interface
I used vagrant ssh to connect into the running VM. In order to use JBang to install the Quarkus CLI, I used the following command on the Linux Command Prompt:
curl -Ls https://sh.jbang.dev | bash -s - trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/
With the following output:
Downloading JBang ... Installing JBang... Downloading JDK 17. Be patient, this can take several minutes... Installing JDK 17... [jbang] Default JDK set to 17 (17.0.14+7, current, /home/vagrant/.jbang/cache/jdks/17) [jbang] Trusting permanently: [https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/]
Next, I used the following command on the Linux Command Prompt:
curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio
With the following output:
[jbang] Command installed: quarkus [jbang] Setting up JBang environment... Please start a new Shell for changes to take effect
As suggested in the output, I exited the shell.
Step 2: Create the Getting Started Application
I used vagrant ssh to connect into the running VM. In order to create the Getting Started Application, I used the following commands on the Linux Command Prompt:
cd /mnt/mysharedfolder quarkus create && cd code-with-quarkus
With the following output:
Creating an app (default project type, see --help). Looking for the newly published extensions in registry.quarkus.io ----------- applying codestarts... 📚 java 🔨 maven 📦 quarkus 📝 config-properties 🔧 tooling-dockerfiles 🔧 tooling-maven-wrapper 🚀 rest-codestart ----------- [SUCCESS] ✅ quarkus project has been successfully generated in: --> /mnt/mysharedfolder/code-with-quarkus ----------- Navigate into this directory and get started: quarkus dev
For my own convenience, I used some extra commands.
I used the following command on the Linux Command Prompt:
echo $JAVA_HOME
With the following output:
/home/vagrant/.jbang/currentjdk
By the way, as you can see, JBang is used.
Quarkus provides integration with jbang which allows you to write Java scripts/applications requiring no Maven nor Gradle to get running.
[https://quarkus.io/guides/scripting]
JBang
JBang lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
[https://www.jbang.dev/]
Want to learn, explore or use Java instantly without setup ?
Do you like Java but use python, groovy, kotlin or similar languages for scripts, experimentation and exploration ?
Ever wanted to just be able to run java from anywhere without any or very minimal setup ? Ever tried out Java 11+ support for running .java files directly in your shell but felt it was a bit too cumbersome ?
Then try jbang which lets you do this.
JBang goes beyond more than just easy scripting; you can use jbang to launch any kind of java application or library packaged as a jar available locally, via http/https download or in a Maven repository.
[https://www.jbang.dev/documentation/guide/latest/index.html]
I used the following command on the Linux Command Prompt:
echo $PATH
With the following output:
/home/vagrant/.jbang/bin:/home/vagrant/.jbang/currentjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
I used the following command on the Linux Command Prompt:
quarkus --version
With the following output:
3.22.2
Step 3: Run the Getting Started Application
In order to run the Getting Started Application, I used the following command on the Linux Command Prompt:
quarkus dev
With the following output:
[INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/platform/quarkus-maven-plugin/3.22.2/quarkus-maven-plugin-3.22.2.pom Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/platform/quarkus-maven-plugin/3.22.2/quarkus-maven-plugin-3.22.2.pom (10 kB at 8.6 kB/s) … Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-http-dev-ui-resources/3.22.2/quarkus-vertx-http-dev-ui-resources-3.22.2.jar (901 kB at 348 kB/s) [INFO] Invoking compiler:3.14.0:compile (default-compile) @ code-with-quarkus [INFO] Recompiling the module because of changed source code. [INFO] Compiling 1 source file with javac [debug parameters release 17] to target/classes [INFO] Invoking resources:3.3.1:testResources (default-testResources) @ code-with-quarkus [INFO] skip non existing resourceDirectory /mnt/mysharedfolder/code-with-quarkus/src/test/resources [INFO] Invoking quarkus:3.22.2:generate-code-tests (default) @ code-with-quarkus [INFO] Invoking compiler:3.14.0:testCompile (default-testCompile) @ code-with-quarkus [INFO] Recompiling the module because of changed dependency. [INFO] Compiling 2 source files with javac [debug parameters release 17] to target/test-classes ---------------------------- --- Help improve Quarkus --- ---------------------------- * Learn more: https://quarkus.io/usage/ * Do you agree to contribute anonymous build time data to the Quarkus community? (y/n and enter) [info] [Quarkus build analytics] Didn't receive the user's answer after 10 seconds. The question will be asked again next time. Listening for transport dt_socket at address: 5005 __ ____ __ _____ ___ __ ____ ______ --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2025-05-12 14:10:29,362 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.22.2) started in 10.469s. Listening on: http://localhost:8080 2025-05-12 14:10:29,390 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2025-05-12 14:10:29,401 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, rest, smallrye-context-propagation, vertx] -- Tests paused Press [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>
Quarkus will start in development mode as normal, but down the bottom of the screen you should see the following:
[https://quarkus.io/guides/continuous-testing]
Tests paused, press [r] to resume, [h] for more options>
Press r and the tests will start running. You should see the status change down the bottom of the screen as they are running, and it should finish with:
[https://quarkus.io/guides/continuous-testing]
Tests all passed, 2 tests were run, 0 were skipped. Tests took 1470ms. Press [r] to re-run, [v] to view full results, [p] to pause, [h] for more options>
So, first I pressed h for more options.
With the following output:
The following commands are available: == Continuous Testing [r] - Resume testing [o] - Toggle test output (disabled) == Exceptions [x] - Open last exception (or project) in IDE (none) == HTTP [w] - Open the application in a browser [d] - Open the Dev UI in a browser == System [s] - Force restart [e] - Edits the command line parameters and restarts () [i] - Toggle instrumentation based reload (disabled) [l] - Toggle live reload (enabled) [j] - Toggle log levels (INFO) [h] - Show this help [:] - Enter terminal mode [q] - Quit the application -- Tests paused Press [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>
Next, I pressed r to resume testing.
With the following output:
All 1 test is passing (0 skipped), 1 test was run in 5941ms. Tests completed at 14:26:30. Press [e] to edit command line args (currently ''), [r] to re-run, [o] Toggle test output, [:] for the terminal, [h] for more options>
Then, in the Web Browser on my Windows laptop, I entered the URL:
http://localhost:8080/hello
And I got the following result:
This site can’t be reached
I used vagrant ssh to connect into the running VM from a second session.
Then, I used the following command on the Linux Command Prompt:
curl http://localhost:8080/hello
With the following output:
Hello from Quarkus REST
So, I now knew that the Quarkus bit worked.
Then, I exited the shell (for the second session).
In the still running session, I pressed q to quit the application.
With the following output:
2025-05-12 14:40:19,281 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus stopped in 0.005s -- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 31:11 min [INFO] Finished at: 2025-05-12T14:40:19Z [INFO] ------------------------------------------------------------------------
Investigating the application code
It was time to investigate the application code.
Within IntelliJ IDEA, I imported the project by selecting directory: C:\My\AMIS\MySharedFolder\code-with-quarkus.
Next, I navigated to code-with-quarkus\src\main\java\org\acme\GreetingResource.java:
Then, I navigated to code-with-quarkus\src\test\java\org\acme\GreetingResourceTest.java:
This, all looked familiar, and corresponded with the output we have seen.
Then, to make Quarkus listen on all network interfaces, I navigated to code-with-quarkus\src\main\resources\application.properties and added:
[https://stackoverflow.com/questions/55043764/how-to-make-quarkus-to-listen-on-all-network-interfaces-instead-of-localhost]
quarkus.http.host=0.0.0.0
Again, I used the following command on the Linux Command Prompt:
quarkus dev
With the following output:
[INFO] Scanning for projects... [INFO] [INFO] ---------------------< org.acme:code-with-quarkus >--------------------- [INFO] Building code-with-quarkus 1.0.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- quarkus:3.22.2:dev (default-cli) @ code-with-quarkus --- [INFO] Invoking resources:3.3.1:resources (default-resources) @ code-with-quarkus [INFO] Copying 1 resource from src/main/resources to target/classes [INFO] Invoking quarkus:3.22.2:generate-code (default) @ code-with-quarkus [INFO] Invoking compiler:3.14.0:compile (default-compile) @ code-with-quarkus [INFO] Nothing to compile - all classes are up to date. [INFO] Invoking resources:3.3.1:testResources (default-testResources) @ code-with-quarkus [INFO] skip non existing resourceDirectory /mnt/mysharedfolder/code-with-quarkus/src/test/resources [INFO] Invoking quarkus:3.22.2:generate-code-tests (default) @ code-with-quarkus [INFO] Invoking compiler:3.14.0:testCompile (default-testCompile) @ code-with-quarkus [INFO] Nothing to compile - all classes are up to date. ---------------------------- --- Help improve Quarkus --- ---------------------------- * Learn more: https://quarkus.io/usage/ * Do you agree to contribute anonymous build time data to the Quarkus community? (y/n and enter) [info] [Quarkus build analytics] Didn't receive the user's answer after 10 seconds. The question will be asked again next time. Listening for transport dt_socket at address: 5005 __ ____ __ _____ ___ __ ____ ______ --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2025-05-12 15:07:03,359 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.22.2) started in 5.378s. Listening on: http://0.0.0.0:8080 2025-05-12 15:07:03,368 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2025-05-12 15:07:03,371 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, rest, smallrye-context-propagation, vertx] -- Tests paused Press [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>
Then, in the Web Browser on my Windows laptop, I Entered the URL:
http://localhost:8080/hello
And, this time, I got the following result:
With this application still running, is was time to go to step 4.
Step 4: Live Coding with Quarkus
Quarkus makes it easy to change your code on the fly. Let’s modify the RESTful endpoint.
[https://quarkus.io/get-started/]
I navigated to code-with-quarkus\src\main\java\org\acme\GreetingResource.java and changed “Hello from Quarkus REST” to “Hello from Quarkus REST and a warm welcome from AMIS”.
Then I refreshed the Web Browser on my Windows laptop and immediately I saw the changes I made in the application code.
Of course, because I didn’t change the unit test, I expected an error when the test was rerun.
So, on the Linux Command Prompt I pressed r to resume testing.
With the following output:
2025-05-12 16:34:51,377 INFO [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-1) Restarting quarkus due to changes in GreetingResource.class. 2025-05-12 16:34:51,421 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus stopped in 0.016s __ ____ __ _____ ___ __ ____ ______ --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2025-05-12 16:34:52,586 INFO [io.quarkus] (Quarkus Main Thread) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.22.2) started in 1.150s. Listening on: http://0.0.0.0:8080 2025-05-12 16:34:52,591 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2025-05-12 16:34:52,593 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, rest, smallrye-context-propagation, vertx] 2025-05-12 16:34:52,597 INFO [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-1) Live reload total time: 1.891s 2025-05-12 16:40:24,724 ERROR [io.qua.test] (Test runner thread) ==================== TEST REPORT #1 ==================== 2025-05-12 16:40:24,727 ERROR [io.qua.test] (Test runner thread) Test GreetingResourceTest#testHelloEndpoint() failed : java.lang.AssertionError: 1 expectation failed. Response body doesn't match expectation. Expected: is "Hello from Quarkus REST" Actual: Hello from Quarkus REST and a warm welcome from AMIS at io.restassured.internal.ValidatableResponseOptionsImpl.body(ValidatableResponseOptionsImpl.java:238) at org.acme.GreetingResourceTest.testHelloEndpoint(GreetingResourceTest.java:17) 2025-05-12 16:40:24,732 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> Summary: <<<<<<<<<<<<<<<<<<<< org.acme.GreetingResourceTest#testHelloEndpoint(GreetingResourceTest.java:17) GreetingResourceTest#testHelloEndpoint() 1 expectation failed. Response body doesn't match expectation. Expected: is "Hello from Quarkus REST" Actual: Hello from Quarkus REST and a warm welcome from AMIS 2025-05-12 16:40:24,736 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> 1 TEST FAILED <<<<<<<<<<<<<<<<<<<< 2025-05-12 16:40:25,847 ERROR [io.qua.test] (Test runner thread) ==================== TEST REPORT #2 ==================== 2025-05-12 16:40:25,851 ERROR [io.qua.test] (Test runner thread) Test GreetingResourceTest#testHelloEndpoint() failed : java.lang.AssertionError: 1 expectation failed. Response body doesn't match expectation. Expected: is "Hello from Quarkus REST" Actual: Hello from Quarkus REST and a warm welcome from AMIS at io.restassured.internal.ValidatableResponseOptionsImpl.body(ValidatableResponseOptionsImpl.java:238) at org.acme.GreetingResourceTest.testHelloEndpoint(GreetingResourceTest.java:17) 2025-05-12 16:40:25,853 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> Summary: <<<<<<<<<<<<<<<<<<<< org.acme.GreetingResourceTest#testHelloEndpoint(GreetingResourceTest.java:17) GreetingResourceTest#testHelloEndpoint() 1 expectation failed. Response body doesn't match expectation. Expected: is "Hello from Quarkus REST" Actual: Hello from Quarkus REST and a warm welcome from AMIS 2025-05-12 16:40:25,854 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> 1 TEST FAILED <<<<<<<<<<<<<<<<<<<< -- 1 test failed (0 passing, 0 skipped), 1 test was run in 1092ms. Tests completed at 16:40:25 due to changes to GreetingResource.class. Press [e] to edit command line args (currently ''), [r] to re-run, [o] Toggle test output, [:] for the terminal, [h] for more options>
Indeed, an error occurred as expected.
Next, I navigated to code-with-quarkus\src\test\java\org\acme\GreetingResourceTest.java:
I changed the RESTful endpoint from “Hello from Quarkus REST” to “Hello from Quarkus REST and a warm welcome from AMIS”.
Next, on the Linux Command Prompt I pressed r (Resume testing), but the error stayed the same.
Then, on the Linux Command Prompt I pressed s (Force restart), but the error stayed the same.
This is apparently how it works, the focus is on changes in the actual code (not tests).
Quarkus supports continuous testing, where tests run immediately after code changes have been saved. This allows you to get instant feedback on your code changes. Quarkus detects which tests cover which code, and uses this information to only run the relevant tests when code is changed.
[https://quarkus.io/guides/continuous-testing]
After that, on the Linux Command Prompt I pressed q (Quit the application) followed by the command quarkus dev and pressing r (Resume testing).
With the following output:
All 1 test is passing (0 skipped), 1 test was run in 5400ms. Tests completed at 17:13:38.
Again, on the Linux Command Prompt I pressed q to stop the application.
So, the application with the changed RESTful endpoint was working again, including the unit test.
For now this was enough. I knew my demo environment, including Quarkus, was working.
In order to further automate setting up my demo environment, I changed the content of file quarkus.sh to:
#!/bin/bash echo "**** Begin installing Quarkus" #Installing JBang with JDK 17 curl -Ls https://sh.jbang.dev | bash -s - trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/ #Installing Quarkus curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio echo "**** End installing Quarkus"
As you can see in the list below, there are some next steps you can take in working with Quarkus.
[https://quarkus.io/get-started/]
With these next steps, I conclude this article. I shared with you the steps I took to set up a demo environment, so I could get started with Quarkus (again 😊).
My focus for a next article will be on “Deploying Quarkus Applications on Kubernetes” by using the Kubernetes extension and of course also extending my demo environment accordingly.
As I mentioned earlier, some years ago, I wrote a series of articles about Quarkus. In those articles you can also find more information about some of the “ Next Steps” mentioned above.
In those days, Quarkus needed a JDK and Maven or Gradle being installed.
Feel free, among my other articles on this subject, to read:
- “Quarkus – Supersonic Subatomic Java, setting up a demo environment using Vagrant and Oracle VirtualBox”, August 17, 2020
In this article, you can read more about the steps I took, to set up a demo environment, so I could get started with Quarkus. - “Using Vagrant and shell scripts to further automate setting up my Quarkus demo environment from scratch and trying out a Quarkus code guide”, August 21, 2020
In this article, you can read more about the steps I took to further automate setting up my demo environment and the Quarkus code guide “Quarkus – Creating Your First Application”, I tried out, including the hot deployment with background compilation. - “Quarkus – Supersonic Subatomic Java, trying out some Quarkus code guides (part1)”, September 1, 2020
In this article, you can read more about other Quarkus code guides I tried out, related to the following topics:
– Configuring Your Application
– Compiling the application to a native executable by using a local GraalVM installation or by leveraging a container runtime such as Docker and using a Docker container that embeds GraalVM
- “Quarkus – Supersonic Subatomic Java, trying out some Quarkus code guides (part2)”, September 7, 2020
In this article, you can read more about a Quarkus code guide I tried out, related to the following topic:
– Packaging the native executable in a container