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