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

Quarkus (Gradle) build should not run tests #15471

Closed
x80486 opened this issue Mar 4, 2021 · 6 comments · Fixed by #15482
Closed

Quarkus (Gradle) build should not run tests #15471

x80486 opened this issue Mar 4, 2021 · 6 comments · Fixed by #15482
Labels
Milestone

Comments

@x80486
Copy link
Contributor

x80486 commented Mar 4, 2021

Description

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 😓

@x80486 x80486 added the kind/enhancement New feature or request label Mar 4, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 4, 2021

/cc @evanchooly, @glefloch, @quarkusio/devtools

@x80486 x80486 changed the title Quarkus (Gradle) build should not tests Quarkus (Gradle) build should not run tests Mar 4, 2021
@x80486
Copy link
Contributor Author

x80486 commented Mar 4, 2021

And just a side note, I think with release 1.12.x the Gradle build task is defaulting to a "fast-jar", so I guess the Gradle Tooling guide might need some changes 😎

@glefloch
Copy link
Member

glefloch commented Mar 4, 2021

Actually build is a default gradle task. If you only need the quarkus build, you can call the quarkusBuild task which does not depend on test.

@gastaldi
Copy link
Contributor

gastaldi commented Mar 4, 2021

Sounds like this issue has been answered and can be closed.

@gsmet
Copy link
Member

gsmet commented Mar 4, 2021

Hmmm, except the doc part that needs an update for fast-jar. @glefloch could you have a look at it?

@glefloch
Copy link
Member

glefloch commented Mar 4, 2021

yes, I'm going to update the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants