[DCAEGEN2] Vulnerability addressal for TCAgen2
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ ============LICENSE_START=======================================================
4   ~ TCAgen2
5   ~ ================================================================================
6   ~ Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
7   ~ Copyright (c) 2021 Samsung Electronics. All rights reserved.
8   ~ Copyright (c) 2022 Wipro Limited.
9   ~ ================================================================================
10   ~ Licensed under the Apache License, Version 2.0 (the "License");
11   ~ you may not use this file except in compliance with the License.
12   ~ You may obtain a copy of the License at
13   ~
14   ~      http://www.apache.org/licenses/LICENSE-2.0
15   ~
16   ~ Unless required by applicable law or agreed to in writing, software
17   ~ distributed under the License is distributed on an "AS IS" BASIS,
18   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   ~ See the License for the specific language governing permissions and
20   ~ limitations under the License.
21   ~ ============LICENSE_END=========================================================
22   ~
23   -->
24 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25          xmlns="http://maven.apache.org/POM/4.0.0"
26          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
27
28     <modelVersion>4.0.0</modelVersion>
29
30         <parent>
31                 <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
32                 <artifactId>tca-gen2-parent</artifactId>
33                 <version>${revision}</version>
34         </parent>
35
36     <artifactId>eelf-logger</artifactId>
37     <name>EELF Logger Parent</name>
38     <packaging>pom</packaging>
39
40     <modules>
41         <module>eelf-logger-api</module>
42         <module>eelf-logger-model</module>
43         <module>eelf-logger-logback-impl</module>
44     </modules>
45
46     <properties>
47         <!-- PROJECT SETTINGS-->
48         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
49         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
50         <main.basedir>${project.basedir}</main.basedir>
51
52         <!--TEST SETTINGS -->
53         <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
54
55         <!-- PROJECT DEPENDENCIES -->
56         <slf4j.version>1.7.5</slf4j.version>
57         <logback.version>1.2.3</logback.version>
58         <lombok.version>1.18.12</lombok.version>
59
60         <!--TESTING DEPENDENCIES -->
61         <junit.version>4.12</junit.version>
62         <mockito.version>2.22.0</mockito.version>
63         <assertj-core.version>2.6.0</assertj-core.version>
64
65
66         <!-- PLUGINS VERSIONS -->
67         <compiler.plugin.version>3.8.0</compiler.plugin.version>
68         <surefire.plugin.version>2.19.1</surefire.plugin.version>
69         <failsafe.plugin.version>2.19.1</failsafe.plugin.version>
70
71         <pmd.plugin.version>3.11.0</pmd.plugin.version>
72         <javadoc.plugin.version>3.0.0</javadoc.plugin.version>
73         <source.plugin.version>3.2.1</source.plugin.version>
74         <jar.plugin.version>2.4</jar.plugin.version>
75         <deploy.plugin.version>2.8</deploy.plugin.version>
76         <lombok.plugin.version>1.18.0.0</lombok.plugin.version>
77         <maven.site.plugin>3.5.1</maven.site.plugin>
78
79         <!--PLUGIN SETTINGS -->
80         <compiler.source.version>11</compiler.source.version>
81         <compiler.target.version>11</compiler.target.version>
82         <unit.test.pattern>**/*Test.java</unit.test.pattern>
83         <skip.unit.tests>false</skip.unit.tests>
84         <integration.test.pattern>**/*IT.java</integration.test.pattern>
85         <skip.integration.tests>true</skip.integration.tests>
86         <pmd.violation.buildfail>true</pmd.violation.buildfail>
87         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
88
89     </properties>
90
91
92     <dependencyManagement>
93
94         <dependencies>
95
96             <!-- LOGGING -->
97             <dependency>
98                 <groupId>org.slf4j</groupId>
99                 <artifactId>slf4j-api</artifactId>
100                 <version>${slf4j.version}</version>
101             </dependency>
102
103             <dependency>
104                 <groupId>ch.qos.logback</groupId>
105                 <artifactId>logback-classic</artifactId>
106                 <version>${logback.version}</version>
107             </dependency>
108
109             <!-- CODE GENERATION -->
110             <dependency>
111                 <groupId>org.projectlombok</groupId>
112                 <artifactId>lombok</artifactId>
113                 <version>${lombok.version}</version>
114                 <scope>provided</scope>
115             </dependency>
116
117
118             <!-- TEST DEPENDENCIES -->
119             <dependency>
120                 <groupId>junit</groupId>
121                 <artifactId>junit</artifactId>
122                 <version>${junit.version}</version>
123                 <scope>test</scope>
124             </dependency>
125
126             <dependency>
127                 <groupId>org.mockito</groupId>
128                 <artifactId>mockito-core</artifactId>
129                 <version>${mockito.version}</version>
130                 <scope>test</scope>
131             </dependency>
132
133             <dependency>
134                 <groupId>org.assertj</groupId>
135                 <artifactId>assertj-core</artifactId>
136                 <version>${assertj-core.version}</version>
137                 <scope>test</scope>
138             </dependency>
139
140         </dependencies>
141
142     </dependencyManagement>
143
144
145     <!-- COMMON DEPENDENCIES FOR ALL SUB-PROJECTS -->
146     <dependencies>
147         <!-- TEST DEPENDENCIES -->
148         <dependency>
149             <groupId>junit</groupId>
150             <artifactId>junit</artifactId>
151         </dependency>
152         <dependency>
153             <groupId>org.mockito</groupId>
154             <artifactId>mockito-core</artifactId>
155         </dependency>
156         <dependency>
157             <groupId>org.assertj</groupId>
158             <artifactId>assertj-core</artifactId>
159         </dependency>
160     </dependencies>
161
162
163     <build>
164
165         <pluginManagement>
166
167             <plugins>
168                 <!-- COMPILER PLUGIN -->
169                 <plugin>
170                     <groupId>org.apache.maven.plugins</groupId>
171                     <artifactId>maven-compiler-plugin</artifactId>
172                     <version>${compiler.plugin.version}</version>
173                     <configuration>
174                         <source>${compiler.target.version}</source>
175                         <target>${compiler.source.version}</target>
176                     </configuration>
177                 </plugin>
178
179                 <!-- MAVEN SOURCE PLUGIN -->
180                 <plugin>
181                     <groupId>org.apache.maven.plugins</groupId>
182                     <artifactId>maven-source-plugin</artifactId>
183                     <version>${source.plugin.version}</version>
184                     <configuration>
185                         <excludeResources>true</excludeResources>
186                     </configuration>
187                     <executions>
188                         <execution>
189                             <id>attach-sources</id>
190                             <phase>verify</phase>
191                             <goals>
192                                 <goal>jar-no-fork</goal>
193                             </goals>
194                         </execution>
195                     </executions>
196                 </plugin>
197
198
199                 <!-- MAVEN JAVADOC PLUGIN -->
200                 <plugin>
201                     <groupId>org.apache.maven.plugins</groupId>
202                     <artifactId>maven-javadoc-plugin</artifactId>
203                     <version>${javadoc.plugin.version}</version>
204                     <configuration>
205                         <!-- minimize console output messages -->
206                         <quiet>true</quiet>
207                         <verbose>false</verbose>
208                         <useStandardDocletOptions>false</useStandardDocletOptions>
209                     </configuration>
210                     <executions>
211                         <execution>
212                             <id>aggregate</id>
213                             <phase>site</phase>
214                             <goals>
215                                 <goal>aggregate</goal>
216                             </goals>
217                         </execution>
218                         <execution>
219                             <id>attach-javadoc</id>
220                             <goals>
221                                 <goal>jar</goal>
222                             </goals>
223                         </execution>
224                     </executions>
225                 </plugin>
226
227
228                 <!-- SUREFIRE TEST PLUGIN -->
229                 <plugin>
230                     <groupId>org.apache.maven.plugins</groupId>
231                     <artifactId>maven-surefire-plugin</artifactId>
232                     <version>${surefire.plugin.version}</version>
233                     <configuration>
234                         <skipTests>${skip.unit.tests}</skipTests>
235                         <argLine>-Xmx2048m -Djava.awt.headless=true -XX:+UseConcMarkSweepGC
236                             -XX:OnOutOfMemoryError="kill -9 %p" -XX:+HeapDumpOnOutOfMemoryError
237                         </argLine>
238                         <redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
239                         <parallel>methods</parallel>
240                         <threadCount>8</threadCount>
241                         <forkCount>8</forkCount>
242                         <reuseForks>true</reuseForks>
243                         <reportFormat>xml</reportFormat>
244                         <trimStackTrace>false</trimStackTrace>
245                         <systemPropertyVariables>
246                             <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
247                             <logback.configurationFile>
248                                 ${basedir}/src/test/resources/logback-test.xml
249                             </logback.configurationFile>
250                         </systemPropertyVariables>
251                         <includes>
252                             <include>${unit.test.pattern}</include>
253                         </includes>
254                         <excludes>
255                             <exclude>${integration.test.pattern}</exclude>
256                         </excludes>
257                         <!-- Sets the VM argument line used when unit tests are run. -->
258                         <argLine>${surefireArgLine}</argLine>
259                     </configuration>
260                     <dependencies>
261                         <dependency>
262                             <groupId>org.apache.maven.surefire</groupId>
263                             <artifactId>surefire-junit47</artifactId>
264                             <version>${surefire.plugin.version}</version>
265                         </dependency>
266                     </dependencies>
267                 </plugin>
268
269                 <!-- FAIL SAFE PLUGIN FOR INTEGRATION TEST -->
270                 <plugin>
271                     <groupId>org.apache.maven.plugins</groupId>
272                     <artifactId>maven-failsafe-plugin</artifactId>
273                     <version>${failsafe.plugin.version}</version>
274                     <executions>
275                         <execution>
276                             <id>integration-tests</id>
277                             <goals>
278                                 <goal>integration-test</goal>
279                                 <goal>verify</goal>
280                             </goals>
281                             <configuration>
282                                 <skipTests>${skip.integration.tests}</skipTests>
283                                 <!-- Sets the VM argument line used when integration tests are run. -->
284                                 <!--suppress MavenModelInspection -->
285                                 <argLine>${failsafeArgLine}</argLine>
286                             </configuration>
287                         </execution>
288                     </executions>
289                 </plugin>
290
291                 <!-- PMD PLUGIN SETUP -->
292                 <plugin>
293                     <groupId>org.apache.maven.plugins</groupId>
294                     <artifactId>maven-pmd-plugin</artifactId>
295                     <version>${pmd.plugin.version}</version>
296                     <configuration>
297                         <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
298                         <targetJdk>${compiler.target.version}</targetJdk>
299                         <linkXRef>false</linkXRef>
300                         <!-- BUILD FAIL ON PMD VIOLATION -->
301                         <failOnViolation>${pmd.violation.buildfail}</failOnViolation>
302                         <targetDirectory>${project.reporting.outputDirectory}/pmd</targetDirectory>
303                         <minimumTokens>200</minimumTokens>
304                     </configuration>
305                     <executions>
306                         <execution>
307                             <id>pmd-check</id>
308                             <goals>
309                                 <goal>check</goal>
310                             </goals>
311                             <configuration>
312                                 <printFailingErrors>true</printFailingErrors>
313                                 <excludeFromFailureFile>${main.basedir}/pmd-exclude.properties</excludeFromFailureFile>
314                             </configuration>
315                         </execution>
316                         <execution>
317                             <id>cpd-check</id>
318                             <goals>
319                                 <goal>cpd-check</goal>
320                             </goals>
321                             <configuration>
322                                 <printFailingErrors>true</printFailingErrors>
323                                 <excludeFromFailureFile>${main.basedir}/cpd-exclude.properties</excludeFromFailureFile>
324                             </configuration>
325                         </execution>
326                     </executions>
327                 </plugin>
328
329
330
331
332                 <!-- LOMBOK PLUGIN -->
333                 <plugin>
334                     <groupId>org.projectlombok</groupId>
335                     <artifactId>lombok-maven-plugin</artifactId>
336                     <version>${lombok.plugin.version}</version>
337                     <executions>
338                         <execution>
339                             <id>delombok</id>
340                             <phase>generate-sources</phase>
341                             <goals>
342                                 <goal>delombok</goal>
343                             </goals>
344                             <configuration>
345                                 <addOutputDirectory>false</addOutputDirectory>
346                                 <sourceDirectory>src/main/java</sourceDirectory>
347                             </configuration>
348                         </execution>
349                     </executions>
350                 </plugin>
351
352                 <!-- JAR PLUGIN -->
353                 <plugin>
354                     <groupId>org.apache.maven.plugins</groupId>
355                     <artifactId>maven-jar-plugin</artifactId>
356                     <version>${jar.plugin.version}</version>
357                     <configuration>
358                         <archive>
359                             <manifest>
360                                 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
361                             </manifest>
362                             <manifestEntries>
363                                 <Implementation-Build-Version>${project.version}</Implementation-Build-Version>
364                             </manifestEntries>
365                         </archive>
366                     </configuration>
367                 </plugin>
368
369                 <!-- DEPLOY PLUGIN -->
370                 <plugin>
371                     <groupId>org.apache.maven.plugins</groupId>
372                     <artifactId>maven-deploy-plugin</artifactId>
373                     <version>${deploy.plugin.version}</version>
374                     <configuration>
375                         <deployAtEnd>true</deployAtEnd>
376                     </configuration>
377                 </plugin>
378
379             </plugins>
380
381         </pluginManagement>
382
383         <plugins>
384
385             <plugin>
386                 <groupId>org.apache.maven.plugins</groupId>
387                 <artifactId>maven-compiler-plugin</artifactId>
388             </plugin>
389
390             <plugin>
391                 <groupId>org.apache.maven.plugins</groupId>
392                 <artifactId>maven-jar-plugin</artifactId>
393             </plugin>
394
395             <plugin>
396                 <groupId>org.apache.maven.plugins</groupId>
397                 <artifactId>maven-surefire-plugin</artifactId>
398             </plugin>
399
400             <plugin>
401                 <groupId>org.apache.maven.plugins</groupId>
402                 <artifactId>maven-failsafe-plugin</artifactId>
403             </plugin>
404
405             <plugin>
406                 <groupId>org.apache.maven.plugins</groupId>
407                 <artifactId>maven-deploy-plugin</artifactId>
408             </plugin>
409
410             <plugin>
411                 <groupId>org.apache.maven.plugins</groupId>
412                 <artifactId>maven-source-plugin</artifactId>
413             </plugin>
414
415             <plugin>
416                 <groupId>org.apache.maven.plugins</groupId>
417                 <artifactId>maven-javadoc-plugin</artifactId>
418             </plugin>
419
420             <plugin>
421                 <groupId>org.apache.maven.plugins</groupId>
422                 <artifactId>maven-pmd-plugin</artifactId>
423             </plugin>
424
425         </plugins>
426
427     </build>
428
429     <profiles>
430         <profile>
431             <id>disable-java8-doclint</id>
432             <activation>
433                 <jdk>[1.8,)</jdk>
434             </activation>
435             <properties>
436                 <additionalparam>-Xdoclint:none</additionalparam>
437             </properties>
438         </profile>
439     </profiles>
440
441 </project>