-
Notifications
You must be signed in to change notification settings - Fork 1
/
pom.xml
848 lines (764 loc) · 37.6 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
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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
<?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 Spring configuration (in case that you want to use Spring to manage your project)-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<!--endregion-->
<!-- region Your particular project data -->
<groupId>org.white_sdev.templates</groupId>
<artifactId>white-template</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>19</java.version>
<main.class>${project.groupId}.white_template.WhiteTemplate</main.class>
<!--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>
<!-- In case the compiling device doesn't have docker installed you can create the docker img with Jib -->
<!-- <jkube.build.strategy>jib</jkube.build.strategy>-->
<!-- endregion General configurations of the project -->
<!-- region CREDENTIALS of the H2 Database to be created AND possibly used to connect if spring is configured -->
<!-- you can edit these credentials and if H2 is configured these will be used to generate the database -->
<h2.url>jdbc:h2:./target/db/inmemorydb</h2.url>
<h2.user>sa</h2.user>
<h2.password>sa</h2.password>
<!--endregion-->
<junit.jupiter.version>5.9.2</junit.jupiter.version>
<junit.platform.version>1.3.2</junit.platform.version>
<surefire.failsafe.plugin.version>3.0.0-M8</surefire.failsafe.plugin.version>
<surefire.version>2.22.2</surefire.version>
<skipTests>false</skipTests>
<skipITs>${skipTests}</skipITs>
<skipUTs>${skipTests}</skipUTs>
<logs.path>${project.build.directory}/test-reports/logs</logs.path>
</properties>
<repositories>
<!-- region GiHub JitPack.io dependencies -->
<!-- only if you want to work with JitPack.io for the GitHub dependencies -->
<!-- <repository>-->
<!-- <id>jitpack.io</id>-->
<!-- <url>https://jitpack.io</url>-->
<!-- </repository>-->
<!-- endregion GiHub JitPack.io dependencies -->
</repositories>
<dependencies>
<!-- region Spring boot-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- region Spring Boot Desktop only -->
<!-- You can use this section if you are planning on not using the spring-boot-starter-web
And only using Desktop functionalities -->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- endregion Spring Boot Desktop only -->
<!-- region Controller. For JSONs/HTTP Calls -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--endregion Controller-->
<!-- region SpringBootPersistence -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- region Hibernate -->
<!-- <dependency>-->
<!-- <groupId>org.hibernate</groupId>-->
<!-- <artifactId>hibernate-core</artifactId>-->
<!-- <version>RELEASE</version>-->
<!-- <!–<scope>compile</scope>-->
<!-- <type>jar</type>–>-->
<!-- </dependency>-->
<!--endregion Hibernate-->
<!-- region Spring boot validations -->
<!-- Contains jakarta.validation-api Hibernate Entities Validations @NotBlank -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- endregion Spring boot validations -->
<!-- region Oracle. In case you are using an Oracle database-->
<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc14 -->
<!-- <dependency>-->
<!-- <groupId>com.oracle.ojdbc</groupId>-->
<!-- <artifactId>ojdbc10</artifactId>-->
<!-- <scope>runtime</scope>-->
<!-- </dependency>-->
<!--endregion Oracle-->
<!--endregion SpringBootPersistence-->
<!-- region Rest Calls -->
<!-- region WebFlux for Rest calls with Spring WebClient -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webflux -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
<version>6.0.3</version>
</dependency>
<!-- endregion WebFlux for Rest calls with Spring WebClient -->
<!-- region Reactor (ReactiveRequest)-->
<!-- https://mvnrepository.com/artifact/io.projectreactor.netty/reactor-netty -->
<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty</artifactId>
<version>1.0.15</version>
</dependency>
<!-- endregion Reactor (ReactiveRequest)-->
<!-- endregion Rest Calls -->
<!-- region Spring boot testing -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<!-- <scope>test</scope>-->
<exclusions>
<!-- when using docker -->
<!-- <exclusion>-->
<!-- <groupId>org.junit.vintage</groupId>-->
<!-- <artifactId>junit-vintage-engine</artifactId>-->
<!-- </exclusion>-->
<!-- <exclusion>-->
<!-- <groupId>org.assertj</groupId>-->
<!-- <artifactId>assertj-core</artifactId>-->
<!-- </exclusion>-->
<!-- <!–remove test scope for src test execution –>-->
<!-- <exclusion>-->
<!-- <groupId>org.junit.jupiter</groupId>-->
<!-- <artifactId>junit-jupiter</artifactId>-->
<!-- </exclusion>-->
<!-- <exclusion>-->
<!-- <groupId>org.mockito</groupId>-->
<!-- <artifactId>mockito-core</artifactId>-->
<!-- </exclusion>-->
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<!-- region Logger Configuration -->
<!-- Lombok is commonly used for this -->
<!-- logger guide https://gist.github.com/stykalin/8c77ad2a705eabddc2424eff0e99d1ec -->
<!-- Spring Boot already has this library -->
<!-- <dependency>-->
<!-- <groupId>org.apache.logging.log4j</groupId>-->
<!-- <artifactId>log4j-slf4j-impl</artifactId>-->
<!-- <version>2.17.2</version>-->
<!-- </dependency>-->
<!-- endregion -->
<!-- region Lombok (Annotations) Configuration -->
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<!-- (Not sure but) it will take the version from Spring boot -->
<version>1.18.26</version>
<!-- <type>jar</type>-->
</dependency>
<!-- endregion -->
<!-- region UnitTesting -->
<!-- region AssertJ -->
<!-- spring-boot-test is including it, but scope should not be limited to test for main to execute tests -->
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<!-- <scope>test</scope>-->
</dependency>
<!-- endregion AssertJ -->
<!-- region JUnit5 -->
<!-- Spring has this already for testing scope-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<!-- <scope>test</scope>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.junit.jupiter</groupId>-->
<!-- <artifactId>junit-jupiter-engine</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
</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 -->
<!-- endregion UnitTesting -->
<!-- endregion Spring boot testing -->
<!--endregion Spring boot -->
<!-- region Testing (No-Spring) -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<version>1.9.2</version>
</dependency>
<!-- region Automation Functional Testing -->
<!-- region White_SeleniumFramework + bonigarcia-webdriver-->
<!-- region White_SeleniumFramework -->
<!-- https://mvnrepository.com/artifact/com.github.white-sdev/White_SeleniumFramework -->
<dependency>
<!-- new Maven Central Repo -->
<groupId>io.github.whiteorganization</groupId>
<artifactId>white-selenium-framework</artifactId>
<version>2.0.2</version>
<!-- You might need to manually import this library due to lack of maintenance on White_SeleniumFramework -->
<exclusions>
<exclusion>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
</exclusion>
<!-- Spring Already has this implementation. This exclusion won't be required in the 1.1.1 version-->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</exclusion>
<!--webdrivermanager-->
<!-- <exclusion>-->
<!-- <groupId>com.google.guava</groupId>-->
<!-- <artifactId>guava</artifactId>-->
<!-- </exclusion>-->
<exclusion>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- endregion White_SeleniumFramework -->
<!-- region bonigarcia WebDriverManager -->
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<!--suppress VulnerableLibrariesLocal -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.7.0</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-http-jdk-client</artifactId>
<!-- <version>4.8.1</version>-->
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<!-- region HTTPClient5 -->
<!-- this was being imported by bonigarcia WebDriverManager but in 5.3.2 version it's no longer the case. -->
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5 -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.2.1</version>
</dependency>
<!-- endregion HTTPClient5 -->
<!-- endregion bonigarcia WebDriverManager -->
<!-- region Selenium-Java -->
<!-- white-selenium-framework is including it, add it if White_SeleniumFramework is removed -->
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<!-- <dependency>-->
<!-- <groupId>org.seleniumhq.selenium</groupId>-->
<!-- <artifactId>selenium-java</artifactId>-->
<!-- <version>${selenium.version}</version>-->
<!-- </dependency>-->
<!-- endregion Selenium-Java -->
<!-- region Selenium-Jupiter -->
<!-- white-selenium-framework is including it, add it if White_SeleniumFramework is removed -->
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/selenium-jupiter -->
<!-- <dependency>-->
<!-- <groupId>io.github.bonigarcia</groupId>-->
<!-- <artifactId>selenium-jupiter</artifactId>-->
<!-- <version>4.3.3</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.junit.jupiter</groupId>-->
<!-- <artifactId>junit-jupiter-api</artifactId>-->
<!-- <version>${junit.jupiter.version}</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<!-- endregion Selenium-Jupiter -->
<!--endregion White_SeleniumFramework + bonigarcia-webdriver-->
<!-- endregion Automation Functional Testing -->
<!-- region SRC test execution -->
<!-- SRC test execution requires
<testOutputDirectory>target/classes</testOutputDirectory>
in build to detect the tests classes -->
<!-- region JUnit Jupiter Engine -->
<!-- JUnit-Jupiter-Engine is already present in testing, but main requires it to execute tests from src -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<!-- <scope>compile</scope>-->
</dependency>
<!-- endregion JUnit Jupiter Engine -->
<!-- region JUnit Platform Launcher -->
<!-- allows src/main package to execute test with Launcher -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.9.1</version>
</dependency>
<!-- endregion JUnit Platform Launcher -->
<!-- endregion SRC test execution -->
<!-- endregion Testing -->
<!-- region OpenCSV to CSV I/O (to/from Java Objects mapping) -->
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.7.1</version>
</dependency>
<!--endregion OpenCSV-->
<!-- region H2 DB dependency-->
<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<!--Not necesary to specify the version to use-->
<!-- <version>RELEASE</version>-->
<!--specify if you want to limit the DB use to a specific scope (e.g. testing)-->
<!-- <scope>test</scope>-->
</dependency>
<!--endregion H2 DB dependency-->
<!-- region FlatLaf - Flat swing Look and Feel -->
<!-- https://search.maven.org/artifact/com.formdev/flatlaf/2.6/jar -->
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>3.0</version>
</dependency>
<!-- endregion FlatLaf - Flat swing Look and Feel -->
<!-- region IntelliJ plugins dependencies -->
<!-- these will solve the issues with IntelliJ plugin identification problems -->
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.failsafe.plugin.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-failsafe-plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire.failsafe.plugin.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-assembly-plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
</dependency>
<!-- endregion IntelliJ plugins dependencies -->
<!-- region No Spring Logging -->
<!-- region Lombok -->
<!-- Lombok is already being imported by `spring-boot-starter-parent` and the 3.0.0 version imports uses lombok version [org.projectlombok:lombok:1.18.26] -->
<!-- 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 No Spring Logging -->
</dependencies>
<!-- region Profiles -->
<profiles>
<profile>
<id>disable-java8-doc-lint</id>
<activation>
<activeByDefault>true</activeByDefault>
<!-- <jdk>[1.8,)</jdk>-->
</activation>
<properties>
<!-- region disable DockLint -->
<!-- Eliminates the JavaDoc problems in later versions when you have problems in the documentation -->
<doclint>none</doclint>
<!-- endregion disable DockLint -->
<!-- <name>spring.profiles.active</name>-->
<!-- <value>disable-java8-doc-lint</value>-->
<activatedProperties>disable-java8-doc-lint</activatedProperties>
</properties>
</profile>
<profile>
<id>headless</id>
<!-- <activation>-->
<!-- <jdk>[1.8,)</jdk>-->
<!-- </activation>-->
<properties>
<!-- region disable DockLint -->
<!-- Eliminates the JavaDoc problems in later versions when you have problems in the documentation -->
<doclint>none</doclint>
<!-- endregion disable DockLint -->
<excluded.tags>ExcludeWhenHeadless</excluded.tags>
<!-- <name>spring.profiles.active</name>-->
<!-- <value>headless</value>-->
<activatedProperties>headless</activatedProperties>
</properties>
</profile>
</profiles>
<!-- endregion Profiles -->
<build>
<!-- <finalName>${project.artifactId}</finalName>-->
<!-- region let Spring application.properties use POM properties -->
<!--Required for H2 credential usage for connection, otherwise specify credentials in application.properties manually. -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<!-- This will do the same for test. -->
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<!--endregion -->
<!-- compiles the src test with the rest of the code, so it will be able to identify tests classes from the src/java section -->
<!-- <testOutputDirectory>target/classes</testOutputDirectory>-->
<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 property 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>
<version>3.4.2</version>
<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 on a specific maven goal -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<mainClass>${main.class}</mainClass>
</configuration>
<executions>
<!-- region Package JAR execution -->
<!-- you probably won't require running your application like this (with an executable jar) if it is dockerized -->
<!-- uncomment this if you stop using docker or truly require running your application on the package phase -->
<execution>
<phase>install</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
<!-- endregion Package JAR execution -->
<!-- region Docker execution -->
<!-- The docker image execution depends on the docker image generation (kubernetes-maven-plugin) -->
<!-- <execution>-->
<!-- <id>docker-compose</id>-->
<!-- <phase>install</phase>-->
<!-- <goals>-->
<!-- <goal>exec</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <executable>docker-compose</executable>-->
<!-- <arguments>-->
<!-- <argument>--project-directory</argument>-->
<!-- <argument>src\main\docker</argument>-->
<!-- <argument>up</argument>-->
<!-- </arguments>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- endregion Docker execution -->
<execution>
<id>report</id>
<phase>post-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>mvn</executable>
<arguments>
<argument>surefire-report:report-only</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- endregion Forces the app to be executed on a specific maven goal -->
<!-- region Spring boot configuration-->
<!-- in case spring boot is being used-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- endregion -->
<!-- region H2 Database Configuration -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
</dependency>
</dependencies>
<configuration>
<driver>org.h2.Driver</driver>
<!--region Automatic configuration from the POM Properties.-->
<url>${h2.url}</url>
<username>${h2.user}</username>
<password>${h2.password}</password>
<autocommit>true</autocommit>
<!-- <skip>${maven.test.skip}</skip>-->
<!--endregion -->
</configuration>
<executions>
<execution>
<id>create-db</id>
<phase>process-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<!--region ScriptFiles-->
<!--if required you can specify the sql scripts to run at creation time or at the end of the execution-->
<!-- <configuration>-->
<!-- <srcFiles>-->
<!-- <srcFile>${sql.dir}/drop_db.sql</srcFile>-->
<!-- <srcFile>${sql.dir}/tables.sql</srcFile>-->
<!-- <srcFile>${sql.dir}/constraints.sql</srcFile>-->
<!-- ... etc ...-->
<!-- </srcFiles>-->
<!-- </configuration>-->
<!--endregion ScriotFiles-->
</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 Generates JavaDocs of the project and adds it to the generated JAR-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<detectJavaApiLink>false</detectJavaApiLink>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!--endregion-->
<!-- region Maven is able to run JUnit5 Unit Tests (surefire) -->
<!-- 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>${surefire.failsafe.plugin.version}</version>-->
<!-- <executions>-->
<!-- <execution><goals><goal>test</goal></goals></execution>-->
<!-- </executions>-->
<!--<!– <configuration>–>-->
<!--<!– <reportsDirectory>${logs.path}</reportsDirectory>–>-->
<!--<!– <redirectTestOutputToFile>true</redirectTestOutputToFile>–>-->
<!--<!– </configuration>–>-->
<!-- <!– region Deprecated in 3.0.0-M4 –>-->
<!-- <!– above M3 will get this on its own, but it will not let you know,-->
<!-- it will just throw a problem with org/apache/maven/surefire/booter/ForkedProcessEvent –>-->
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>org.junit.platform</groupId>-->
<!-- <artifactId>junit-platform-surefire-provider</artifactId>-->
<!-- <version>RELEASE</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.junit.jupiter</groupId>-->
<!-- <artifactId>junit-jupiter-engine</artifactId>-->
<!-- <version>RELEASE</version>-->
<!-- </dependency>-->
<!-- </dependencies>-->
<!-- <!– endregion Deprecated in 3.0.0-M4 –>-->
<!-- </plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<executions>
<execution><goals><goal>test</goal></goals></execution>
</executions>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${logs.path}</reportsDirectory>
<!-- override sufrefire plugins behaviors, provided by: https://stackoverflow.com/questions/6612344/prevent-unit-tests-but-allow-integration-tests-in-maven#:~:text=%20%3Cskiptests%3E%24%7Bskiptests%7D%3C%2Fskiptests%3E%20%3Cskipits%3E%24%7Bskipits%7D%3C%2Fskipits%3E -->
<skipTests>${skipUTs}</skipTests>
</configuration>
</plugin>
<!-- region surefire-report Generates an HTML report -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${surefire.failsafe.plugin.version}</version>
<configuration>
<!-- <reportsDirectories>${logs.path}</reportsDirectories>-->
<reportsDirectories>
<reportsDirectory>${logs.path}</reportsDirectory>
</reportsDirectories>
</configuration>
</plugin>
<!-- endregion surefire-report Generates an HTML report -->
<!-- endregion -->
<!-- region Maven runs Integration Tests -->
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire.failsafe.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<reportsDirectory>${logs.path}</reportsDirectory>
<!--suppress MavenModelInspection -->
<excludedGroups>${excluded.tags}</excludedGroups>
<!-- override sufrefire plugins behaviors, provided by: https://stackoverflow.com/questions/6612344/prevent-unit-tests-but-allow-integration-tests-in-maven#:~:text=%20%3Cskiptests%3E%24%7Bskiptests%7D%3C%2Fskiptests%3E%20%3Cskipits%3E%24%7Bskipits%7D%3C%2Fskipits%3E -->
<skipTests>${skipTests}</skipTests>
<skipITs>${skipITs}</skipITs>
</configuration>
</plugin>
<!-- endregion Maven runs Integration Tests -->
<!-- region Docker Generation -->
<!-- You won't require the Dockerfile to generate the docker image manually,
and you can just use `docker compose -[delete me]-project-directory src\main\docker up` to run the image -->
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>1.10.1</version>
</plugin>
<!-- endregion Docker Generation -->
</plugins>
</build>
</project>