-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
346 lines (313 loc) · 14.3 KB
/
Copy pathpom.xml
File metadata and controls
346 lines (313 loc) · 14.3 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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- region Your particular project data -->
<groupId>org.getecsa</groupId>
<artifactId>getechsaTechTest</artifactId>
<version>0.1-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Description of my application</description>
<!-- This section (packaging) can be defined if the project is meant to be a desktop application or a JAR will be generated. -->
<packaging>jar</packaging>
<!--endregion-->
<properties>
<!-- region Configure Java version & Main full package and class name -->
<!-- WARNING: add release scope if 1.9 and older versions are used at build/plugins/plugin/[maven-compiler-plugin]/configuration-->
<java.version>17</java.version>
<!-- <selenium.version>4.7.2</selenium.version>-->
<selenium.version>RELEASE</selenium.version>
<main.class>org.white_sdev.american_airlines_test.AmericanAirlinesTest</main.class>
<logs.path>${project.build.directory}/test-reports/logs</logs.path>
<!--endregion-->
<!-- region General configurations of the project -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<!-- endregion General configurations of the project -->
</properties>
<dependencies>
<!-- region Lombok -->
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<type>jar</type>
</dependency>
<!-- endregion Lombok -->
<!-- region JCL -->
<!-- hooks lombok with the Sl4fj Provider -->
<!-- https://mvnrepository.com/artifact/org.slf4j/jcl-over-slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>2.0.5</version>
</dependency>
<!-- endregion JCL -->
<!-- region Sl4fj Provider -->
<!-- https://www.slf4j.org/codes.html#noProviders -->
<!-- This is the one Spring uses -->
<!-- https://logback.qos.ch/manual/layouts.html -->
<!-- this will allow you to use logback-test.xml file -->
<!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
<!-- requires slf4j-api & logback-core (Lombok includes it) -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.5</version>
</dependency>
<!-- endregion SL4fj Provider -->
<!-- region Testing -->
<!-- region UnitTesting -->
<!-- region JUnit5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
<scope>test</scope>
</dependency>
<!-- endregion JUnit5 -->
<!-- region Mockito -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.10.0</version>
<scope>test</scope>
</dependency>
<!-- endregion Mockito -->
<!-- region UnitTesting Assertions -->
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.23.1</version>
<scope>test</scope>
</dependency>
<!-- endregion UnitTesting Assertions -->
<!-- endregion UnitTesting -->
<!-- region Selenium -->
<!-- region Pure Selenium -->
<!-- region SeleniumJava -->
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-api -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
</dependency>
<!-- endregion SeleniumJava -->
<!-- region HtmlUnitDriver -->
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/htmlunit-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<!-- endregion -->
<!-- region ChromeDriver -->
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>${selenium.version}</version>
</dependency>
<!-- endregion ChromeDriver -->
<!-- endregion Pure Selenium -->
<!-- region bonigarcia -->
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.3.1</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- endregion bonigarcia -->
<!-- endregion Selenium -->
<!-- endregion Testing -->
</dependencies>
<build>
<resources>
<!-- region Logback warning removal-->
<!-- this will temporarily remove the warning from logback not able to found the logback-test.xml file - Remove when in PROD -->
<!-- it will also allow logback-test.xml to use this POM properties as variables -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>logback-test.xml</include>
</includes>
</resource>
<!-- endregion -->
</resources>
<plugins>
<!-- region Established the java version defined in the properties' section for every scope (compatible with newer java versions) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<!-- WARNING: add release scope for 1.9 and older versions -->
<release>${java.version}</release>
</configuration>
</plugin>
<!-- endregion -->
<!-- region Builds an *executable* JAR on package goal -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass> ${main.class} </mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- endregion -->
<!-- region Forces the app to be executed when using `mvn package` -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<mainClass>${main.class}</mainClass>
<!-- <cleanupDaemonThreads>false</cleanupDaemonThreads>-->
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- endregion -->
<!-- region Eliminates some compilation glitches for the IDEs when using lombok -->
<!--delete if the glitches are not present-->
<!-- <plugin>-->
<!-- <groupId>org.projectlombok</groupId>-->
<!-- <artifactId>lombok-maven-plugin</artifactId>-->
<!-- <version>1.18.12.0</version>-->
<!-- <configuration>-->
<!-- <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>-->
<!-- <outputDirectory>${delombok.output}</outputDirectory>-->
<!-- <addOutputDirectory>false</addOutputDirectory>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- Generate delomboked code -->
<!-- <phase>generate-sources</phase>-->
<!-- <goals>-->
<!-- <goal>delombok</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- endregion -->
<!-- region Maven is able to run JUnit5 Tests -->
<!-- This requires junit-jupiter-engine [in junit-jupiter] dependency! -->
<!-- This will run everything that Starts or ends with Test[(Case)|s]{0-1}. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<executions>
<execution><goals><goal>test</goal></goals></execution>
</executions>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${logs.path}</reportsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<showSuccess>false</showSuccess>
</configuration>
</plugin>
<!-- endregion -->
<!-- region Deletes log directory -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete>
<fileset dir="${logs.path}/" includes="*.log" />
</delete>
</target>
</configuration>
</execution>
<!-- <execution>-->
<!-- <phase>test</phase>-->
<!-- <goals>-->
<!-- <goal>run</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <tasks>-->
<!-- <delete file="target/test-reports/logs"/>-->
<!-- </tasks>-->
<!-- </configuration>-->
<!-- </execution>-->
</executions>
<!-- <executions>-->
<!-- <execution>-->
<!-- <phase>test</phase>-->
<!-- <goals>-->
<!-- <goal>run</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <tasks>-->
<!-- <delete file="target/test-reports/logs"/>-->
<!-- </tasks>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
</plugin>
<!-- endregion Deletes log directory -->
</plugins>
</build>
</project>