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