Jacoco doesn't show coverage for tests that use PowerMock
[sdc.git] / pom.xml
1 <!--
2 ============LICENSE_START=======================================================
3 SDC
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. 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 Modifications copyright (c) 2018 Nokia
20 ================================================================================
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25
26     <groupId>org.openecomp.sdc</groupId>
27     <artifactId>sdc-main</artifactId>
28     <version>1.5.0-SNAPSHOT</version>
29     <packaging>pom</packaging>
30     <name>sdc</name>
31     <properties>
32         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33
34         <tosca.datatype.version>1.3.2-SNAPSHOT</tosca.datatype.version>
35
36         <!-- 3rd parties versions -->
37         <bean-matcher.version>0.11</bean-matcher.version>
38         <lang3.version>3.3.2</lang3.version>
39         <lang3.version>3.3.2</lang3.version>
40         <guava.version>18.0</guava.version>
41         <titan.version>1.0.0</titan.version>
42         <sdc.titan.version>1.2.0</sdc.titan.version>
43         <spring.version>4.3.18.RELEASE</spring.version>
44         <spring.security.version>3.2.3.RELEASE</spring.security.version>
45         <spring.ldap.version>2.0.1.RELEASE</spring.ldap.version>
46         <jersey-bom.version>2.27</jersey-bom.version>
47         <servlet-api.version>3.1.0</servlet-api.version>
48         <wire-mock.version>2.18.0</wire-mock.version>
49         <ecomp.version>2.4.0</ecomp.version>
50         <cassandra.unit.version>3.5.0.1</cassandra.unit.version>
51         <lombok.version>1.18.2</lombok.version>
52
53         <commons.collections.version>4.1</commons.collections.version>
54
55         <!-- Elastic Search mapper (reference the elastic search version actually). -->
56         <elastic-search.version>2.4.0</elastic-search.version>
57         <catalog-artifacts.version>1.0.0-SNAPSHOT</catalog-artifacts.version>
58         <catalog-builders.version>1.0.0-SNAPSHOT</catalog-builders.version>
59         <jetty.version>9.4.11.v20180605</jetty.version>
60
61         <!-- JSON and YAML Parsing -->
62         <jackson.version>2.8.10</jackson.version>
63         <jackson-annotations.version>2.8.0</jackson-annotations.version>
64         <jackson.mapper.version>1.9.13</jackson.mapper.version>
65
66         <!-- Yaml for properties -->
67         <snakeyaml.version>1.14</snakeyaml.version>
68         <functionaljava.version>4.7</functionaljava.version>
69         <httpclient.version>4.5.3</httpclient.version>
70         <httpcore.version>4.4.1</httpcore.version>
71         <json-simple.version>1.1</json-simple.version>
72
73         <!-- Logging start -->
74         <!-- logback -->
75         <logback.version>1.2.3</logback.version>
76         <slf4j-api.version>1.7.25</slf4j-api.version>
77         <commons-codec>1.10</commons-codec>
78         <commons-logging>1.2</commons-logging>
79         <janino.version>3.0.6</janino.version>
80
81         <!-- aspects -->
82         <jcabi.version>0.20.1</jcabi.version>
83         <aspectjrt.version>1.8.4</aspectjrt.version>
84         <aspectj.version>1.7.4</aspectj.version>
85         <jcabi.maven.plugin.version>0.13.2</jcabi.maven.plugin.version>
86
87         <!-- Logging end -->
88         <!-- System Metrics -->
89         <sigar.version>1.6.4</sigar.version>
90
91         <regex.version>3.0.3</regex.version>
92
93         <!--GSON-->
94         <gson.version>2.3.1</gson.version>
95
96         <!--listen to file changes-->
97         <commons-jci-core.version>1.1</commons-jci-core.version>
98
99         <!--TESTING-->
100         <mockito.version>2.18.3</mockito.version>
101         <jmockit.version>1.33</jmockit.version>
102         <junit.version>4.12</junit.version>
103         <assertj.version>3.10.0</assertj.version>
104         <testng.version>6.9.10</testng.version>
105         <extentreports.version>3.0.3</extentreports.version>
106         <cucumber.version>2.4.0</cucumber.version>
107         <bean-matchers.version>0.11</bean-matchers.version>
108         <hamcrest-all.version>1.3</hamcrest-all.version>
109         <junit-jupiter.version>5.4.0</junit-jupiter.version>
110         <junit-vintage.version>5.4.0</junit-vintage.version>
111         <junit-platform.version>1.1.0</junit-platform.version>
112         <maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
113
114         <!-- parser-->
115         <sdc-tosca-parser.version>1.3.5</sdc-tosca-parser.version>
116
117         <!-- sonar -->
118         <sonar.language>java</sonar.language>
119         <sonar.sourceEncoding>${project.build.sourceEncoding}</sonar.sourceEncoding>
120         <sonar.projectBaseDir>${project.basedir}</sonar.projectBaseDir>
121         <sonar.branch>${project.version}</sonar.branch>
122
123         <!--cassandra -->
124         <cassandra.driver.version>3.0.0</cassandra.driver.version>
125         <!-- maven central (Nexus) -->
126         <nexus.id.release>nexus</nexus.id.release>
127         <nexus.id.snapshot>nexus</nexus.id.snapshot>
128
129         <!--nexus-->
130         <npm.registry>https://registry.npmjs.org/</npm.registry>
131         <!-- https://nexus.onap.org/content/repositories/npm/ -->
132         <nexus.proxy>https://nexus.onap.org</nexus.proxy>
133         <sitePath>/content/sites/site/org/openecomp/sdc/${project.version}</sitePath>
134         <staging.profile.id>176c31dfe190a</staging.profile.id>
135         <!--maven-->
136         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
137         <!--docker tags-->
138         <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
139
140         <joda.time.version>2.9.9</joda.time.version>
141
142         <!--jacoco-->
143         <jacoco.version>0.8.1</jacoco.version>
144
145     </properties>
146
147
148     <dependencyManagement>
149         <dependencies>
150             <dependency>
151                 <groupId>org.glassfish.jersey.ext</groupId>
152                 <artifactId>jersey-bean-validation</artifactId>
153                 <version>${jersey-bom.version}</version>
154             </dependency>
155
156             <dependency>
157                 <groupId>org.glassfish.hk2.external</groupId>
158                 <artifactId>asm-all-repackaged</artifactId>
159                 <version>2.4.0</version>
160             </dependency>
161
162             <dependency>
163                 <groupId>org.assertj</groupId>
164                 <artifactId>assertj-core</artifactId>
165                 <version>${assertj.version}</version>
166             </dependency>
167
168             <dependency>
169                 <groupId>org.mockito</groupId>
170                 <artifactId>mockito-core</artifactId>
171                 <version>${mockito.version}</version>
172             </dependency>
173             
174                         <dependency>
175                         <groupId>org.jmockit</groupId>
176                                 <artifactId>jmockit</artifactId>
177                                 <version>${jmockit.version}</version>
178                         </dependency>
179                         
180
181             <dependency>
182                 <groupId>com.github.tomakehurst</groupId>
183                 <artifactId>wiremock-standalone</artifactId>
184                 <version>${wire-mock.version}</version>
185             </dependency>
186
187             <dependency>
188                 <groupId>io.cucumber</groupId>
189                 <artifactId>cucumber-java</artifactId>
190                 <version>${cucumber.version}</version>
191             </dependency>
192
193             <dependency>
194                 <groupId>io.cucumber</groupId>
195                 <artifactId>cucumber-junit</artifactId>
196                 <version>${cucumber.version}</version>
197             </dependency>
198
199             <dependency>
200                 <groupId>org.apache.commons</groupId>
201                 <artifactId>commons-lang3</artifactId>
202                 <version>${lang3.version}</version>
203             </dependency>
204             <dependency>
205                 <groupId>org.codehaus.groovy</groupId>
206                 <artifactId>groovy</artifactId>
207                 <version>2.4.13</version>
208             </dependency>
209             <dependency>
210                 <groupId>io.netty</groupId>
211                 <artifactId>netty-all</artifactId>
212                 <version>4.0.45.Final</version>
213             </dependency>
214             <dependency>
215                 <groupId>io.netty</groupId>
216                 <artifactId>netty-handler</artifactId>
217                 <version>4.0.45.Final</version>
218             </dependency>
219             <dependency>
220                 <groupId>org.junit.platform</groupId>
221                 <artifactId>junit-platform-launcher</artifactId>
222                 <version>${junit-platform.version}</version>
223             </dependency>
224             <dependency>
225                 <groupId>org.junit.jupiter</groupId>
226                 <artifactId>junit-jupiter-engine</artifactId>
227                 <version>${junit-jupiter.version}</version>
228             </dependency>
229             <dependency>
230                 <groupId>org.junit.vintage</groupId>
231                 <artifactId>junit-vintage-engine</artifactId>
232                 <version>${junit-vintage.version}</version>
233             </dependency>
234         </dependencies>
235     </dependencyManagement>
236
237     <dependencies>
238         <dependency>
239             <!-- must be on the classpath -->
240             <groupId>org.jacoco</groupId>
241             <artifactId>org.jacoco.agent</artifactId>
242             <classifier>runtime</classifier>
243             <version>${jacoco.version}</version>
244             <scope>test</scope>
245         </dependency>
246     </dependencies>
247
248     <reporting>
249         <plugins>
250             <plugin>
251                 <groupId>org.apache.maven.plugins</groupId>
252                 <artifactId>maven-javadoc-plugin</artifactId>
253                 <version>3.0.1</version>
254                 <configuration>
255                     <failOnError>false</failOnError>
256                     <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
257                     <docletArtifact>
258                         <groupId>org.umlgraph</groupId>
259                         <artifactId>umlgraph</artifactId>
260                         <version>5.6</version>
261                     </docletArtifact>
262                     <useStandardDocletOptions>true</useStandardDocletOptions>
263                 </configuration>
264             </plugin>
265         </plugins>
266     </reporting>
267
268     <build>
269         <pluginManagement>
270             <plugins>
271                 <plugin>
272                     <groupId>org.jacoco</groupId>
273                     <artifactId>jacoco-maven-plugin</artifactId>
274                     <version>0.8.1</version>
275                 </plugin>
276                 <plugin>
277                     <groupId>org.apache.maven.plugins</groupId>
278                     <artifactId>maven-assembly-plugin</artifactId>
279                     <version>3.1.0</version>
280                 </plugin>
281
282                 <plugin>
283                     <groupId>org.codehaus.mojo</groupId>
284                     <artifactId>exec-maven-plugin</artifactId>
285                     <version>1.6.0</version>
286                 </plugin>
287                 <plugin>
288                     <groupId>org.sonarsource.scanner.maven</groupId>
289                     <artifactId>sonar-maven-plugin</artifactId>
290                     <version>3.4.1.1168</version>
291                 </plugin>
292                 <plugin>
293                     <groupId>org.apache.maven.plugins</groupId>
294                     <artifactId>maven-clean-plugin</artifactId>
295                     <version>3.1.0</version>
296                 </plugin>
297                 <plugin>
298                     <groupId>ru.yaal.maven</groupId>
299                     <artifactId>write-text-files-maven-plugin</artifactId>
300                     <version>1.1</version>
301                 </plugin>
302                 <plugin>
303                     <groupId>org.codehaus.gmaven</groupId>
304                     <artifactId>gmaven-plugin</artifactId>
305                     <version>1.5</version>
306                 </plugin>
307                 <plugin>
308                     <groupId>org.codehaus.mojo</groupId>
309                     <artifactId>build-helper-maven-plugin</artifactId>
310                     <version>3.0.0</version>
311                 </plugin>
312                 <plugin>
313                     <groupId>org.apache.maven.plugins</groupId>
314                     <artifactId>maven-deploy-plugin</artifactId>
315                     <version>2.8.2</version>
316                 </plugin>
317                 <plugin>
318                     <groupId>org.apache.maven.plugins</groupId>
319                     <artifactId>maven-shade-plugin</artifactId>
320                     <version>3.1.1</version>
321                 </plugin>
322                 <plugin>
323                     <groupId>org.apache.maven.plugins</groupId>
324                     <artifactId>maven-resources-plugin</artifactId>
325                     <version>3.1.0</version>
326                 </plugin>
327                 <plugin>
328                     <groupId>io.fabric8</groupId>
329                     <artifactId>docker-maven-plugin</artifactId>
330                     <version>0.26.0</version>
331                 </plugin>
332                 <plugin>
333                     <groupId>org.apache.maven.plugins</groupId>
334                     <artifactId>maven-war-plugin</artifactId>
335                     <version>3.2.2</version>
336                 </plugin>
337                 <plugin>
338                     <groupId>com.github.eirslett</groupId>
339                     <artifactId>frontend-maven-plugin</artifactId>
340                     <version>1.6</version>
341                 </plugin>
342                 <plugin>
343                     <groupId>org.apache.maven.plugins</groupId>
344                     <artifactId>maven-surefire-plugin</artifactId>
345                     <version>${maven-surefire-plugin.version}</version>
346                 </plugin>
347                 <plugin>
348                     <groupId>org.apache.maven.plugins</groupId>
349                     <artifactId>maven-compiler-plugin</artifactId>
350                     <version>3.8.0</version>
351                 </plugin>
352                 <plugin>
353                     <groupId>org.sonatype.plugins</groupId>
354                     <artifactId>nexus-staging-maven-plugin</artifactId>
355                     <version>1.6.8</version>
356                 </plugin>
357                 <plugin>
358                     <groupId>com.github.sylvainlaurent.maven</groupId>
359                     <artifactId>yaml-json-validator-maven-plugin</artifactId>
360                     <version>1.0.1</version>
361                 </plugin>
362                 <plugin>
363                     <groupId>pl.project13.maven</groupId>
364                     <artifactId>git-commit-id-plugin</artifactId>
365                     <version>2.2.6</version>
366                 </plugin>
367             </plugins>
368         </pluginManagement>
369
370         <plugins>
371
372             <!-- Staging Plugin -->
373             <plugin>
374                 <groupId>org.sonatype.plugins</groupId>
375                 <artifactId>nexus-staging-maven-plugin</artifactId>
376                 <extensions>true</extensions>
377                 <configuration>
378                     <nexusUrl>${nexus.proxy}</nexusUrl>
379                     <stagingProfileId>${staging.profile.id}</stagingProfileId>
380                     <serverId>ecomp-staging</serverId>
381                 </configuration>
382             </plugin>
383
384             <!-- plugin for parsing the project version -->
385             <plugin>
386                 <groupId>org.codehaus.mojo</groupId>
387                 <artifactId>build-helper-maven-plugin</artifactId>
388                 <executions>
389                     <execution>
390                         <id>parse-version</id>
391                         <phase>pre-clean</phase>
392                         <goals>
393                             <goal>parse-version</goal>
394                         </goals>
395                     </execution>
396                 </executions>
397             </plugin>
398
399             <!-- Java Code Coverage -->
400             <plugin>
401                 <groupId>org.jacoco</groupId>
402                 <artifactId>jacoco-maven-plugin</artifactId>
403                 <executions>
404                     <execution>
405                         <id>default-instrument</id>
406                         <goals>
407                             <goal>instrument</goal>
408                         </goals>
409                     </execution>
410                     <execution>
411                         <id>default-restore-instrumented-classes</id>
412                         <goals>
413                             <goal>restore-instrumented-classes</goal>
414                         </goals>
415                     </execution>
416                     <execution>
417                         <id>default-report</id>
418                         <goals>
419                             <goal>report</goal>
420                         </goals>
421                         <configuration>
422                             <dataFile>${project.build.directory}/jacoco.exec</dataFile>
423                         </configuration>
424                     </execution>
425                 </executions>
426             </plugin>
427
428             <plugin>
429                 <groupId>org.apache.maven.plugins</groupId>
430                 <artifactId>maven-site-plugin</artifactId>
431                 <version>3.7.1</version>
432                 <dependencies>
433                     <dependency>
434                         <groupId>org.apache.maven.wagon</groupId>
435                         <artifactId>wagon-webdav-jackrabbit</artifactId>
436                         <version>3.0.0</version>
437                     </dependency>
438                 </dependencies>
439             </plugin>
440
441             <!-- Set the deployment repositories properties. -->
442             <plugin>
443                 <groupId>org.codehaus.gmaven</groupId>
444                 <artifactId>gmaven-plugin</artifactId>
445                 <executions>
446                     <execution>
447                         <inherited>false</inherited>
448                         <phase>integration-test</phase>
449                         <goals>
450                             <goal>execute</goal>
451                         </goals>
452                         <configuration>
453                             <source>
454                                 pom.properties['deploy.url'] =
455                                 pom.version.contains('-SNAPSHOT') ?
456                                 project.distributionManagement.snapshotRepository.url :
457                                 project.distributionManagement.repository.url;
458                                 pom.properties['repo.id'] = pom.version.contains('-SNAPSHOT') ?
459                                 project.distributionManagement.snapshotRepository.id :
460                                 project.distributionManagement.repository.id;
461                             </source>
462                         </configuration>
463                     </execution>
464                 </executions>
465             </plugin>
466             <plugin>
467                 <groupId>org.apache.maven.plugins</groupId>
468                 <artifactId>maven-compiler-plugin</artifactId>
469                 <configuration>
470                     <source>1.8</source>
471                     <target>1.8</target>
472                 </configuration>
473             </plugin>
474             <plugin>
475                 <groupId>org.apache.maven.plugins</groupId>
476                 <artifactId>maven-surefire-plugin</artifactId>
477                 <configuration>
478                     <printSummary>false</printSummary>
479                     <systemPropertyVariables>
480                         <jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
481                     </systemPropertyVariables>
482                 </configuration>
483             </plugin>
484             <plugin>
485                <groupId>pl.project13.maven</groupId>
486                <artifactId>git-commit-id-plugin</artifactId>
487                <executions>
488                   <execution>
489                      <goals>
490                         <goal>revision</goal>
491                      </goals>
492                   </execution>
493                </executions>
494                <configuration>
495                   <generateGitPropertiesFile>true</generateGitPropertiesFile>
496                   <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/git.properties</generateGitPropertiesFilename>
497                   <failOnNoGitDirectory>true</failOnNoGitDirectory>
498                   <verbose>false</verbose>
499                   <includeOnlyProperties>
500                      <includeOnlyProperty>git.build.version</includeOnlyProperty>
501                      <includeOnlyProperty>git.build.time</includeOnlyProperty>
502                      <includeOnlyProperty>git.commit.id</includeOnlyProperty>
503                      <includeOnlyProperty>git.commit.time</includeOnlyProperty>
504                      <includeOnlyProperty>git.commit.user.name</includeOnlyProperty>
505                      <includeOnlyProperty>git.commit.user.email</includeOnlyProperty>
506                      <includeOnlyProperty>git.commit.message.short</includeOnlyProperty>
507                      <includeOnlyProperty>git.commit.message.full</includeOnlyProperty>
508                   </includeOnlyProperties>
509                   <gitDescribe>
510                      <skip>true</skip>
511                   </gitDescribe>
512                   <useNativeGit>false</useNativeGit>
513                </configuration>
514             </plugin>
515         </plugins>
516     </build>
517
518     <profiles>
519         <profile>
520             <id>all</id>
521             <activation>
522                 <activeByDefault>true</activeByDefault>
523             </activation>
524             <modules>
525                 <module>onboarding</module>
526                 <module>security-utils</module>
527                 <module>common-app-api</module>
528                 <module>common-be</module>
529                 <module>catalog-dao</module>
530                 <module>catalog-model</module>
531                 <module>catalog-be</module>
532                 <module>asdctool</module>
533                 <module>catalog-ui</module>
534                 <module>catalog-fe</module>
535                 <module>test-apis-ci</module>
536                 <module>ui-ci</module>
537                 <module>sdc-os-chef</module>
538                 <module>utils/webseal-simulator</module>
539             </modules>
540
541         </profile>
542
543         <profile>
544             <id>catalog</id>
545             <activation>
546                 <activeByDefault>false</activeByDefault>
547             </activation>
548             <modules>
549                 <module>security-utils</module>
550                 <module>common-app-api</module>
551                 <module>common-be</module>
552                 <module>catalog-dao</module>
553                 <module>catalog-model</module>
554                 <module>catalog-be</module>
555                 <module>asdctool</module>
556                 <module>catalog-ui</module>
557                 <module>catalog-fe</module>
558                 <module>test-apis-ci</module>
559                 <module>ui-ci</module>
560             </modules>
561
562             <properties>
563                 <sdc-tosca-parser.version>1.1.32</sdc-tosca-parser.version>
564             </properties>
565         </profile>
566
567         <profile>
568             <id>onboarding</id>
569             <activation>
570                 <activeByDefault>false</activeByDefault>
571             </activation>
572             <modules>
573                 <module>onboarding</module>
574             </modules>
575         </profile>
576
577     </profiles>
578
579     <repositories>
580         <!-- LF repositories -->
581         <repository>
582             <id>ecomp-releases</id>
583             <name>Release Repository</name>
584             <url>${nexus.proxy}/content/repositories/releases/</url>
585         </repository>
586         <repository>
587             <id>ecomp-snapshots</id>
588             <name>Snapshots Repository</name>
589             <url>${nexus.proxy}/content/repositories/snapshots/</url>
590         </repository>
591         <repository>
592             <id>ecomp-public</id>
593             <name>Public Repository</name>
594             <url>${nexus.proxy}/content/repositories/public/</url>
595         </repository>
596         <!-- LF repositories END-->
597     </repositories>
598
599     <distributionManagement>
600         <repository>
601             <id>ecomp-releases</id>
602             <name>Release Repository</name>
603             <url>${nexus.proxy}/content/repositories/releases/</url>
604         </repository>
605         <snapshotRepository>
606             <id>ecomp-snapshots</id>
607             <name>Snapshot Repository</name>
608             <url>${nexus.proxy}/content/repositories/snapshots/</url>
609         </snapshotRepository>
610         <site>
611             <id>ecomp-site</id>
612             <url>dav:${nexus.proxy}${sitePath}</url>
613         </site>
614     </distributionManagement>
615 </project>