-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
301 lines (274 loc) · 13.8 KB
/
pom.xml
File metadata and controls
301 lines (274 loc) · 13.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.acme</groupId>
<artifactId>product-catalog</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<!-- Java release level for the compiler (source/target) -->
<maven.compiler.release>21</maven.compiler.release>
<!-- Maven Compiler Plugin: plugin version used to compile the project -->
<compiler-plugin.version>3.15.0</compiler-plugin.version>
<!-- Versions plugin: used for dependency/version updates -->
<versions-plugin.version>2.21.0</versions-plugin.version>
<!-- Encoding properties: ensure consistent encoding across all plugins and reports -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Quarkus platform BOM coordinates -->
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.31.2</quarkus.platform.version>
<!-- Testing dependencies versions -->
<surefire-plugin.version>3.5.4</surefire-plugin.version>
<testcontainers.version>1.21.4</testcontainers.version>
<cucumber.version>7.34.2</cucumber.version>
<quarkus-cucumber.version>1.3.0</quarkus-cucumber.version>
<!-- For reproducible builds -->
<project.build.outputTimestamp>2026-02-07T15:00:00Z</project.build.outputTimestamp>
</properties>
<!-- Import Quarkus platform BOM for dependency version management -->
<!-- This ensures that all Quarkus dependencies use compatible versions as defined by the platform BOM -->
<!-- Not loaded as a regular dependency, but used to manage versions of Quarkus dependencies in the project -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Quarkus dependencies: these are the libraries that provide the functionality for the application, such as REST endpoints, database access, JSON handling, etc. -->
<!-- Database and ORM -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm-rest-data-panache</artifactId>
</dependency>
<!-- Rest and JSON handling -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-jackson</artifactId>
</dependency>
<!-- OpenAPI and Health -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<!-- Dependency injection -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<!-- Container image building -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-jib</artifactId>
</dependency>
<!-- Testing dependencies: these are used for writing and running tests,
including unit tests, integration tests, and end-to-end tests.
They include libraries for testing frameworks, mocking, test containers, a
nd Cucumber for BDD testing. -->
<!-- Quarkus testing support -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit</artifactId>
<scope>test</scope>
</dependency>
<!-- REST-assured for testing REST endpoints -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<!-- Mockito for mocking dependencies in tests -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit-mockito</artifactId>
<scope>test</scope>
</dependency>
<!-- Testcontainers for integration testing with containers -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<!-- Cucumber for Behavior Driven Development (BDD) testing -->
<!-- quarkus-cucumber provides integration between Cucumber and Quarkus,
allowing you to write BDD tests that can leverage Quarkus features
and run in the same environment as your application -->
<dependency>
<groupId>io.quarkiverse.cucumber</groupId>
<artifactId>quarkus-cucumber</artifactId>
<version>${quarkus-cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Plugin management: defines versions and configuration for plugins
used in the build, such as the Quarkus Maven plugin for building the
application, the Surefire plugin for running tests, and plugins for
code quality and coverage analysis. -->
<plugins>
<plugin>
<!-- Quarkus Maven plugin: used to build the Quarkus application,
generate code, and create native images. It is configured to
execute goals for building the application, generating code,
and running the native image agent. -->
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
<goal>native-image-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Compiler plugin: used to compile the Java source code.
It is configured to include parameter names in the compiled bytecode,
which can be useful for reflection and testing. -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<parameters>true</parameters>
</configuration>
</plugin>
<!-- Surefire / Tests -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<argLine>
@{argLine}
-XX:+EnableDynamicAgentLoading
--add-opens java.base/java.lang=ALL-UNNAMED
</argLine>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
</configuration>
</plugin>
<!-- Failsafe / Integration Tests -->
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<argLine>
@{argLine}
-XX:+EnableDynamicAgentLoading
--add-opens java.base/java.lang=ALL-UNNAMED
</argLine>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
</configuration>
</plugin>
<!-- Plugin to manage versions of dependencies and plugins, using organization-specific rules for updates
can be used to check for outdated dependencies and suggest updates based on the rules defined in the provided rules.xml file
./mvn versions:display-property-updates -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions-plugin.version}</version>
<configuration>
<rulesUri>https://bruno.univ-tln.fr/rules.xml</rulesUri>
</configuration>
</plugin>
</plugins>
</build>
<!-- Profiles: these are different build configurations that can be activated based on certain conditions,
such as the presence of specific properties. -->
<profiles>
<!-- Profile JVM: this profile is activated when the "jvm" property is set. It configures the build to create
a JVM-based application package, build a container image using Jib, and load it into the local Docker registry. -->
<profile>
<id>jvm</id>
<properties>
<quarkus.package.jar.type>fast-jar</quarkus.package.jar.type>
<quarkus.container-image.build>true</quarkus.container-image.build>
<quarkus.container-image.load>true</quarkus.container-image.load>
<quarkus.container-image.group>brunoe</quarkus.container-image.group>
<quarkus.container-image.name>product-catalog</quarkus.container-image.name>
<quarkus.container-image.tag>1.0.0-jvm</quarkus.container-image.tag>
<quarkus.docker.dockerfile-jvm-path>src/main/docker/Dockerfile.jvm</quarkus.docker.dockerfile-jvm-path>
<quarkus.jib.base-jvm-image>registry.access.redhat.com/ubi9/openjdk-21-runtime@sha256:20252d0fd32221be2c6ffa91c19f0344c80c8ce3f054a26a2d7492a172516e53</quarkus.jib.base-jvm-image>
</properties>
</profile>
<!-- Profile Native: this profile is activated when the "native" property is set. It configures the build
to create a native executable using GraalVM, build a container image using Jib, and load it into the local
Docker registry. It also specifies the builder image to use for building the native executable. -->
<profile>
<id>native</id>
<properties>
<quarkus.native.enabled>true</quarkus.native.enabled>
<quarkus.native.container-build>true</quarkus.native.container-build>
<quarkus.container-image.build>true</quarkus.container-image.build>
<quarkus.container-image.load>true</quarkus.container-image.load>
<quarkus.container-image.push>false</quarkus.container-image.push>
<quarkus.container-image.group>brunoe</quarkus.container-image.group>
<quarkus.container-image.name>product-catalog</quarkus.container-image.name>
<quarkus.container-image.tag>1.0.0-native</quarkus.container-image.tag>
<quarkus.jib.base-native-image>quay.io/quarkus/ubi9-quarkus-mandrel-builder-image:jdk-21</quarkus.jib.base-native-image>
</properties>
</profile>
</profiles>
</project>