fc63e71e8cf82ba0094812125db5b2e9d5c917f8
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ ================================================================================
4   ~ Copyright (c) 2018 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</groupId>
28                 <artifactId>tca-gen2</artifactId>
29                 <version>3.0.0-SNAPSHOT</version>
30         </parent>
31
32         <groupId>org.onap.dcaegen2.analytics</groupId>
33     <artifactId>eelf-logger</artifactId>
34     <version>3.0.0-SNAPSHOT</version>
35
36     <name>EELF Logger Parent</name>
37     <packaging>pom</packaging>
38     
39     <modules>
40         <module>eelf-logger-api</module>
41         <module>eelf-logger-model</module>
42         <module>eelf-logger-logback-impl</module>
43     </modules>
44
45
46
47     <properties>
48
49         <!-- PROJECT SETTINGS-->
50         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
51         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
52         <main.basedir>${project.basedir}</main.basedir>
53
54         <!--TEST SETTINGS -->
55         <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
56
57         <!-- PROJECT DEPENDENCIES -->
58         <slf4j.version>1.7.5</slf4j.version>
59         <logback.version>1.2.3</logback.version>
60         <lombok.version>1.16.10</lombok.version>
61
62
63         <!--TESTING DEPENDENCIES -->
64         <junit.version>4.12</junit.version>
65         <mockito.version>2.2.11</mockito.version>
66         <assertj-core.version>2.6.0</assertj-core.version>
67
68
69         <!-- PLUGINS VERSIONS -->
70         <compiler.plugin.version>3.3</compiler.plugin.version>
71         <surefire.plugin.version>2.19.1</surefire.plugin.version>
72         <failsafe.plugin.version>2.19.1</failsafe.plugin.version>
73         <findbugs.plugin.version>3.0.2</findbugs.plugin.version>
74
75         <pmd.plugin.version>3.5</pmd.plugin.version>
76         <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
77         <source.plugin.version>2.4</source.plugin.version>
78         <jar.plugin.version>2.4</jar.plugin.version>
79         <deploy.plugin.version>2.8</deploy.plugin.version>
80         <lombok.plugin.version>1.16.10.0</lombok.plugin.version>
81         <maven.site.plugin>3.5.1</maven.site.plugin>
82
83         <!--PLUGIN SETTINGS -->
84         <compiler.source.version>1.7</compiler.source.version>
85         <compiler.target.version>1.7</compiler.target.version>
86         <unit.test.pattern>**/*Test.java</unit.test.pattern>
87         <skip.unit.tests>false</skip.unit.tests>
88         <integration.test.pattern>**/*IT.java</integration.test.pattern>
89         <skip.integration.tests>true</skip.integration.tests>
90         <pmd.violation.buildfail>true</pmd.violation.buildfail>
91         <findbugs.failOnError>true</findbugs.failOnError>
92
93     </properties>
94
95
96     <dependencyManagement>
97
98         <dependencies>
99
100             <!-- LOGGING -->
101             <dependency>
102                 <groupId>org.slf4j</groupId>
103                 <artifactId>slf4j-api</artifactId>
104                 <version>${slf4j.version}</version>
105             </dependency>
106
107             <dependency>
108                 <groupId>ch.qos.logback</groupId>
109                 <artifactId>logback-classic</artifactId>
110                 <version>${logback.version}</version>
111             </dependency>
112
113             <!-- CODE GENERATION -->
114             <dependency>
115                 <groupId>org.projectlombok</groupId>
116                 <artifactId>lombok</artifactId>
117                 <version>${lombok.version}</version>
118                 <scope>provided</scope>
119             </dependency>
120
121
122             <!-- TEST DEPENDENCIES -->
123             <dependency>
124                 <groupId>junit</groupId>
125                 <artifactId>junit</artifactId>
126                 <version>${junit.version}</version>
127                 <scope>test</scope>
128             </dependency>
129
130             <dependency>
131                 <groupId>org.mockito</groupId>
132                 <artifactId>mockito-core</artifactId>
133                 <version>${mockito.version}</version>
134                 <scope>test</scope>
135             </dependency>
136
137             <dependency>
138                 <groupId>org.assertj</groupId>
139                 <artifactId>assertj-core</artifactId>
140                 <version>${assertj-core.version}</version>
141                 <scope>test</scope>
142             </dependency>
143
144         </dependencies>
145
146     </dependencyManagement>
147
148
149     <!-- COMMON DEPENDENCIES FOR ALL SUB-PROJECTS -->
150     <dependencies>
151         <!-- TEST DEPENDENCIES -->
152         <dependency>
153             <groupId>junit</groupId>
154             <artifactId>junit</artifactId>
155         </dependency>
156         <dependency>
157             <groupId>org.mockito</groupId>
158             <artifactId>mockito-core</artifactId>
159         </dependency>
160         <dependency>
161             <groupId>org.assertj</groupId>
162             <artifactId>assertj-core</artifactId>
163         </dependency>
164     </dependencies>
165
166
167     <build>
168
169         <pluginManagement>
170
171             <plugins>
172                 <!-- COMPILER PLUGIN -->
173                 <plugin>
174                     <groupId>org.apache.maven.plugins</groupId>
175                     <artifactId>maven-compiler-plugin</artifactId>
176                     <version>${compiler.plugin.version}</version>
177                     <configuration>
178                         <source>${compiler.target.version}</source>
179                         <target>${compiler.source.version}</target>
180                     </configuration>
181                 </plugin>
182
183                 <!-- MAVEN SOURCE PLUGIN -->
184                 <plugin>
185                     <groupId>org.apache.maven.plugins</groupId>
186                     <artifactId>maven-source-plugin</artifactId>
187                     <version>${source.plugin.version}</version>
188                     <configuration>
189                         <excludeResources>true</excludeResources>
190                     </configuration>
191                     <executions>
192                         <execution>
193                             <id>attach-sources</id>
194                             <phase>verify</phase>
195                             <goals>
196                                 <goal>jar-no-fork</goal>
197                             </goals>
198                         </execution>
199                     </executions>
200                 </plugin>
201
202
203                 <!-- MAVEN JAVADOC PLUGIN -->
204                 <plugin>
205                     <groupId>org.apache.maven.plugins</groupId>
206                     <artifactId>maven-javadoc-plugin</artifactId>
207                     <version>${javadoc.plugin.version}</version>
208                     <configuration>
209                         <!-- minimize console output messages -->
210                         <quiet>true</quiet>
211                         <verbose>false</verbose>
212                         <useStandardDocletOptions>false</useStandardDocletOptions>
213                     </configuration>
214                     <executions>
215                         <execution>
216                             <id>aggregate</id>
217                             <phase>site</phase>
218                             <goals>
219                                 <goal>aggregate</goal>
220                             </goals>
221                         </execution>
222                         <execution>
223                             <id>attach-javadoc</id>
224                             <goals>
225                                 <goal>jar</goal>
226                             </goals>
227                         </execution>
228                     </executions>
229                 </plugin>
230
231
232                 <!-- SUREFIRE TEST PLUGIN -->
233                 <plugin>
234                     <groupId>org.apache.maven.plugins</groupId>
235                     <artifactId>maven-surefire-plugin</artifactId>
236                     <version>${surefire.plugin.version}</version>
237                     <configuration>
238                         <skipTests>${skip.unit.tests}</skipTests>
239                         <argLine>-Xmx2048m -Djava.awt.headless=true -XX:+UseConcMarkSweepGC
240                             -XX:OnOutOfMemoryError="kill -9 %p" -XX:+HeapDumpOnOutOfMemoryError
241                         </argLine>
242                         <redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
243                         <parallel>methods</parallel>
244                         <threadCount>8</threadCount>
245                         <forkCount>8</forkCount>
246                         <reuseForks>true</reuseForks>
247                         <reportFormat>xml</reportFormat>
248                         <trimStackTrace>false</trimStackTrace>
249                         <systemPropertyVariables>
250                             <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
251                             <logback.configurationFile>
252                                 ${basedir}/src/test/resources/logback-test.xml
253                             </logback.configurationFile>
254                         </systemPropertyVariables>
255                         <includes>
256                             <include>${unit.test.pattern}</include>
257                         </includes>
258                         <excludes>
259                             <exclude>${integration.test.pattern}</exclude>
260                         </excludes>
261                         <!-- Sets the VM argument line used when unit tests are run. -->
262                         <argLine>${surefireArgLine}</argLine>
263                     </configuration>
264                     <dependencies>
265                         <dependency>
266                             <groupId>org.apache.maven.surefire</groupId>
267                             <artifactId>surefire-junit47</artifactId>
268                             <version>${surefire.plugin.version}</version>
269                         </dependency>
270                     </dependencies>
271                 </plugin>
272
273                 <!-- FAIL SAFE PLUGIN FOR INTEGRATION TEST -->
274                 <plugin>
275                     <groupId>org.apache.maven.plugins</groupId>
276                     <artifactId>maven-failsafe-plugin</artifactId>
277                     <version>${failsafe.plugin.version}</version>
278                     <executions>
279                         <execution>
280                             <id>integration-tests</id>
281                             <goals>
282                                 <goal>integration-test</goal>
283                                 <goal>verify</goal>
284                             </goals>
285                             <configuration>
286                                 <skipTests>${skip.integration.tests}</skipTests>
287                                 <!-- Sets the VM argument line used when integration tests are run. -->
288                                 <!--suppress MavenModelInspection -->
289                                 <argLine>${failsafeArgLine}</argLine>
290                             </configuration>
291                         </execution>
292                     </executions>
293                 </plugin>
294
295
296                 <!-- FIND BUGS (STATIC CODE ANALYSIS) PLUGIN -->
297                 <plugin>
298                     <groupId>org.codehaus.mojo</groupId>
299                     <artifactId>findbugs-maven-plugin</artifactId>
300                     <version>${findbugs.plugin.version}</version>
301                     <configuration>
302                         <effort>Max</effort>
303                         <threshold>Low</threshold>
304                         <xmlOutput>true</xmlOutput>
305                         <!-- BUILD FAIL ON FINDBUGS ERRORS -->
306                         <failOnError>${findbugs.failOnError}</failOnError>
307                         <excludeFilterFile>${main.basedir}/findbugs-exclude.xml</excludeFilterFile>
308                         <outputDirectory>${project.reporting.outputDirectory}/findbugs</outputDirectory>
309                         <findbugsXmlOutputDirectory>${project.reporting.outputDirectory}/findbugs
310                         </findbugsXmlOutputDirectory>
311                     </configuration>
312                     <executions>
313                         <execution>
314                             <id>analyze-compile</id>
315                             <phase>compile</phase>
316                             <goals>
317                                 <goal>check</goal>
318                             </goals>
319                         </execution>
320                     </executions>
321                 </plugin>
322
323                 <!-- PMD PLUGIN SETUP -->
324                 <plugin>
325                     <groupId>org.apache.maven.plugins</groupId>
326                     <artifactId>maven-pmd-plugin</artifactId>
327                     <version>${pmd.plugin.version}</version>
328                     <configuration>
329                         <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
330                         <targetJdk>${compiler.target.version}</targetJdk>
331                         <linkXRef>false</linkXRef>
332                         <!-- BUILD FAIL ON PMD VIOLATION -->
333                         <failOnViolation>${pmd.violation.buildfail}</failOnViolation>
334                         <targetDirectory>${project.reporting.outputDirectory}/pmd</targetDirectory>
335                         <minimumTokens>200</minimumTokens>
336                     </configuration>
337                     <executions>
338                         <execution>
339                             <id>pmd-check</id>
340                             <goals>
341                                 <goal>check</goal>
342                             </goals>
343                             <configuration>
344                                 <printFailingErrors>true</printFailingErrors>
345                                 <excludeFromFailureFile>${main.basedir}/pmd-exclude.properties</excludeFromFailureFile>
346                             </configuration>
347                         </execution>
348                         <execution>
349                             <id>cpd-check</id>
350                             <goals>
351                                 <goal>cpd-check</goal>
352                             </goals>
353                             <configuration>
354                                 <printFailingErrors>true</printFailingErrors>
355                                 <excludeFromFailureFile>${main.basedir}/cpd-exclude.properties</excludeFromFailureFile>
356                             </configuration>
357                         </execution>
358                     </executions>
359                 </plugin>
360
361
362
363
364                 <!-- LOMBOK PLUGIN -->
365                 <plugin>
366                     <groupId>org.projectlombok</groupId>
367                     <artifactId>lombok-maven-plugin</artifactId>
368                     <version>${lombok.plugin.version}</version>
369                     <executions>
370                         <execution>
371                             <id>delombok</id>
372                             <phase>generate-sources</phase>
373                             <goals>
374                                 <goal>delombok</goal>
375                             </goals>
376                             <configuration>
377                                 <addOutputDirectory>false</addOutputDirectory>
378                                 <sourceDirectory>src/main/java</sourceDirectory>
379                             </configuration>
380                         </execution>
381                     </executions>
382                 </plugin>
383
384                 <!-- JAR PLUGIN -->
385                 <plugin>
386                     <groupId>org.apache.maven.plugins</groupId>
387                     <artifactId>maven-jar-plugin</artifactId>
388                     <version>${jar.plugin.version}</version>
389                     <configuration>
390                         <archive>
391                             <manifest>
392                                 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
393                             </manifest>
394                             <manifestEntries>
395                                 <Implementation-Build-Version>${project.version}</Implementation-Build-Version>
396                             </manifestEntries>
397                         </archive>
398                     </configuration>
399                 </plugin>
400
401                 <!-- DEPLOY PLUGIN -->
402                 <plugin>
403                     <groupId>org.apache.maven.plugins</groupId>
404                     <artifactId>maven-deploy-plugin</artifactId>
405                     <version>${deploy.plugin.version}</version>
406                     <configuration>
407                         <deployAtEnd>true</deployAtEnd>
408                     </configuration>
409                 </plugin>
410
411             </plugins>
412
413         </pluginManagement>
414
415         <plugins>
416
417             <plugin>
418                 <groupId>org.apache.maven.plugins</groupId>
419                 <artifactId>maven-compiler-plugin</artifactId>
420             </plugin>
421
422             <plugin>
423                 <groupId>org.apache.maven.plugins</groupId>
424                 <artifactId>maven-jar-plugin</artifactId>
425             </plugin>
426
427             <plugin>
428                 <groupId>org.apache.maven.plugins</groupId>
429                 <artifactId>maven-surefire-plugin</artifactId>
430             </plugin>
431
432             <plugin>
433                 <groupId>org.apache.maven.plugins</groupId>
434                 <artifactId>maven-failsafe-plugin</artifactId>
435             </plugin>
436
437             <plugin>
438                 <groupId>org.apache.maven.plugins</groupId>
439                 <artifactId>maven-deploy-plugin</artifactId>
440             </plugin>
441
442
443             <plugin>
444                 <groupId>org.apache.maven.plugins</groupId>
445                 <artifactId>maven-source-plugin</artifactId>
446             </plugin>
447
448             <plugin>
449                 <groupId>org.apache.maven.plugins</groupId>
450                 <artifactId>maven-javadoc-plugin</artifactId>
451             </plugin>
452
453             <plugin>
454                 <groupId>org.apache.maven.plugins</groupId>
455                 <artifactId>maven-pmd-plugin</artifactId>
456             </plugin>
457
458             <plugin>
459                 <groupId>org.codehaus.mojo</groupId>
460                 <artifactId>findbugs-maven-plugin</artifactId>
461             </plugin>
462         </plugins>
463
464     </build>
465
466     <profiles>
467         <profile>
468             <id>disable-java8-doclint</id>
469             <activation>
470                 <jdk>[1.8,)</jdk>
471             </activation>
472             <properties>
473                 <additionalparam>-Xdoclint:none</additionalparam>
474             </properties>
475         </profile>
476     </profiles>
477
478 </project>