Skip to content

Gradle quarkusRun ignores quarkus.profile from application.properties #48490

Description

@rodcheater

Describe the bug

Running a Quarkus app using ./gradlew quarkusRun always uses the prod profile irrespective of the value of quarkus.profile in application.properties. This is in contrast to packaging and running the app using ./gradlew build && java -jar build/quarkus-app/quarkus-run.jar.

Expected behavior

Gradle quarkusRun and running the JAR from Gradle build should have the same behaviour.

Actual behavior

Gradle quarkusRun always uses the prod profile.

Note also that, despite this, Gradle quarkusRun emits a log line on startup using the profile from application.properties; e.g., Profile dev activated.

How to Reproduce?

Reproducer: quarkus-reproducer.zip

Steps to reproduce

  1. Run the application using ./gradlew quarkusRun.
  2. Navigate to http://localhost:8080/hello in a browser.

Expected result

The browser displays the text Hello from Quarkus.

Actual result

The browser displays the text Hello from Production.

Output of uname -a or ver

Darwin Rods-MacBook-Pro.local 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:52:00 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6031 arm64

Output of java -version

openjdk version "21.0.7" 2025-04-15 OpenJDK Runtime Environment Homebrew (build 21.0.7) OpenJDK 64-Bit Server VM Homebrew (build 21.0.7, mixed mode, sharing)

Quarkus version or git rev

3.23.4

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.14.1

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions