-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
@QuarkusTest in a simple java Gradle project fails: "No builders are available to build a model of type 'io.quarkus.bootstrap.model.ApplicationModel'." #27010
Comments
/cc @glefloch, @quarkusio/devtools |
Please provide a reproducer project. |
See: https://github.com/jskillin-idt/quarkusio-quarkus-issues-27010 |
I'll let @aloubyansky and @glefloch decide, but in my opinion, this is not something we aim to support. In no place do we say that one can forgo the use of the Quarkus plugin the supported build tools |
Yes I agree with @geoand, we actually need the plugin test in ordre to detect which dependencies are declared, where are deployment modules, etc. |
Thanks @glefloch for the input. I am going to close this as |
Just to clarify, I've pushed an example Maven version of the same project to this branch in the example repo: Is this also considered an invalid configuration? Edit: to be clear, the part I am curious about is the commented-out lines in the pom.xml file in that branch. If you'd rather not have this discussion in GitHub Issues I have a topic where I initially brought this up in Zulip: |
I think it's reasonable to consider supporting this use-case. @glefloch would you mind taking a look what is in the way here? |
Has someone been able to look at the Maven version yet? It's just a generated project from the quarkus CLI, with the Quarkus Maven plugin commented out. Is that usage acceptable? |
i have the same use case for this, this sample project somehow made it work with a maven project: Designing-Hexagonal-Architecture-with-Java -- having a separate sub-project where it is running test and having a bootstrap project starting quarkus but I am having the same problem above when using gradle... |
Describe the bug
In a Gradle project, a "QuarkusTest" unit test will fail when it is run in a simple "java" or "java-library" project. This is unexpected because these tests work fine in a Maven project. This kind of test is super useful because this allows for fast development cycles at the library level, before waiting for all of these libraries to collaborate in an integration test at the other end of development when a full Quarkus application or extension is finally built.
Expected behavior
Gradle projects should be able to run "QuarkusTest" tests without having to be in a Quarkus-specific project.
Actual behavior
The unit test run fails quickly with the error:
No builders are available to build a model of type 'io.quarkus.bootstrap.model.ApplicationModel'.
(Full stack trace will be attached.)How to Reproduce?
test { useJUnitPlatform() }
Output of
uname -a
orver
Linux jacob-ubuntu-dev 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.15" 2022-04-19 OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1) OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 7.4.2
Additional information
gradle-quarkus-test-stack.txt
The text was updated successfully, but these errors were encountered: