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