quarkus: Maven quarkus:dev does not recognise dependencies added through activated profile
Describe the bug
When running quarkus:dev from Maven and some dependency is in an activated profile, this dependency is not picked up. On the contrary, when running the packaged -runner.jar, this dependency is indeed activated.
Expected behavior Dependencies should be picked up, however they get activated.
Actual behavior Dependencies defined in an activated Maven profile are not picked up.
To Reproduce Steps to reproduce the behavior:
-
Create a sample project e.g. through https://code.quarkus.io/ - I included Arc. RESTEasy-JAX-RS, Hibernate ORM and JDBC Driver H2, …
-
Move one dependency from the top-level
<dependencies>in a profile; I removed thequarkus-jdbc-h2and added the following profile:<profile> <id>xxx</id> <dependencies> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-jdbc-h2</artifactId> </dependency> </dependencies> </profile> -
Try the following:
-
Start quarkus:dev, activating the profile:
mvn compile quarkus:dev -PxxxQuarkus reports:
INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, narayana-jta, resteasy]Observe that
jdbc-h2is not activated! -
Now package and run the runner:
mvn package -Pxxx java -jar target/code-with-quarkus-1.0.0-SNAPSHOT-runner.jarQuarkus reports:
INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, narayana-jta, resteasy]
-
Configuration None - using the pristine source as downloaded from code.
Screenshots N/A
Environment (please complete the following information):
-
Output of
uname -aorver: Linux wanderer 4.15.0-64-generic <span>#</span>73-Ubuntu SMP Thu Sep 12 13:16:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux -
Output of
java -version:openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1) OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing) -
GraalVM version (if different from Java): -N/A-
-
Quarkus version or git rev: 1.2.0.Final
Additional context N/A
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (10 by maintainers)
Excellent, thanks @nikospara
Yes, this issue has been reported before. Please watch the status of #3702. I am going to close this one as a duplicate. Thanks for reporting.