After you compile your Quarkus Getting Started project, package it in a JAR file and run it from the command line. The packaged application runs on a standard JVM without dev mode and is suitable for handoff to a runtime environment.
-
You have compiled the Quarkus Getting Started project.
-
Go to the
getting-startedproject directory. -
To package your Quarkus Getting Started project, use one of the following methods, depending on the developer tool that you intend to use:
-
If you prefer to use Apache Maven:
mvn package -
If you prefer to use the Quarkus CLI:
quarkus build -
If you prefer to use the Maven wrapper:
./mvnw packageThis command produces the following output in the
targetdirectory:-
quarkus-app/quarkus-run.jar: The executable JAR file for your application. This file is not an uber-JAR. Dependencies are copied to thetarget/quarkus-app/libdirectory and must be present for the application to run.
-
-
-
To start your application, enter the following command:
java -jar target/quarkus-app/quarkus-run.jarNote:
-
Before you run the application, stop dev mode by pressing Ctrl+C to avoid a port conflict.
-
The
Class-Pathentry of theMANIFEST.MFfile in thequarkus-run.jarfile explicitly lists the JAR files from thelibdirectory. To deploy your application from another location, deploy the wholequarkus-appdirectory.
Important: Various IBM Enterprise Build of Quarkus extensions contribute non-application endpoints that provide different kinds of information about the application. For example, the
quarkus-smallrye-health,quarkus-micrometer-registry-prometheus, andquarkus-smallrye-openapiextensions.You can access these non-application endpoints by specifying a
/qprefix. For example,/q/health,/q/metrics,/q/openapi.For non-application endpoints that might present a security risk, you can expose those endpoints under a different TCP port by using a dedicated management interface. For more information, see the Quarkus Management interface reference guide.
-