Skip to content

The objective of this project is purely for learning, I am testing combining technology like Vaadin Flow with Quarkus

License

Notifications You must be signed in to change notification settings

fredpena/vaadin-quarkus

Repository files navigation

vaadin-quarkus

The objective of this project is purely for learning, I am testing combining technology like Vaadin Flow with Quarkus

Screenshot 2024-01-29 at 15 00 17

Screenshot 2024-01-26 at 10 24 50

This project uses Quarkus, the Supersonic Subatomic Java Framework.

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.

The project is a standard Maven project. To run it from the command line, tab mvnw (Windows), or ./mvnw (Mac & Linux), then open http://localhost:8080 in your browser.

The 'defaultGoal' is configured in the pom file.

# Mac & Linux
./mvnw
# Windows
  mvnw

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:

# Mac & Linux
./mvnw package
# Windows
  mvnw package

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

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

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

# Mac & Linux
./mvnw package -Dquarkus.package.type=uber-jar
# Windows
mvnw package -Dquarkus.package.type=uber-jar

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

Creating a native executable

You can create a native executable using:

# Mac & Linux
./mvnw package -Dnative
# Windows
mvnw package -Dnative

Or, if you don't have GraalVM installed, you can run the native executable build in a container using:

# Mac & Linux
./mvnw package -Dnative -Dquarkus.native.container-build=true
# Windows
mvnw package -Dnative -Dquarkus.native.container-build=true

You can then execute your native executable with: ./target/vaadin-quarkus-1.0.0-runner

If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.

Deploying using Docker

To build the Dockerized version of the project, run

mvn package -Pproduction
docker build . -t vaadin-quarkus-app:latest

Once the Docker image is correctly built, you can test it locally using

docker run -p 8080:8080 vaadin-quarkus-app:latest

Related Guides

  • Vaadin Flow (guide): Vaadin Flow is a unique framework that lets you build web apps without writing HTML or JavaScript

Provided Code

Vaadin Flow example

This is an example application to get started with Vaadin Flow. It generates a simple view interacting with an injected service

Related guide section...

Useful links

About

The objective of this project is purely for learning, I am testing combining technology like Vaadin Flow with Quarkus

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages