You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the maven-profiledep-extension to compose the pom.xml via profiles, the quarkus tests fail to run. Also, the application fails to start in dev mode.
As the extension results in non-standard pom.xml files it is not unrealistic to expect to have to use the quarkus.bootstrap.effective-model-builder flag - however this appears not to have an effect.
In the provided reproducer the parent pom contains separate profiles for adding maven plugins and dependencies for quarkus, resteasy, and testing. This allows for the standardisation of features used in child projects - particularly when dealing with large multi-module projects across several teams.
Expected behavior
When running tests, the tests complete successfully.
When starting the application with mvn quarkus:dev, the application starts in dev mode successfully.
Actual behavior
mvn test throws the following exception:
[INFO] Running org.acme.getting.started.GreetingResourceTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.71 s <<< FAILURE! - in org.acme.getting.started.GreetingResourceTest
[ERROR] org.acme.getting.started.GreetingResourceTest.testHelloEndpoint Time elapsed: 0 s <<< ERROR!
java.lang.RuntimeException: java.lang.RuntimeException: The tests were run against a directory that does not contain a Quarkus project. Please ensure that the test is configured to use the proper working directory.
Caused by: java.lang.RuntimeException: The tests were run against a directory that does not contain a Quarkus project. Please ensure that the test is configured to use the proper working directory.
mvn quarkus:dev throws the following exception:
2021-07-24 21:08:00,327 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: java.lang.RuntimeException: Failed to load steps from class io.quarkus.deployment.logging.LoggingResourceProcessor
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:413)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:275)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:66)
at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:87)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:448)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:61)
at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:132)
at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:89)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:145)
at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: java.lang.RuntimeException: Failed to load steps from class io.quarkus.deployment.logging.LoggingResourceProcessor
at io.quarkus.deployment.ExtensionLoader.loadStepsFrom(ExtensionLoader.java:196)
at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:102)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:411)
... 9 more
Caused by: java.lang.IllegalStateException: No root found for class io.quarkus.runtime.logging.LogBuildTimeConfig
at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadResult.requireRootObjectForClass(BuildTimeConfigurationReader.java:809)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
at io.quarkus.deployment.ExtensionLoader.loadStepsFromClass(ExtensionLoader.java:623)
at io.quarkus.deployment.ExtensionLoader.loadStepsFrom(ExtensionLoader.java:194)
... 11 more
The application starts fine with java -jar target/quarkus-app/quarkus-run.jar
Tests and dev mode work fine when using a flattened pom generated by the flatten-maven-plugin. (However there is also a bug regarding this I will raise in another ticket.)
The effective pom appears to contain all the correct elements for tests and dev mode to work correctly. (A copy of the help:effective-pom output is stoed in the reproducer under getting-started/effective-pom.log)
The use of the profiledep extension is an edge case, and so a valid response may be that the flattened pom must be used in both of these cases. The main reason for raising the bug is that the quarkus.bootstrap.effective-model-builder flag appears not to have the expected effect.
The text was updated successfully, but these errors were encountered:
During the test setup the original Maven build context isn't available to the Quarkus bootstrap process it's unfortunately unaware of what the Maven extension did and which profiles should be activated.
Describe the bug
When using the maven-profiledep-extension to compose the pom.xml via profiles, the quarkus tests fail to run. Also, the application fails to start in dev mode.
As the extension results in non-standard pom.xml files it is not unrealistic to expect to have to use the
quarkus.bootstrap.effective-model-builder
flag - however this appears not to have an effect.In the provided reproducer the parent pom contains separate profiles for adding maven plugins and dependencies for quarkus, resteasy, and testing. This allows for the standardisation of features used in child projects - particularly when dealing with large multi-module projects across several teams.
Expected behavior
mvn quarkus:dev
, the application starts in dev mode successfully.Actual behavior
How to Reproduce?
Reproducer: https://github.com/garyhodgson/quarkusdev_profiledep_reproducer
Steps:
Test:
(Note that the
quarkus.bootstrap.effective-model-builder
flag is also set in the surefire configuration within the test profile.)Dev mode:
Output of
uname -a
orver
CYGWIN_NT-10.0 garyhodgson-PC 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin
Output of
java -version
openjdk version "11" 2018-09-25 OpenJDK Runtime Environment 18.9 (build 11+28) OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
GraalVM version (if different from Java)
N/A
Quarkus version or git rev
2.0.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Additional information
java -jar target/quarkus-app/quarkus-run.jar
The use of the profiledep extension is an edge case, and so a valid response may be that the flattened pom must be used in both of these cases. The main reason for raising the bug is that the
quarkus.bootstrap.effective-model-builder
flag appears not to have the expected effect.The text was updated successfully, but these errors were encountered: