Skip to content

Commit 9890899

Browse files
[cherry-pick] chore: use invoker plugin on gav IT (#1363)
* chore: use invoker plugin on gav IT (#1361) * chore: use invoker plugin on gav IT Signed-off-by: Ricardo Zanini <[email protected]> * Adjust gav sub modules order; fix maven compiler plugin Signed-off-by: Ricardo Zanini <[email protected]> --------- Signed-off-by: Ricardo Zanini <[email protected]> * [cherry-pick] chore: use invoker plugin on gav IT --------- Signed-off-by: Ricardo Zanini <[email protected]>
1 parent 5a17a78 commit 9890899

File tree

15 files changed

+386
-169
lines changed

15 files changed

+386
-169
lines changed

client/integration-tests/gav-source/pom.xml

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 64 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,73 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<parent>
4-
<artifactId>quarkus-openapi-generator-integration-tests</artifactId>
5-
<groupId>io.quarkiverse.openapi.generator</groupId>
6-
<version>3.0.0-lts-SNAPSHOT</version>
7-
</parent>
8-
<modelVersion>4.0.0</modelVersion>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<artifactId>quarkus-openapi-generator-integration-tests</artifactId>
8+
<groupId>io.quarkiverse.openapi.generator</groupId>
9+
<version>3.0.0-lts-SNAPSHOT</version>
10+
</parent>
911

10-
<artifactId>quarkus-openapi-generator-it-gav</artifactId>
11-
<name>Quarkus - OpenAPI Generator - Integration Tests - Client - GAV</name>
12-
<description>Example project for OpenAPI via GAV coordinates</description>
12+
<artifactId>quarkus-openapi-generator-it-gav</artifactId>
13+
<name>Quarkus - OpenAPI Generator - Integration Tests - Client - GAV</name>
14+
<packaging>pom</packaging>
1315

14-
<dependencies>
15-
<dependency>
16-
<groupId>io.quarkiverse.openapi.generator</groupId>
17-
<artifactId>quarkus-openapi-generator</artifactId>
18-
</dependency>
19-
<!-- include yaml GAV coordinates -->
20-
<!-- echo1 should be generated -->
21-
<dependency>
22-
<groupId>io.quarkiverse.openapi.generator</groupId>
23-
<artifactId>quarkus-openapi-generator-gav-source-echo1</artifactId>
24-
<version>3.0.0-SNAPSHOT</version>
25-
<type>yaml</type>
26-
</dependency>
27-
<!-- echo2 will be excluded during test -->
28-
<dependency>
29-
<groupId>io.quarkiverse.openapi.generator</groupId>
30-
<artifactId>quarkus-openapi-generator-gav-source-echo2</artifactId>
31-
<version>3.0.0-SNAPSHOT</version>
32-
<type>yaml</type>
33-
</dependency>
34-
<dependency>
35-
<groupId>org.assertj</groupId>
36-
<artifactId>assertj-core</artifactId>
37-
<scope>test</scope>
38-
</dependency>
39-
<dependency>
40-
<groupId>io.quarkus</groupId>
41-
<artifactId>quarkus-junit5</artifactId>
42-
<scope>test</scope>
43-
</dependency>
44-
</dependencies>
45-
<build>
46-
<plugins>
47-
<plugin>
48-
<groupId>io.quarkus</groupId>
49-
<artifactId>quarkus-maven-plugin</artifactId>
50-
<extensions>true</extensions>
51-
<executions>
52-
<execution>
53-
<goals>
54-
<goal>build</goal>
55-
<goal>generate-code</goal>
56-
<goal>generate-code-tests</goal>
57-
</goals>
58-
</execution>
59-
</executions>
60-
</plugin>
61-
</plugins>
62-
</build>
63-
<profiles>
64-
<profile>
65-
<id>native-image</id>
66-
<activation>
67-
<property>
68-
<name>native</name>
69-
</property>
70-
</activation>
71-
<build>
16+
<properties>
17+
<maven.compiler.source>17</maven.compiler.source>
18+
<maven.compiler.target>17</maven.compiler.target>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
<tested.version>${project.version}</tested.version>
21+
<version.maven.invoker.plugin>3.6.1</version.maven.invoker.plugin>
22+
</properties>
23+
24+
<build>
7225
<plugins>
73-
<plugin>
74-
<artifactId>maven-surefire-plugin</artifactId>
75-
<configuration>
76-
<skipTests>${native.surefire.skip}</skipTests>
77-
</configuration>
78-
</plugin>
79-
<plugin>
80-
<artifactId>maven-failsafe-plugin</artifactId>
81-
<executions>
82-
<execution>
83-
<goals>
84-
<goal>integration-test</goal>
85-
<goal>verify</goal>
86-
</goals>
26+
<plugin>
27+
<groupId>org.apache.maven.plugins</groupId>
28+
<artifactId>maven-invoker-plugin</artifactId>
29+
<version>${version.maven.invoker.plugin}</version>
8730
<configuration>
88-
<systemPropertyVariables>
89-
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
90-
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
91-
<maven.home>${maven.home}</maven.home>
92-
</systemPropertyVariables>
31+
<projectsDirectory>src/it</projectsDirectory>
32+
<cloneProjectsTo>${project.build.directory}/it-work</cloneProjectsTo>
33+
<localRepositoryPath>${settings.localRepository}</localRepositoryPath>
34+
<addTestClassPath>true</addTestClassPath>
35+
<streamLogs>true</streamLogs>
36+
<showErrors>true</showErrors>
37+
<properties>
38+
<tested.version>${tested.version}</tested.version>
39+
<!-- pass-through from outer -P… ; fallback provided below -->
40+
<consume.profile>${consume.profile}</consume.profile>
41+
</properties>
42+
<goals>
43+
<goal>clean</goal>
44+
<goal>install</goal>
45+
</goals>
9346
</configuration>
94-
</execution>
95-
</executions>
96-
</plugin>
47+
<executions>
48+
<execution>
49+
<id>it-01-install-gav-sources</id>
50+
<phase>install</phase>
51+
<goals><goal>run</goal></goals>
52+
<configuration>
53+
<pomIncludes>
54+
<pomInclude>01-install-gav-sources/pom.xml</pomInclude>
55+
</pomIncludes>
56+
</configuration>
57+
</execution>
58+
<execution>
59+
<id>it-02-consume-gav</id>
60+
<phase>install</phase>
61+
<goals><goal>run</goal></goals>
62+
<configuration>
63+
<pomIncludes>
64+
<pomInclude>02-consume-gav/pom.xml</pomInclude>
65+
</pomIncludes>
66+
</configuration>
67+
</execution>
68+
</executions>
69+
</plugin>
9770
</plugins>
98-
</build>
99-
<properties>
100-
<quarkus.package.type>native</quarkus.package.type>
101-
</properties>
102-
</profile>
103-
</profiles>
71+
</build>
10472

10573
</project>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!-- 01-install-gav-sources/pom.xml -->
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
8+
<!-- No parent; keep this fully standalone for the invoker -->
9+
<groupId>io.quarkiverse.openapi.generator.it</groupId>
10+
<artifactId>install-gav-sources</artifactId>
11+
<version>1</version>
12+
<packaging>pom</packaging>
13+
14+
<!-- tested.version is injected by the invoker as -Dtested.version=... -->
15+
<properties>
16+
<tested.version>0.0.0-UNSET</tested.version>
17+
</properties>
18+
19+
<build>
20+
<plugins>
21+
<plugin>
22+
<groupId>org.apache.maven.plugins</groupId>
23+
<artifactId>maven-install-plugin</artifactId>
24+
<version>3.1.4</version>
25+
<executions>
26+
<execution>
27+
<id>install-echo1</id>
28+
<phase>package</phase>
29+
<goals><goal>install-file</goal></goals>
30+
<configuration>
31+
<groupId>io.quarkiverse.openapi.generator</groupId>
32+
<artifactId>quarkus-openapi-generator-gav-source-echo1</artifactId>
33+
<version>${tested.version}</version>
34+
<file>${project.basedir}/src/main/openapi/echo1.yaml</file>
35+
<packaging>yaml</packaging>
36+
</configuration>
37+
</execution>
38+
<execution>
39+
<id>install-echo2</id>
40+
<phase>package</phase>
41+
<goals><goal>install-file</goal></goals>
42+
<configuration>
43+
<groupId>io.quarkiverse.openapi.generator</groupId>
44+
<artifactId>quarkus-openapi-generator-gav-source-echo2</artifactId>
45+
<version>${tested.version}</version>
46+
<file>${project.basedir}/src/main/openapi/echo2.yaml</file>
47+
<packaging>yaml</packaging>
48+
</configuration>
49+
</execution>
50+
<execution>
51+
<id>install-other</id>
52+
<phase>package</phase>
53+
<goals><goal>install-file</goal></goals>
54+
<configuration>
55+
<groupId>io.quarkiverse.openapi.generator</groupId>
56+
<artifactId>quarkus-openapi-generator-gav-source-other</artifactId>
57+
<version>${tested.version}</version>
58+
<file>${project.basedir}/src/main/openapi/other.yaml</file>
59+
<packaging>yaml</packaging>
60+
</configuration>
61+
</execution>
62+
</executions>
63+
</plugin>
64+
</plugins>
65+
</build>
66+
</project>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
openapi: 3.0.3
2+
info:
3+
title: echo
4+
version: '1.0.0'
5+
description: ""
6+
paths:
7+
/echo:
8+
post:
9+
summary: Echo
10+
operationId: echo
11+
requestBody:
12+
content:
13+
application/json:
14+
schema:
15+
$ref: "#/components/schemas/Message"
16+
responses:
17+
"200":
18+
description: OK
19+
content:
20+
application/json:
21+
schema:
22+
$ref: '#/components/schemas/Echo'
23+
components:
24+
schemas:
25+
Echo:
26+
type: object
27+
properties:
28+
echo:
29+
type: string
30+
Message:
31+
type: object
32+
properties:
33+
message:
34+
type: string
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
openapi: 3.0.3
2+
info:
3+
title: echo
4+
version: '1.0.0'
5+
description: ""
6+
paths:
7+
/echo:
8+
post:
9+
summary: Echo
10+
operationId: echo
11+
requestBody:
12+
content:
13+
application/json:
14+
schema:
15+
$ref: "#/components/schemas/Message"
16+
responses:
17+
"200":
18+
description: OK
19+
content:
20+
application/json:
21+
schema:
22+
$ref: '#/components/schemas/Echo'
23+
components:
24+
schemas:
25+
Echo:
26+
type: object
27+
properties:
28+
echo:
29+
type: string
30+
Message:
31+
type: object
32+
properties:
33+
message:
34+
type: string
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Activate the same profile inside the Invoker-run build
2+
invoker.profiles=${consume.profile}
3+
4+
# Optional: default if the outer build didn't set one
5+
invoker.profiles.default=resteasy-classic

0 commit comments

Comments
 (0)