Improved JaCoCo configuration
[sdc.git] / openecomp-be / pom.xml
1 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
2          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4
5     <name>openecomp-sdc</name>
6     <artifactId>openecomp-sdc</artifactId>
7     <packaging>pom</packaging>
8
9     <url>http://maven.apache.org</url>
10
11     <parent>
12         <groupId>org.openecomp.sdc</groupId>
13         <artifactId>sdc-onboarding</artifactId>
14         <version>1.3.0-SNAPSHOT</version>
15         <relativePath>../onboarding/pom.xml</relativePath>
16     </parent>
17
18     <dependencies>
19         <dependency>
20             <groupId>org.togglz</groupId>
21             <artifactId>togglz-core</artifactId>
22             <version>${togglz.version}</version>
23         </dependency>
24         <dependency>
25             <groupId>org.togglz</groupId>
26             <artifactId>togglz-testing</artifactId>
27             <version>${togglz.version}</version>
28             <scope>test</scope>
29         </dependency>
30     </dependencies>
31
32     <build>
33         <plugins>
34
35             <!-- ================================================== -->
36             <!-- Set the JDK compiler version.                      -->
37             <!-- ================================================== -->
38             <plugin>
39                 <groupId>org.apache.maven.plugins</groupId>
40                 <artifactId>maven-compiler-plugin</artifactId>
41                 <version>${mvn.compiler.version}</version>
42                 <inherited>true</inherited>
43                 <executions>
44                     <execution>
45                         <id>default-compile</id>
46                         <configuration>
47                             <skipMain>${skipMainSourceCompile}</skipMain>
48                         </configuration>
49                     </execution>
50                     <execution>
51                         <id>default-testCompile</id>
52                         <configuration>
53                             <skip>${skipTestSourceCompile}</skip>
54                         </configuration>
55                     </execution>
56                 </executions>
57                 <configuration>
58                     <source>${java.source}</source>
59                     <target>${java.target}</target>
60                 </configuration>
61             </plugin>
62             <plugin>
63                 <groupId>org.openecomp.sdc.onboarding</groupId>
64                 <artifactId>artifact-copy-plugin</artifactId>
65                 <version>${project.version}</version>
66                 <executions>
67                     <execution>
68                         <goals>
69                             <goal>init-artifact-helper</goal>
70                             <!--<goal>copy-helper</goal>-->
71                             <goal>calibrate-artifact-helper</goal>
72                         </goals>
73                     </execution>
74                 </executions>
75                 <configuration>
76                     <groupId>org.openecomp.sdc</groupId>
77                     <artifactId>build-data-installer</artifactId>
78                     <version>${project.version}</version>
79                     <artifactHelper>
80                         <project>${project}</project>
81                         <session>${session}</session>
82                         <unicornRoot>org.openecomp.sdc:sdc-onboarding/target/build-data</unicornRoot>
83                     </artifactHelper>
84                 </configuration>
85             </plugin>
86             <plugin>
87                 <groupId>org.openecomp.sdc.onboarding</groupId>
88                 <artifactId>compile-helper-plugin</artifactId>
89                 <version>${project.version}</version>
90                 <dependencies>
91                     <dependency>
92                         <groupId>org.openecomp.sdc.onboarding</groupId>
93                         <artifactId>pmd-helper-plugin</artifactId>
94                         <version>${project.version}</version>
95                     </dependency>
96                 </dependencies>
97                 <executions>
98                     <execution>
99                         <goals>
100                             <goal>init-helper</goal>
101                             <goal>pre-compile-helper</goal>
102                             <goal>post-compile-helper</goal>
103                             <goal>pre-test-compile-helper</goal>
104                             <goal>post-test-run-helper</goal>
105                         </goals>
106                     </execution>
107                 </executions>
108                 <configuration>
109                     <excludePackaging>pom</excludePackaging>
110                     <excludeDependencies>test,runtime</excludeDependencies>
111                     <generatedSourceLocation>${project.build.directory}/generated-sources</generatedSourceLocation>
112                     <buildState>
113                         <project>${project}</project>
114                         <compileStateFilePath>org.openecomp.sdc:sdc-onboarding/target/build-data/compileState.dat
115                         </compileStateFilePath>
116                     </buildState>
117                 </configuration>
118             </plugin>
119             <plugin>
120                 <groupId>org.apache.maven.plugins</groupId>
121                 <artifactId>maven-pmd-plugin</artifactId>
122                 <version>${maven.pmd.plugin.version}</version>
123                 <dependencies>
124                     <dependency>
125                         <groupId>org.openecomp.sdc</groupId>
126                         <artifactId>build-tools</artifactId>
127                         <version>${build.tools.version}</version>
128                     </dependency>
129                     <dependency>
130                         <groupId>net.sourceforge.pmd</groupId>
131                         <artifactId>pmd-core</artifactId>
132                         <version>${pmd.core.version}</version>
133                     </dependency>
134                     <dependency>
135                         <groupId>net.sourceforge.pmd</groupId>
136                         <artifactId>pmd-java</artifactId>
137                         <version>${pmd.java.version}</version>
138                     </dependency>
139                 </dependencies>
140                 <configuration>
141                     <skip>${skipPMD}</skip>
142                     <showPmdLog>false</showPmdLog>
143                     <analysisCache>false</analysisCache>
144                     <analysisCacheLocation>${project.build.directory}/pmd/pmd.cache</analysisCacheLocation>
145                     <failOnViolation>false</failOnViolation>
146                     <printFailingErrors>false</printFailingErrors>
147                     <format>csv</format>
148                     <targetDirectory>${project.build.directory}/pmd</targetDirectory>
149                     <includeTests>true</includeTests>
150                     <linkXRef>false</linkXRef>
151                     <aggregate>false</aggregate>
152                     <rulesets>
153                         <ruleset>/category/java/bestpractices.xml</ruleset>
154                         <ruleset>/category/java/codestyle.xml</ruleset>
155                         <ruleset>/category/java/design.xml</ruleset>
156                         <ruleset>/category/java/errorprone.xml</ruleset>
157                         <ruleset>/category/java/multithreading.xml</ruleset>
158                         <ruleset>/category/java/performance.xml</ruleset>
159                         <ruleset>/category/java/security.xml</ruleset>
160                     </rulesets>
161                 </configuration>
162                 <executions>
163                     <execution>
164                         <goals>
165                             <goal>check</goal>
166                         </goals>
167                         <phase>integration-test</phase>
168                     </execution>
169                 </executions>
170             </plugin>
171             <plugin>
172                 <groupId>org.openecomp.sdc.onboarding</groupId>
173                 <artifactId>pmd-helper-plugin</artifactId>
174                 <version>${project.version}</version>
175                 <executions>
176                     <execution>
177                         <goals>
178                             <goal>init-pmd-helper</goal>
179                             <goal>post-verify-helper</goal>
180                         </goals>
181                     </execution>
182                 </executions>
183                 <configuration>
184                     <excludePackaging>pom</excludePackaging>
185                     <pmdTargetLocation>${project.build.directory}/pmd/pmd.xml</pmdTargetLocation>
186                     <pmdFailureReportLocation>${project.build.directory}/pmd.txt</pmdFailureReportLocation>
187                     <pmdReportFile>${project.build.directory}/pmd/pmd.csv</pmdReportFile>
188                     <persistingModuleCoordinates>org.openecomp.sdc:build-data-installer</persistingModuleCoordinates>
189                     <pmdCurrentStateFilePath>org.openecomp.sdc:sdc-onboarding/target/build-data/pmdState.dat
190                     </pmdCurrentStateFilePath>
191                     <pmdStateFile>${project.build.outputDirectory}/pmd.dat</pmdStateFile>
192                     <compiledFilesList>
193                         ${project.build.directory}/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
194                     </compiledFilesList>
195                     <compiledTestFilesList>
196                         ${project.build.directory}/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
197                     </compiledTestFilesList>
198                 </configuration>
199             </plugin>
200             <plugin>
201                 <groupId>org.apache.maven.plugins</groupId>
202                 <artifactId>maven-jar-plugin</artifactId>
203                 <version>${mvn.jar.version}</version>
204                 <configuration>
205                     <archive>
206                         <addMavenDescriptor>${mvnDsc}</addMavenDescriptor>
207                     </archive>
208                     <excludes>
209                         <exclude>${emptyJAR}</exclude>
210                     </excludes>
211                 </configuration>
212             </plugin>
213             <plugin>
214                 <groupId>org.codehaus.mojo</groupId>
215                 <artifactId>license-maven-plugin</artifactId>
216                 <version>${mvn.license.version}</version>
217                 <configuration>
218                     <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
219                     <processStartTag>============LICENSE_START=======================================================
220                     </processStartTag>
221                     <processEndTag>============LICENSE_END=========================================================
222                     </processEndTag>
223                     <sectionDelimiter>================================================================================
224                     </sectionDelimiter>
225                     <licenseName>apache_v2</licenseName>
226                     <inceptionYear>2017</inceptionYear>
227                     <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
228                     <projectName>SDC</projectName>
229                     <canUpdateCopyright>true</canUpdateCopyright>
230                     <canUpdateDescription>true</canUpdateDescription>
231                     <canUpdateLicense>true</canUpdateLicense>
232                     <emptyLineAfterHeader>true</emptyLineAfterHeader>
233                     <verbose>false</verbose>
234                     <includes>
235                         <include>**/*.java</include>
236                         <include>**/*.js</include>
237                         <include>**/*.ts</include>
238                     </includes>
239                     <roots>
240                         <root>src</root>
241                         <root>app</root>
242                         <root>server-mock</root>
243                         <root>typings</root>
244                     </roots>
245                 </configuration>
246                 <executions>
247                     <execution>
248                         <id>first</id>
249                         <goals>
250                             <goal>update-file-header</goal>
251                         </goals>
252                     </execution>
253                 </executions>
254             </plugin>
255             <plugin>
256                 <groupId>org.jacoco</groupId>
257                 <artifactId>jacoco-maven-plugin</artifactId>
258                 <executions>
259                     <execution>
260                         <id>default-prepare-agent</id>
261                         <goals>
262                             <goal>prepare-agent</goal>
263                         </goals>
264                     </execution>
265                     <execution>
266                         <id>report</id>
267                         <phase>prepare-package</phase>
268                         <goals>
269                             <goal>report</goal>
270                         </goals>
271                     </execution>
272                     <execution>
273                         <id>post-unit-test</id>
274                         <phase>test</phase>
275                         <goals>
276                             <goal>report</goal>
277                         </goals>
278                         <configuration>
279                             <!-- Sets the path to the file which contains the execution data. -->
280                             <dataFile>target/jacoco.exec</dataFile>
281                             <!-- Sets the output directory for the code coverage report. -->
282                             <outputDirectory>target/jacoco-ut</outputDirectory>
283                         </configuration>
284                     </execution>
285                 </executions>
286             </plugin>
287
288         </plugins>
289     </build>
290
291     <modules>
292         <module>/api</module>
293         <module>/lib</module>
294         <module>/tools/swagger-ui</module>
295         <module>/tools/zusammen-tools</module>
296         <module>/backend</module>
297     </modules>
298     <profiles>
299
300         <profile>
301             <id>docker</id>
302             <activation>
303                 <activeByDefault>false</activeByDefault>
304             </activation>
305
306             <modules>
307                 <module>/dist</module>
308             </modules>
309         </profile>
310     </profiles>
311 </project>
312