이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 7. Packaging and running the Quarkus Getting Started application
After you compile your Quarkus Getting Started project, you can package it in a JAR file and run it from the command line.
Prerequisites
- You have compiled the Quarkus Getting Started project.
Procedure
To package your Quarkus Getting Started project, enter the following command in the
rootdirectory:./mvnw package
./mvnw packageCopy to Clipboard Copied! Toggle word wrap Toggle overflow This command produces the following JAR files in the
/targetdirectory:-
getting-started-1.0-0-SNAPSHOT.jar: Contains the classes and resources of the projects. This is the regular artifact produced by the Maven build. getting-started-1.0-0-SNAPSHOT-runner.jar: Is an executable JAR file. Be aware that this file is not an uber-JAR file because the dependencies are copied into thetarget/libdirectory.WarningWhen your application is running in development mode, you must press CTRL+C to stop your application. You will encounter a port conflict when you try to package your application when development mode is enabled.
-
Enter the following command to start your application:
java -jar target/getting-started-1.0-0-SNAPSHOT-runner.jar
java -jar target/getting-started-1.0-0-SNAPSHOT-runner.jarCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
Class-Pathentry of theMANIFEST.MFfile from therunnerJAR file explicitly lists the JAR files from thelibdirectory. If you want to deploy your application from another location, you must copy therunnerJAR file as well as thelibdirectory.