Quarkus (Gradle) build should not run tests
See original GitHub issueDescription
While building the application I’ve noticed that ./gradlew build -Dquarkus.package.type=fast-jar
will also run all the tests:
[x80486@uplink:~/Workshop/Development/kotlin-quarkus]$ ./gradlew build -Dquarkus.package.type=fast-jar
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.8.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
> Task :quarkusGenerateCode
preparing quarkus application
> Task :compileKotlin
> Task :compileJava NO-SOURCE
> Task :processResources
> Task :classes
> Task :inspectClassesForKotlinIC
> Task :jar
> Task :startScripts
> Task :distTar
> Task :distZip
> Task :quarkusGenerateCodeTests
preparing quarkus application
> Task :compileTestKotlin
> Task :compileTestJava NO-SOURCE
> Task :processTestResources
> Task :testClasses
> Task :test
> Task :quarkusBuild
building quarkus jar
> Task :assemble
> Task :check
> Task :build
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 6s
13 actionable tasks: 13 executed
I think this should be avoided because that’s a different (usually time consuming) stage/task that’s triggered on a different phase.
Implementation Ideas
Make the Gradle (and/or Maven) plugin avoid check
and/or test
, somehow like this command: ./gradlew -Dquarkus.package.type=fast-jar build --exclude-task=check
— that simple I guess 😓
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Building Quarkus apps with Gradle
This task will resolve all the runtime, build time, test and dev mode dependencies of the application to the Gradle cache. Once executed,...
Read more >quarkus gradle test not executed - Stack Overflow
With maven the contained unittest is executed. Then I tried the proposed gradle build file, because we use gradle instead of maven. When...
Read more >Unit tests in gradle not running · Issue #2307 - GitHub
I am trying to run the simple 'getting-started'-type gradle project with quarkus and my unit test fails everytime with this error.
Read more >Building Quarkus apps with Gradle
By default, Quarkus tests in JVM mode are run using the test configuration profile. If you are not familiar with Quarkus configuration profiles,...
Read more >Skipping Tests With Gradle - Baeldung
Although skipping tests is usually a bad idea, there are some situations where it might be useful, and it saves us some time....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually
build
is a default gradle task. If you only need the quarkus build, you can call thequarkusBuild
task which does not depend on test.yes, I’m going to update the docs.