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