-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
297 lines (262 loc) · 13.4 KB
/
pom.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>springboot.samples</groupId>
<artifactId>project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>project</name>
<description>Parent project for all spring-boot-samples</description>
<packaging>pom</packaging>
<modules>
<module>batch</module>
<module>web</module>
<module>test</module>
<module>session</module>
<module>security</module>
<module>data-rest</module>
<module>data</module>
<module>data-source</module>
<module>jdbc</module>
<module>kafka</module>
<module>gateway</module>
<module>liquibase</module>
</modules>
<properties>
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-clean.version>3.2.0</maven-clean.version>
<maven-compiler.version>3.8.1</maven-compiler.version>
<maven-surefire.version>3.0.0-M6</maven-surefire.version>
<maven-failsafe.version>3.0.0-M6</maven-failsafe.version>
<maven-resources.version>3.2.0</maven-resources.version>
<maven-verifier.version>1.1</maven-verifier.version>
<maven-install.version>3.0.0-M1</maven-install.version>
<maven-deploy.version>3.0.0-M2</maven-deploy.version>
<maven-site.version>4.0.0-M1</maven-site.version>
<nexus-staging-maven.version>1.6.13</nexus-staging-maven.version>
<spring-cloud.version>2021.0.5</spring-cloud.version>
<spring-boot.version>2.7.7</spring-boot.version>
<mysql.version>8.0.31</mysql.version>
<postgresql.version>42.3.6</postgresql.version>
<lombok.version>1.18.24</lombok.version>
<testcontainers.version>1.17.2</testcontainers.version>
<apache-commons-lang.version>3.12.0</apache-commons-lang.version>
<junit-jupiter-api.version>5.8.2</junit-jupiter-api.version>
<assertj-core.version>3.22.0</assertj-core.version>
<mockito-core.version>4.5.1</mockito-core.version>
<mockito-junit-jupiter.version>4.5.1</mockito-junit-jupiter.version>
</properties>
<dependencies>
<!-- Testing dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter-api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<!-- For adding mockito extension to junit -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito-junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${apache-commons-lang.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<!--
In order for Maven to be able to deploy the artifacts it creates in the package phase of the build,
it needs to define the repository information where the packaged artifacts will be deployed, via the distributionManagement element:
A hosted, public Snapshots repository comes out of the box on Nexus, so there's no need to create or configure anything further.
Nexus makes it easy to determine the URLs of its hosted repositories –
each repository displays the exact entry to be added in the <distributionManagement> of the project pom,under the Summary tab.
-->
<distributionManagement>
<snapshotRepository>
<id>nexus-snapshots</id>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<!-- The clean lifecycle has only one phase named clean that is automatically bound to the only goal of the
plugin with the same name. This goal can, therefore, be executed with the command mvn clean.
The clean plugin is already included in the super POM, thus we can use it without specifying anything in the project's POM.
This plugin, as its name implies, cleans the files and directories generated during the previous build. By default, the plugin removes the target directory.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean.version}</version>
<configuration>
<filesets>
<fileset>
<directory>output-resources</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<!--
The compiler plugin is used to compile the source code of a Maven project.
This plugin has two goals, which are already bound to specific phases of the default lifecycle:
compile – compile main source files
testCompile – compile test source files
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<!-- Surefire plugin for generating xml reports from running test classes (classes that end with *Test.java,
plugin has only one goal:test , mvn test will execute it or default build. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire.version}</version>
</plugin>
<!-- Failsafe plugin runs and verifies tests using different goals.
A test failure in the integration-test phase doesn't fail the build straight away,allowing the phase post-integration-test to execute,
where clean-up operations are performed.
Failed tests, if any, are only reported during the verify phase,after the integration test environment has been torn down properly.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration></configuration>
</execution>
</executions>
</plugin>
<!-- The verifier plugin has only one goal – verify. This goal verifies the existence or non-existence of files and directories,
optionally checking file content against a regular expression.
Despite its name, the verify goal is bound to the integration-test phase by default rather than the verify phase. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-verifier-plugin</artifactId>
<version>${maven-verifier.version}</version>
<configuration>
<verificationFile>input-resources/verifications.xml</verificationFile>
</configuration>
<executions>
<execution>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Install plugin is used to add artifacts to the local repository.
This plugin is included in the super POM, therefore a POM doesn't need to explicitly include it.
The most noteworthy goal of this plugin is install, which is bound to the install phase by default.
Other goals are install-file used to automatically install external artifacts into the local repository,
and help to show information on the plugin itself.In most cases, the install plugin doesn't need any custom configuration.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install.version}</version>
</plugin>
<!--
Deploy plugin is used during the deploy phase, pushing artifacts to a remote repository to share with other developers.
In addition to the artifact itself, this plugin ensures that all associated information, such as POMs, metadata or hash values, is correct.
The deploy plugin is specified in the super POM, hence it's not necessary to add this plugin to the POM.
The most noticeable goal of this plugin is deploy, bound to the deploy phase by default.
-->
<!-- Since I am using nexus staging plugin for deployment I deactivate maven-deploy-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven.version}</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<serverId>nexus</serverId>
<nexusUrl>http://localhost:8081/nexus/</nexusUrl>
<skipStaging>true</skipStaging>
</configuration>
</plugin>
<!-- The Maven site lifecycle has two phases bound to goals of the site plugin by default: the site phase is bound to the site goal,
and the site-deploy phase is bound to the deploy goal.Here are the descriptions of those goals:
site – generate a site for a single project; the generated site only shows information about the artifacts specified in the POM
deploy – deploy the generated site to the URL specified in the distributionManagement element of the POM
In addition to site and deploy, the site plugin has several other goals to customize the content of the generated files and to control the deployment process.
We can use this plugin without adding it to the POM as the super POM already includes it.
To generate a site, just run mvn site:site or mvn site.
To view the generated site on a local machine, run mvn site:run. This command will deploy the site to a Jetty web server at the address localhost:8080.
The run goal of this plugin isn't implicitly bound to a phase in the site lifecycle, hence we need to call it directly.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site.version}</version>
</plugin>
</plugins>
</build>
</project>