Skip to content

Commit ffe5de4

Browse files
committed
Rename quarkus-junit5* artifacts to quarkus-junit-jupiter*
And put relocations in place. Update recipes will also be provided.
1 parent b820342 commit ffe5de4

File tree

769 files changed

+1080
-899
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

769 files changed

+1080
-899
lines changed

bom/application/pom.xml

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
<scope>import</scope>
383383
</dependency>
384384

385-
<!-- JUnit 5 dependencies, imported as a BOM -->
385+
<!-- JUnit Jupiter dependencies, imported as a BOM -->
386386
<dependency>
387387
<groupId>org.junit</groupId>
388388
<artifactId>junit-bom</artifactId>
@@ -3515,57 +3515,57 @@
35153515
<!-- Quarkus test dependencies -->
35163516
<dependency>
35173517
<groupId>io.quarkus</groupId>
3518-
<artifactId>quarkus-junit5</artifactId>
3518+
<artifactId>quarkus-junit-jupiter</artifactId>
35193519
<version>${project.version}</version>
35203520
</dependency>
35213521
<dependency>
35223522
<groupId>io.quarkus</groupId>
3523-
<artifactId>quarkus-junit5-config</artifactId>
3523+
<artifactId>quarkus-junit-jupiter-config</artifactId>
35243524
<version>${project.version}</version>
35253525
</dependency>
35263526
<dependency>
35273527
<groupId>io.quarkus</groupId>
3528-
<artifactId>quarkus-test-security</artifactId>
3528+
<artifactId>quarkus-junit-jupiter-component</artifactId>
35293529
<version>${project.version}</version>
35303530
</dependency>
35313531
<dependency>
35323532
<groupId>io.quarkus</groupId>
3533-
<artifactId>quarkus-test-security-jwt</artifactId>
3533+
<artifactId>quarkus-junit-jupiter-internal</artifactId>
35343534
<version>${project.version}</version>
35353535
</dependency>
35363536
<dependency>
35373537
<groupId>io.quarkus</groupId>
3538-
<artifactId>quarkus-test-security-oidc</artifactId>
3538+
<artifactId>quarkus-junit-jupiter-mockito</artifactId>
35393539
<version>${project.version}</version>
35403540
</dependency>
35413541
<dependency>
35423542
<groupId>io.quarkus</groupId>
3543-
<artifactId>quarkus-test-security-webauthn</artifactId>
3543+
<artifactId>quarkus-junit-jupiter-mockito-config</artifactId>
35443544
<version>${project.version}</version>
35453545
</dependency>
35463546
<dependency>
35473547
<groupId>io.quarkus</groupId>
3548-
<artifactId>quarkus-junit5-component</artifactId>
3548+
<artifactId>quarkus-test-common</artifactId>
35493549
<version>${project.version}</version>
35503550
</dependency>
35513551
<dependency>
35523552
<groupId>io.quarkus</groupId>
3553-
<artifactId>quarkus-junit5-internal</artifactId>
3553+
<artifactId>quarkus-test-security</artifactId>
35543554
<version>${project.version}</version>
35553555
</dependency>
35563556
<dependency>
35573557
<groupId>io.quarkus</groupId>
3558-
<artifactId>quarkus-test-common</artifactId>
3558+
<artifactId>quarkus-test-security-jwt</artifactId>
35593559
<version>${project.version}</version>
35603560
</dependency>
35613561
<dependency>
35623562
<groupId>io.quarkus</groupId>
3563-
<artifactId>quarkus-junit5-mockito</artifactId>
3563+
<artifactId>quarkus-test-security-oidc</artifactId>
35643564
<version>${project.version}</version>
35653565
</dependency>
35663566
<dependency>
35673567
<groupId>io.quarkus</groupId>
3568-
<artifactId>quarkus-junit5-mockito-config</artifactId>
3568+
<artifactId>quarkus-test-security-webauthn</artifactId>
35693569
<version>${project.version}</version>
35703570
</dependency>
35713571
<dependency>
@@ -6604,6 +6604,37 @@
66046604
<artifactId>quarkus-vertx-http-dev-ui-spi</artifactId>
66056605
<version>${project.version}</version>
66066606
</dependency>
6607+
6608+
<dependency>
6609+
<groupId>io.quarkus</groupId>
6610+
<artifactId>quarkus-junit5</artifactId>
6611+
<version>${project.version}</version>
6612+
</dependency>
6613+
<dependency>
6614+
<groupId>io.quarkus</groupId>
6615+
<artifactId>quarkus-junit5-config</artifactId>
6616+
<version>${project.version}</version>
6617+
</dependency>
6618+
<dependency>
6619+
<groupId>io.quarkus</groupId>
6620+
<artifactId>quarkus-junit5-component</artifactId>
6621+
<version>${project.version}</version>
6622+
</dependency>
6623+
<dependency>
6624+
<groupId>io.quarkus</groupId>
6625+
<artifactId>quarkus-junit5-internal</artifactId>
6626+
<version>${project.version}</version>
6627+
</dependency>
6628+
<dependency>
6629+
<groupId>io.quarkus</groupId>
6630+
<artifactId>quarkus-junit5-mockito</artifactId>
6631+
<version>${project.version}</version>
6632+
</dependency>
6633+
<dependency>
6634+
<groupId>io.quarkus</groupId>
6635+
<artifactId>quarkus-junit5-mockito-config</artifactId>
6636+
<version>${project.version}</version>
6637+
</dependency>
66076638
<!-- End of Relocations, please put new extensions above this list -->
66086639

66096640
</dependencies>

core/deployment/src/main/java/io/quarkus/deployment/dev/testing/JunitTestRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ private DiscoveryResult discoverTestClasses() {
781781
// This is fine, and usually just means that test-framework/junit5 isn't one of the project dependencies
782782
// In that case, fallback to loading classes as we normally would, using a TCCL
783783
log.debug(
784-
"Could not load class for FacadeClassLoader. This might be because quarkus-junit5 is not on the project classpath: "
784+
"Could not load class for FacadeClassLoader. This might be because quarkus-junit-jupiter is not on the project classpath: "
785785
+ e);
786786
log.debug(e);
787787
classLoaderForLoadingTests = Thread.currentThread()

core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public interface TestConfig {
4646
* The FQCN of the JUnit <code>ClassOrderer</code> to use. If the class cannot be found, it fallbacks to JUnit
4747
* default behaviour which does not set a <code>ClassOrderer</code> at all.
4848
*
49-
* @see <a href=https://junit.org/junit5/docs/current/user-guide/#writing-tests-test-execution-order-classes>JUnit Class
49+
* @see <a href=https://docs.junit.org/current/user-guide/#writing-tests-test-execution-order-classes>JUnit Class
5050
* Order<a/>
5151
*/
5252
@WithDefault("io.quarkus.test.junit.util.QuarkusTestProfileAwareClassOrderer")
@@ -55,7 +55,7 @@ public interface TestConfig {
5555
/**
5656
* Tags that should be included for continuous testing. This supports JUnit Tag Expressions.
5757
*
58-
* @see <a href="https://junit.org/junit5/docs/current/user-guide/#running-tests-tag-expressions">JUnit Tag Expressions</a>
58+
* @see <a href="https://docs.junit.org/current/user-guide/#running-tests-tag-expressions">JUnit Tag Expressions</a>
5959
*/
6060
Optional<List<String>> includeTags();
6161

@@ -68,7 +68,7 @@ public interface TestConfig {
6868
* <p>
6969
* This supports JUnit Tag Expressions.
7070
*
71-
* @see <a href="https://junit.org/junit5/docs/current/user-guide/#running-tests-tag-expressions">JUnit Tag Expressions</a>
71+
* @see <a href="https://docs.junit.org/current/user-guide/#running-tests-tag-expressions">JUnit Tag Expressions</a>
7272
*/
7373
@WithDefault("slow")
7474
Optional<List<String>> excludeTags();

core/runtime/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
<parentFirstArtifact>io.quarkus:quarkus-class-change-agent</parentFirstArtifact>
207207
<parentFirstArtifact>org.jacoco:org.jacoco.agent:runtime</parentFirstArtifact>
208208
<parentFirstArtifact>io.quarkus:quarkus-bootstrap-gradle-resolver</parentFirstArtifact>
209-
<parentFirstArtifact>io.quarkus:quarkus-junit5-mockito-config</parentFirstArtifact>
209+
<parentFirstArtifact>io.quarkus:quarkus-junit-jupiter-mockito-config</parentFirstArtifact>
210210

211211
<!-- Load the junit engine parent first, so it is shared between the outer dev mode
212212
process and the test application-->

docs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</dependency>
101101
<dependency>
102102
<groupId>io.quarkus</groupId>
103-
<artifactId>quarkus-junit5</artifactId>
103+
<artifactId>quarkus-junit-jupiter</artifactId>
104104
<scope>test</scope>
105105
</dependency>
106106
<!-- Minimal test dependencies for consistent build order -->

docs/src/main/asciidoc/aws-lambda.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ dependencies {
293293
implementation 'io.quarkus:quarkus-resteasy'
294294
implementation 'io.quarkus:quarkus-amazon-lambda'
295295
296-
testImplementation 'io.quarkus:quarkus-junit5'
296+
testImplementation 'io.quarkus:quarkus-junit-jupiter'
297297
testImplementation 'io.rest-assured:rest-assured'
298298
}
299299
----

docs/src/main/asciidoc/building-my-first-extension.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Let's have a look at the deployment's `./greeting-extension/deployment/pom.xml`.
263263
</dependency>
264264
<dependency>
265265
<groupId>io.quarkus</groupId>
266-
<artifactId>quarkus-junit5-internal</artifactId>
266+
<artifactId>quarkus-junit-jupiter-internal</artifactId>
267267
<scope>test</scope>
268268
</dependency>
269269
</dependencies>
@@ -460,7 +460,7 @@ dependencies {
460460
461461
implementation platform("io.quarkus:quarkus-bom:${quarkus.version}")
462462
463-
testImplementation 'io.quarkus:quarkus-junit5-internal'
463+
testImplementation 'io.quarkus:quarkus-junit-jupiter-internal'
464464
}
465465
----
466466

@@ -666,7 +666,7 @@ Now, Quarkus will process this new task which will result in the bytecode genera
666666
When developing a Quarkus extension, you mainly want to test your feature is properly deployed in an application and works as expected.
667667
That's why the tests will be hosted in the `deployment` module.
668668

669-
Quarkus proposes facilities to test extensions via the `quarkus-junit5-internal` artifact (which should already be in the deployment pom.xml), in particular the `io.quarkus.test.QuarkusUnitTest` runner which starts an application with your extension.
669+
Quarkus proposes facilities to test extensions via the `quarkus-junit-jupiter-internal` artifact (which should already be in the deployment pom.xml), in particular the `io.quarkus.test.QuarkusUnitTest` runner which starts an application with your extension.
670670

671671
We will use https://rest-assured.io[RestAssured] (massively used in Quarkus) to test our HTTP endpoint.
672672
Let's add the `rest-assured` dependency into the `./greeting-extension/deployment/pom.xml`.

docs/src/main/asciidoc/doc-contribute-docs-howto.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Our builds use https://vale.sh[Vale] to check grammar, style, and word usage in
269269

270270
This approach requires a working container runtime (Docker or xref:podman.adoc[Podman]).
271271

272-
The `docs` module has a JUnit 5 test that will run the Vale linter in a container (using https://www.testcontainers.org/[Testcontainers]).
272+
The `docs` module has a JUnit Jupiter test that will run the Vale linter in a container (using https://www.testcontainers.org/[Testcontainers]).
273273
It verifies both Quarkus document metadata and Vale style rules.
274274

275275
Run the test in one of the following ways:

docs/src/main/asciidoc/getting-started-testing.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ In your build file you should see 2 test dependencies:
5757
----
5858
<dependency>
5959
<groupId>io.quarkus</groupId>
60-
<artifactId>quarkus-junit5</artifactId>
60+
<artifactId>quarkus-junit-jupiter</artifactId>
6161
<scope>test</scope>
6262
</dependency>
6363
<dependency>
@@ -73,18 +73,18 @@ In your build file you should see 2 test dependencies:
7373
[source,groovy,subs=attributes+]
7474
----
7575
dependencies {
76-
testImplementation("io.quarkus:quarkus-junit5")
76+
testImplementation("io.quarkus:quarkus-junit-jupiter")
7777
testImplementation("io.rest-assured:rest-assured")
7878
}
7979
----
8080
****
8181

82-
`quarkus-junit5` is required for testing, as it provides the `@QuarkusTest` annotation that controls the testing framework.
82+
`quarkus-junit-jupiter` is required for testing, as it provides the `@QuarkusTest` annotation that controls the testing framework.
8383
`rest-assured` is not required but is a convenient way to test HTTP endpoints, we also provide integration that automatically
8484
sets the correct URL so no configuration is required.
8585

86-
Because we are using JUnit 5, the version of the https://maven.apache.org/surefire/maven-surefire-plugin/[Surefire Maven Plugin]
87-
must be set, as the default version does not support Junit 5:
86+
Because we are using JUnit Jupiter, the version of the https://maven.apache.org/surefire/maven-surefire-plugin/[Surefire Maven Plugin]
87+
must be set, as the default version does not support JUnit Jupiter:
8888

8989
[source,xml,subs=attributes+]
9090
----
@@ -470,11 +470,11 @@ a bit slower, as it adds a shutdown/startup cycle to the test time, but gives a
470470

471471
To reduce the amount of times Quarkus needs to restart, `io.quarkus.test.junit.util.QuarkusTestProfileAwareClassOrderer`
472472
is registered as a global `ClassOrderer` as described in the
473-
link:https://junit.org/junit5/docs/current/user-guide/#writing-tests-test-execution-order-classes[JUnit 5 User Guide].
473+
link:https://docs.junit.org/current/user-guide/#writing-tests-test-execution-order-classes[JUnit Jupiter User Guide].
474474
The behavior of this `ClassOrderer` is configurable via `application.properties` using the property
475475
`quarkus.test.class-orderer`. The property accepts the FQCN of the `ClassOrderer` to use. If the class cannot be found,
476476
it fallbacks to JUnit default behaviour which does not set a `ClassOrderer` at all. It can also be disabled entirely by
477-
setting another `ClassOrderer` that is provided by JUnit 5 or even your own custom one.
477+
setting another `ClassOrderer` that is provided by JUnit Jupiter or even your own custom one.
478478

479479
=== Writing a Profile
480480

@@ -704,7 +704,7 @@ matches the value of `quarkus.test.profile.tags`.
704704

705705
== Nested Tests
706706

707-
JUnit 5 https://junit.org/junit5/docs/current/user-guide/#writing-tests-nested[@Nested tests] are useful for structuring more complex test scenarios.
707+
JUnit Jupiter https://docs.junit.org/current/user-guide/#writing-tests-nested[@Nested tests] are useful for structuring more complex test scenarios.
708708
However, note that it is not possible to assign different test profiles or resources to nested tests within the same parent class.
709709

710710
== Mock Support
@@ -836,12 +836,12 @@ Building on the features provided by `QuarkusMock`, Quarkus also allows users to
836836

837837
[IMPORTANT]
838838
====
839-
This functionality is available with the `@io.quarkus.test.InjectMock` annotation **only if** the `quarkus-junit5-mockito` dependency is present:
839+
This functionality is available with the `@io.quarkus.test.InjectMock` annotation **only if** the `quarkus-junit-jupiter-mockito` dependency is present:
840840
[source,xml]
841841
----
842842
<dependency>
843843
<groupId>io.quarkus</groupId>
844-
<artifactId>quarkus-junit5-mockito</artifactId>
844+
<artifactId>quarkus-junit-jupiter-mockito</artifactId>
845845
<scope>test</scope>
846846
</dependency>
847847
----
@@ -958,7 +958,7 @@ This is considered an advanced option and should only be performed if you fully
958958
==== Using Spies instead of Mocks with `@InjectSpy`
959959

960960
Building on the features provided by `InjectMock`, Quarkus also allows users to effortlessly take advantage of link:https://site.mockito.org/[Mockito] for spying on the beans supported by `QuarkusMock`.
961-
This functionality is available via the `@io.quarkus.test.junit.mockito.InjectSpy` annotation which is available in the `quarkus-junit5-mockito` dependency.
961+
This functionality is available via the `@io.quarkus.test.junit.mockito.InjectSpy` annotation which is available in the `quarkus-junit-jupiter-mockito` dependency.
962962

963963
Sometimes when testing you only need to verify that a certain logical path was taken, or you only need to stub out a single method's response while still executing the rest of the methods on the Spied clone. Please see link:https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#13[Mockito documentation - Spying on real objects] for more details on Spy partial mocks.
964964
In either of those situations a Spy of the object is preferable.
@@ -1484,7 +1484,7 @@ while the latter three can coexist.
14841484
The reason of this restriction is that `@QuarkusTest` starts a Quarkus server for the whole lifetime of the tests execution run,
14851485
thus preventing the other tests to start their own Quarkus server.
14861486

1487-
To alleviate this restriction, the `@QuarkusTest` annotation defines a JUnit 5 `@Tag`: `io.quarkus.test.junit.QuarkusTest`.
1487+
To alleviate this restriction, the `@QuarkusTest` annotation defines a JUnit Jupiter `@Tag`: `io.quarkus.test.junit.QuarkusTest`.
14881488
You can use this tag to isolate the `@QuarkusTest` test in a specific execution run, for example with the Maven Surefire Plugin:
14891489

14901490
[source,xml]
@@ -1699,7 +1699,7 @@ public @interface QuarkusSecurityTest { <1>
16991699
== Testing Components
17001700

17011701
Quarkus provides the `QuarkusComponentTestExtension`, a JUnit extension to ease the testing of components and mocking of their dependencies.
1702-
This JUnit extension is available in the `quarkus-junit5-component` dependency.
1702+
This JUnit extension is available in the `quarkus-junit-jupiter-component` dependency.
17031703

17041704
Let's have a component `Foo` - a CDI bean with two injection points.
17051705

docs/src/main/asciidoc/getting-started.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ In the generated build file, you can see 2 test dependencies:
313313
----
314314
<dependency>
315315
<groupId>io.quarkus</groupId>
316-
<artifactId>quarkus-junit5</artifactId>
316+
<artifactId>quarkus-junit-jupiter</artifactId>
317317
<scope>test</scope>
318318
</dependency>
319319
<dependency>
@@ -326,13 +326,13 @@ In the generated build file, you can see 2 test dependencies:
326326
[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
327327
.build.gradle
328328
----
329-
testImplementation("io.quarkus:quarkus-junit5")
329+
testImplementation("io.quarkus:quarkus-junit-jupiter")
330330
testImplementation("io.rest-assured:rest-assured")
331331
----
332332

333-
Quarkus supports https://junit.org/junit5/[JUnit 5] tests.
333+
Quarkus supports https://docs.junit.org/current/user-guide/[JUnit Jupiter] tests.
334334

335-
Because of this, in the case of Maven, the version of the https://maven.apache.org/surefire/maven-surefire-plugin/[Surefire Maven Plugin] must be set, as the default version does not support JUnit 5:
335+
Because of this, in the case of Maven, the version of the https://maven.apache.org/surefire/maven-surefire-plugin/[Surefire Maven Plugin] must be set, as the default version does not support JUnit Jupiter:
336336

337337
[source,xml,subs=attributes+]
338338
----

0 commit comments

Comments
 (0)