Skip to content

Commit 162aef4

Browse files
authored
Merge pull request quarkusio#48001 from gsmet/improve-maven-tests
Declare dependencies in integration-tests/maven module
2 parents ca808fe + 6f2d023 commit 162aef4

File tree

72 files changed

+320
-94
lines changed

Some content is hidden

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

72 files changed

+320
-94
lines changed

integration-tests/maven/pom.xml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,51 @@
7474
<artifactId>quarkus-vertx-http-dev-ui-tests</artifactId>
7575
<scope>test</scope>
7676
</dependency>
77-
<!-- This one is used by the tested projects so we need to create a dependency
78-
to make sure GIB triggers the testing. -->
77+
<!-- Dependencies added to make sure the tests are run by GIB -->
7978
<dependency>
8079
<groupId>io.quarkus</groupId>
8180
<artifactId>quarkus-junit5</artifactId>
8281
<scope>test</scope>
83-
<version>${project.version}</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>io.quarkus</groupId>
85+
<artifactId>quarkus-core-deployment</artifactId>
86+
<scope>test</scope>
87+
</dependency>
88+
<dependency>
89+
<groupId>io.quarkus</groupId>
90+
<artifactId>quarkus-arc-deployment</artifactId>
91+
<scope>test</scope>
92+
</dependency>
93+
<dependency>
94+
<groupId>io.quarkus</groupId>
95+
<artifactId>quarkus-rest-deployment</artifactId>
96+
<scope>test</scope>
97+
</dependency>
98+
<dependency>
99+
<groupId>io.quarkus</groupId>
100+
<artifactId>quarkus-resteasy-deployment</artifactId>
101+
<scope>test</scope>
102+
</dependency>
103+
<dependency>
104+
<groupId>io.quarkus</groupId>
105+
<artifactId>quarkus-smallrye-openapi-deployment</artifactId>
106+
<scope>test</scope>
107+
</dependency>
108+
<dependency>
109+
<groupId>io.quarkus</groupId>
110+
<artifactId>quarkus-smallrye-context-propagation-deployment</artifactId>
111+
<scope>test</scope>
112+
</dependency>
113+
<dependency>
114+
<groupId>io.quarkus</groupId>
115+
<artifactId>quarkus-websockets-deployment</artifactId>
116+
<scope>test</scope>
117+
</dependency>
118+
<dependency>
119+
<groupId>io.quarkus</groupId>
120+
<artifactId>quarkus-jaxb-deployment</artifactId>
121+
<scope>test</scope>
84122
</dependency>
85123
<dependency>
86124
<groupId>io.quarkus</groupId>

integration-tests/maven/src/test/java/io/quarkus/maven/it/ApplicationNameAndVersionTestUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static void assertApplicationPropertiesSetCorrectly(String prefix) {
2525
try {
2626
URL url = new URL("http://localhost:8080" + prefix + "/app/hello/nameAndVersion");
2727
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
28-
// the default Accept header used by HttpURLConnection is not compatible with RESTEasy negotiation as it uses q=.2
28+
// the default Accept header used by HttpURLConnection is not compatible with our REST negotiation as it uses q=.2
2929
connection.setRequestProperty("Accept", "text/html, *; q=0.2, */*; q=0.2");
3030
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
3131
failApplicationPropertiesSetCorrectly();

integration-tests/maven/src/test/java/io/quarkus/maven/it/CreateProjectCodestartMojoIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class CreateProjectCodestartMojoIT extends QuarkusPlatformAwareMojoTestBa
4444

4545
private static Stream<Arguments> provideLanguages() {
4646
return Stream.of("java", "kotlin")
47-
.flatMap(l -> Stream.of("", "resteasy", "qute").map(e -> Arguments.of(l, e)));
47+
.flatMap(l -> Stream.of("", "rest", "qute").map(e -> Arguments.of(l, e)));
4848
}
4949

5050
@Test
@@ -98,12 +98,12 @@ public void generateGradleKotlinProject(String language, String extensions) thro
9898
}
9999

100100
@Test
101-
public void generateCustomRESTEasyJavaProject() throws Exception {
101+
public void generateCustomRESTJavaProject() throws Exception {
102102
final HashMap<String, String> options = new HashMap<>();
103103
options.put("path", "/bonjour");
104104
options.put("className", "com.andy.BonjourResource");
105105
final Path generatedProjectPath = generateProject("maven", "java",
106-
"resteasy", options);
106+
"rest", options);
107107
checkDir(generatedProjectPath.resolve("src/main/java/com/andy"));
108108
checkContent(generatedProjectPath.resolve("src/main/java/com/andy/BonjourResource.java"),
109109
"package com.andy;",

integration-tests/maven/src/test/java/io/quarkus/maven/it/CreateProjectMojoIT.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public void testProjectGenerationFromScratchWithResource() throws Exception {
235235
properties.put("projectGroupId", "org.acme");
236236
properties.put("projectArtifactId", "acme");
237237
properties.put("className", "org.acme.MyResource.java");
238-
properties.put("extensions", "resteasy");
238+
properties.put("extensions", "rest");
239239
InvocationResult result = setup(properties);
240240

241241
assertThat(result.getExitCode()).isZero();
@@ -276,7 +276,7 @@ public void testProjectGenerationFromScratchWithMissingExtensionShouldFail() thr
276276
properties.put("projectGroupId", "org.acme");
277277
properties.put("projectArtifactId", "acme");
278278
properties.put("className", "org.acme.MyResource");
279-
properties.put("extensions", "resteasy,smallrye-metrics,missing");
279+
properties.put("extensions", "rest,smallrye-openapi,missing");
280280
InvocationResult result = setup(properties);
281281

282282
assertThat(result.getExitCode()).isOne();
@@ -292,7 +292,7 @@ public void testProjectGenerationFromScratchWithExtensions() throws Exception {
292292
properties.put("projectGroupId", "org.acme");
293293
properties.put("projectArtifactId", "acme");
294294
properties.put("className", "org.acme.MyResource");
295-
properties.put("extensions", "resteasy,smallrye-metrics");
295+
properties.put("extensions", "rest,smallrye-openapi");
296296
InvocationResult result = setup(properties);
297297

298298
assertThat(result.getExitCode()).isZero();
@@ -306,7 +306,7 @@ public void testProjectGenerationFromScratchWithExtensions() throws Exception {
306306
check(new File(testDir, "src/main/java/org/acme/MyResource.java"), "package org.acme;");
307307

308308
assertThat(FileUtils.readFileToString(new File(testDir, "pom.xml"), "UTF-8"))
309-
.contains("quarkus-resteasy", "quarkus-smallrye-metrics").doesNotContain("missing");
309+
.contains("quarkus-rest", "quarkus-smallrye-openapi").doesNotContain("missing");
310310

311311
Model model = loadPom(testDir);
312312
assertThat(model.getDependencyManagement().getDependencies().stream()
@@ -317,12 +317,12 @@ public void testProjectGenerationFromScratchWithExtensions() throws Exception {
317317
.isTrue();
318318

319319
assertThat(
320-
model.getDependencies().stream().anyMatch(d -> d.getArtifactId().equalsIgnoreCase("quarkus-resteasy")
320+
model.getDependencies().stream().anyMatch(d -> d.getArtifactId().equalsIgnoreCase("quarkus-rest")
321321
&& d.getVersion() == null))
322322
.isTrue();
323323

324324
assertThat(model.getDependencies().stream()
325-
.anyMatch(d -> d.getArtifactId().equalsIgnoreCase("quarkus-smallrye-metrics")
325+
.anyMatch(d -> d.getArtifactId().equalsIgnoreCase("quarkus-smallrye-openapi")
326326
&& d.getVersion() == null))
327327
.isTrue();
328328
}
@@ -337,7 +337,7 @@ public void testGradleProjectGenerationFromScratchWithExtensions() throws Except
337337
properties.put("projectGroupId", "org.acme");
338338
properties.put("projectArtifactId", "acme");
339339
properties.put("className", "org.acme.MyResource");
340-
properties.put("extensions", "kotlin,resteasy,jackson");
340+
properties.put("extensions", "kotlin,rest,jackson");
341341
properties.put("buildTool", "gradle");
342342
InvocationResult result = setup(properties);
343343

@@ -368,7 +368,7 @@ public void testProjectGenerationFromScratchWithCustomDependencies() throws Exce
368368
properties.put("projectGroupId", "org.acme");
369369
properties.put("projectArtifactId", "acme");
370370
properties.put("className", "org.acme.MyResource");
371-
properties.put("extensions", "resteasy,commons-io:commons-io:2.5");
371+
properties.put("extensions", "rest,commons-io:commons-io:2.5");
372372
InvocationResult result = setup(properties);
373373

374374
assertThat(result.getExitCode()).isZero();
@@ -390,7 +390,7 @@ public void testProjectGenerationFromScratchWithCustomDependencies() throws Exce
390390
.isTrue();
391391

392392
assertThat(
393-
model.getDependencies().stream().anyMatch(d -> d.getArtifactId().equalsIgnoreCase("quarkus-resteasy")
393+
model.getDependencies().stream().anyMatch(d -> d.getArtifactId().equalsIgnoreCase("quarkus-rest")
394394
&& d.getVersion() == null))
395395
.isTrue();
396396

@@ -406,7 +406,7 @@ public void testBadArtifactId() throws Exception {
406406

407407
Properties properties = new Properties();
408408
properties.put("projectArtifactId", "acme,fail");
409-
properties.put("extensions", "resteasy,commons-io:commons-io:2.5");
409+
properties.put("extensions", "rest,commons-io:commons-io:2.5");
410410
InvocationResult result = setup(properties);
411411

412412
assertThat(result.getExitCode()).isNotZero();
@@ -420,7 +420,7 @@ public void testBadGroupId() throws Exception {
420420

421421
Properties properties = new Properties();
422422
properties.put("projectGroupId", "acme,fail");
423-
properties.put("extensions", "resteasy,commons-io:commons-io:2.5");
423+
properties.put("extensions", "rest,commons-io:commons-io:2.5");
424424
InvocationResult result = setup(properties);
425425

426426
assertThat(result.getExitCode()).isNotZero();
@@ -543,7 +543,7 @@ public void testThatDefaultPackageAreReplaced() throws Exception {
543543

544544
Properties properties = new Properties();
545545
properties.put("className", "MyGreatResource");
546-
properties.put("extensions", "resteasy");
546+
properties.put("extensions", "rest");
547547
InvocationResult result = setup(properties);
548548

549549
assertThat(result.getExitCode()).isZero();
@@ -576,7 +576,7 @@ public void generateNewProjectAndRun() throws Exception {
576576
Properties properties = new Properties();
577577
properties.put("projectGroupId", "org.acme");
578578
properties.put("projectArtifactId", "acme");
579-
properties.put("extensions", "resteasy");
579+
properties.put("extensions", "rest");
580580
properties.put("className", "org.acme.HelloResource");
581581
InvocationResult result = setup(properties);
582582

integration-tests/maven/src/test/java/io/quarkus/maven/it/DevMojoIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ public void testThatApplicationRecoversCompilationIssue() throws MavenInvocation
12761276

12771277
@Test
12781278
public void testThatApplicationRecoversStartupIssue() throws MavenInvocationException, IOException {
1279-
testDir = initProject("projects/classic", "projects/project-classic-run-startup-issue");
1279+
testDir = initProject("projects/classic-resteasy", "projects/project-classic-recover-startup-issue");
12801280

12811281
// Edit the JAX-RS resource to be package private
12821282
File source = new File(testDir, "src/main/java/org/acme/HelloResource.java");

integration-tests/maven/src/test/resources-filtered/projects/arc-exclude-dependencies/library/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<dependencies>
1616
<dependency>
1717
<groupId>io.quarkus</groupId>
18-
<artifactId>quarkus-resteasy</artifactId>
18+
<artifactId>quarkus-rest</artifactId>
1919
</dependency>
2020
</dependencies>
2121
</project>

integration-tests/maven/src/test/resources-filtered/projects/arc-exclude-dependencies/runner/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<dependencies>
1515
<dependency>
1616
<groupId>io.quarkus</groupId>
17-
<artifactId>quarkus-resteasy</artifactId>
17+
<artifactId>quarkus-rest</artifactId>
1818
</dependency>
1919
<dependency>
2020
<groupId>org.acme</groupId>

integration-tests/maven/src/test/resources-filtered/projects/build-mode-quarkus-profile-override/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<!-- insert test dependencies here -->
3333
<dependency>
3434
<groupId>io.quarkus</groupId>
35-
<artifactId>quarkus-resteasy</artifactId>
35+
<artifactId>quarkus-rest</artifactId>
3636
</dependency>
3737
</dependencies>
3838
<build>

integration-tests/maven/src/test/resources-filtered/projects/build-mode-quarkus-profile-property/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<!-- insert test dependencies here -->
3333
<dependency>
3434
<groupId>io.quarkus</groupId>
35-
<artifactId>quarkus-resteasy</artifactId>
35+
<artifactId>quarkus-rest</artifactId>
3636
</dependency>
3737
</dependencies>
3838
<build>

integration-tests/maven/src/test/resources-filtered/projects/capabilities-conflict/runner/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<dependencies>
1515
<dependency>
1616
<groupId>io.quarkus</groupId>
17-
<artifactId>quarkus-resteasy</artifactId>
17+
<artifactId>quarkus-rest</artifactId>
1818
</dependency>
1919
<dependency>
2020
<groupId>org.acme</groupId>

0 commit comments

Comments
 (0)