Chapter 11. Using Quarkus development mode

Development mode enables hot deployment with background compilation, which means that when you modify your Java files or your resource files and then refresh your browser, the changes automatically take effect. This also works for resource files such as the configuration property file.

Prerequisites

  • You have a Quarkus Maven application.

Procedure

  1. To start Quarkus in development mode, enter the following command in the directory that contains your Quarkus application pom.xml file:

    ./mvnw quarkus:dev
  2. Make changes to your application and save the files.
  3. Refresh the browser to trigger a scan of the workspace.

    If any changes are detected, the Java files are recompiled and the application is redeployed. Your request is then serviced by the redeployed application. If there are any issues with compilation or deployment, an error page appears.

    In development mode, the debugger is activated and listens on port 5005.

  4. Optional: To wait for the debugger to attach before running the application, include -Dsuspend:

    ./mvnw quarkus:dev -Dsuspend
  5. Optional: To prevent the debugger from running, include -Ddebug=false:

    ./mvnw quarkus:dev -Ddebug=false