Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.env file is not recognized while using gradle gradlew quarkusDev #9752

Closed
jayakrishnankarolilnlsn opened this issue Jun 3, 2020 · 1 comment
Labels
kind/bug Something isn't working
Milestone

Comments

@jayakrishnankarolilnlsn
Copy link

Describe the bug
.env file is not recognized while using gradle ./gradlew quarkusDev.
However, ./mvnw quarkus:dev is running without any issues. It is generating .env symlink under /target directory.

Expected behavior
Application should start without any issues.

Actual behavior

2020-06-03 12:01:28,677 ERROR [io.qua.application] (Quarkus Main Thread) Failed to start 
application: java.util.NoSuchElementException: Property MESSAGE not found
        at io.smallrye.config.SmallRyeConfig.propertyNotFound(SmallRyeConfig.java:209)
        ....
        ....

To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/quarkusio/quarkus-quickstarts.git
git checkout 1.4.2.Final
cd quarkus-quickstarts/config-quickstart
gradle init

# fix the gradle files -> settings.gradle, build.gradle and add gradle.properties

gradlew quarkusDev -> results in startup exceptions

Configuration
application.properties:

greeting.message = ${MESSAGE}
greeting.name = quarkus

.env:

MESSAGE=hello

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver: Microsoft Windows [Version 10.0.18363.720]
  • Output of java -version:
java 11.0.6 2020-01-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)
  • GraalVM version (if different from Java): NA
  • Quarkus version or git rev: 1.4.2
  • Build tool (ie. output of mvnw --version or gradlew --version):
------------------------------------------------------------
Gradle 6.2-rc-2
------------------------------------------------------------

Build time:   2020-02-11 22:14:00 UTC
Revision:     8a7f6425a217ceeff6c5a76f8dd533b770606110

Kotlin:       1.3.61
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.6 (Oracle Corporation 11.0.6+8-LTS)
OS:           Windows 10 10.0 amd64

Additional context
Feature was added in #7519.
Related issue: #8297

@geoand
Copy link
Contributor

geoand commented Jun 4, 2020

This has actually already been fixed in Quarkus 1.5.0.Final, but I created #9778 to add a proper test

@geoand geoand closed this as completed Jun 4, 2020
geoand added a commit to geoand/quarkus that referenced this issue Jun 4, 2020
geoand added a commit that referenced this issue Jun 4, 2020
Add test to ensure that .env works in Gradle
@gsmet gsmet added this to the 1.5.0.Final milestone Jun 10, 2020
johnaohara pushed a commit to johnaohara/quarkus that referenced this issue Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants