Merge "Sonar Issues for ExternalAppConfig.java"
[portal.git] / ecomp-portal-widget-ms / widget-ms / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4                 <modelVersion>4.0.0</modelVersion>
5
6         <!-- This project must name Spring as parent; cannot name Portal -->
7         <parent>
8                 <groupId>org.springframework.boot</groupId>
9                 <artifactId>spring-boot-starter-parent</artifactId>
10                 <version>1.4.2.RELEASE</version>
11                 <relativePath /> <!-- lookup parent from repository -->
12         </parent>
13
14         <groupId>org.onap.portal</groupId>
15         <artifactId>widget-ms</artifactId>
16         <version>2.2.0</version>
17         <packaging>jar</packaging>
18         <name>widget-microservice</name>
19
20         <properties>
21                 <docker.imagename>widget-ms</docker.imagename>
22                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24                 <java.version>1.8</java.version>
25                 <hibernate.version>4.3.11.Final</hibernate.version>
26                 <skipTests>true</skipTests>
27                 <!-- Replicate this from OParent -->
28                 <jacocoVersion>0.7.6.201602180812</jacocoVersion>
29         </properties>
30
31         <dependencies>
32                 <!-- This pom pulls in artifacts -->
33                 <dependency>
34                         <groupId>org.onap.portal</groupId>
35                         <artifactId>common-widgets</artifactId>
36                         <version>${project.version}</version>
37                         <type>pom</type>
38                 </dependency>
39                 <dependency>
40                         <!-- Setup Spring Data JPA Repository support -->
41                         <groupId>org.springframework.boot</groupId>
42                         <artifactId>spring-boot-starter-data-jpa</artifactId>
43                 </dependency>
44                 <dependency>
45                         <groupId>org.springframework.boot</groupId>
46                         <artifactId>spring-boot-starter-security</artifactId>
47                 </dependency>
48                 <dependency>
49                         <groupId>org.springframework.boot</groupId>
50                         <artifactId>spring-boot-starter-thymeleaf</artifactId>
51                 </dependency>
52                 <dependency>
53                         <groupId>org.springframework.boot</groupId>
54                         <artifactId>spring-boot-devtools</artifactId>
55                         <optional>true</optional>
56                 </dependency>
57                 <dependency>
58                         <groupId>org.springframework.boot</groupId>
59                         <artifactId>spring-boot-configuration-processor</artifactId>
60                         <optional>true</optional>
61                 </dependency>
62                 <dependency>
63                         <groupId>org.hibernate</groupId>
64                         <artifactId>hibernate-core</artifactId>
65                         <!-- <version>${hibernate.version}</version> -->
66                 </dependency>
67                 <dependency>
68                         <groupId>org.springframework.boot</groupId>
69                         <artifactId>spring-boot-starter</artifactId>
70                 </dependency>
71                 <dependency>
72                         <groupId>org.springframework.boot</groupId>
73                         <artifactId>spring-boot-starter-test</artifactId>
74                         <scope>test</scope>
75                 </dependency>
76                 <dependency>
77                         <groupId>org.springframework.boot</groupId>
78                         <artifactId>spring-boot-starter-web</artifactId>
79                 </dependency>
80                 <dependency>
81                         <groupId>commons-codec</groupId>
82                         <artifactId>commons-codec</artifactId>
83                         <!-- <version>1.10</version> -->
84                 </dependency>
85                 <dependency>
86                         <groupId>org.mariadb.jdbc</groupId>
87                         <artifactId>mariadb-java-client</artifactId>
88                         <!-- <version>1.5.8</version> -->
89                 </dependency>
90                 <dependency>
91                         <groupId>com.github.ulisesbocchio</groupId>
92                         <artifactId>jasypt-spring-boot-starter</artifactId>
93                         <version>1.9</version>
94                 </dependency>
95                 <!-- hibernate-core depends on dom4j, which has optional dependencies. 
96                         On jenkins, contrary to doc, mvn 3.0.5 packages the optional dependencies 
97                         in the war. Workaround: exclude them explicitly. -->
98                 <dependency>
99                         <groupId>dom4j</groupId>
100                         <artifactId>dom4j</artifactId>
101                         <!-- <version>1.6.1</version> -->
102                         <exclusions>
103                                 <exclusion>
104                                         <groupId>jaxme</groupId>
105                                         <artifactId>jaxme-api</artifactId>
106                                 </exclusion>
107                                 <exclusion>
108                                         <groupId>jaxen</groupId>
109                                         <artifactId>jaxen</artifactId>
110                                 </exclusion>
111                                 <exclusion>
112                                         <groupId>msv</groupId>
113                                         <artifactId>xsdlib</artifactId>
114                                 </exclusion>
115                                 <exclusion>
116                                         <groupId>msv</groupId>
117                                         <artifactId>relaxngDatatype</artifactId>
118                                 </exclusion>
119                                 <exclusion>
120                                         <groupId>pull-parser</groupId>
121                                         <artifactId>pull-parser</artifactId>
122                                 </exclusion>
123                                 <exclusion>
124                                         <groupId>xpp3</groupId>
125                                         <artifactId>xpp3</artifactId>
126                                 </exclusion>
127                                 <exclusion>
128                                         <groupId>stax</groupId>
129                                         <artifactId>stax-api</artifactId>
130                                 </exclusion>
131                         </exclusions>
132                 </dependency>
133                 <!-- Jacoco offline instrumentation agent -->
134                 <dependency>
135                         <groupId>org.jacoco</groupId>
136                         <artifactId>org.jacoco.agent</artifactId>
137                         <version>${jacocoVersion}</version>
138                         <classifier>runtime</classifier>
139                 </dependency>
140                 <dependency>
141                 <groupId>org.apache.tomcat.embed</groupId>
142                 <artifactId>tomcat-embed-core</artifactId>
143                 <version>8.5.13</version>
144                 </dependency>
145                 <dependency>
146                         <groupId>ch.qos.logback</groupId>
147                         <artifactId>logback-core</artifactId>
148                         <version>1.2.3</version>
149                 </dependency>
150                 <dependency>
151                         <groupId>ch.qos.logback</groupId>
152                         <artifactId>logback-classic</artifactId>
153                         <version>1.2.3</version>
154                 </dependency>
155                 <dependency>
156                         <groupId>com.fasterxml.jackson.core</groupId>
157                         <artifactId>jackson-annotations</artifactId>
158                         <version>2.8.10</version>
159                 </dependency>
160                 <dependency>
161                         <groupId>com.fasterxml.jackson.core</groupId>
162                         <artifactId>jackson-core</artifactId>
163                         <version>2.8.10</version>
164                 </dependency>
165                 <dependency>
166                         <groupId>com.fasterxml.jackson.core</groupId>
167                         <artifactId>jackson-databind</artifactId>
168                         <version>2.8.10</version>
169                 </dependency>
170         </dependencies>
171
172         <build>
173
174                 <finalName>${project.artifactId}</finalName>
175
176                 <!-- To add resources, must name all including usual src/main/resources -->
177                 <resources>
178                         <resource>
179                                 <directory>src/main/resources</directory>
180                                 <filtering>true</filtering>
181                         </resource>
182                         <resource>
183                                 <directory>../common-widgets/target</directory>
184                                 <includes>
185                                         <include>**/*.zip</include>
186                                 </includes>
187                         </resource>
188                 </resources>
189
190                 <pluginManagement>
191                         <plugins>
192                                 <!-- replicated from OParent -->
193                                 <plugin>
194                                         <groupId>org.apache.maven.plugins</groupId>
195                                         <artifactId>maven-site-plugin</artifactId>
196                                         <version>3.6</version>
197                                         <dependencies>
198                                                 <dependency>
199                                                         <groupId>org.apache.maven.wagon</groupId>
200                                                         <artifactId>wagon-webdav-jackrabbit</artifactId>
201                                                         <version>2.10</version>
202                                                 </dependency>
203                                         </dependencies>
204                                 </plugin>
205                         </plugins>
206                 </pluginManagement>
207
208                 <plugins>
209
210                         <plugin>
211                                 <groupId>org.springframework.boot</groupId>
212                                 <artifactId>spring-boot-maven-plugin</artifactId>
213                         </plugin>
214
215                         <!-- No deployment step for this project -->
216                         <plugin>
217                                 <groupId>org.apache.maven.plugins</groupId>
218                                 <artifactId>maven-deploy-plugin</artifactId>
219                                 <!-- version set by spring <version>2.8</version> -->
220                                 <configuration>
221                                         <skip>true</skip>
222                                 </configuration>
223                         </plugin>
224                         <plugin>
225                                 <groupId>org.jacoco</groupId>
226                                 <artifactId>jacoco-maven-plugin</artifactId>
227                                 <version>${jacocoVersion}</version>
228                                 <executions>
229                                         <!-- disable jacoco executions from oparent -->
230                                         <execution>
231                                                 <id>pre-unit-test</id>
232                                                 <phase>none</phase>
233                                         </execution>
234                                         <execution>
235                                                 <id>post-unit-test</id>
236                                                 <phase>none</phase>
237                                         </execution>
238                                         <execution>
239                                                 <id>pre-integration-test</id>
240                                                 <phase>none</phase>
241                                         </execution>
242                                         <execution>
243                                                 <id>post-integration-test</id>
244                                                 <phase>none</phase>
245                                         </execution>
246                                         <!-- Order matters -->
247                                         <execution>
248                                                 <id>portal-prepare-agent</id>
249                                                 <goals>
250                                                         <goal>prepare-agent</goal>
251                                                 </goals>
252                                                 <configuration>
253                                                         <destFile>${sonar.jacoco.reportPath}</destFile>
254                                                 </configuration>
255                                         </execution>
256                                         <!-- offline instrumentation for PowerMock -->
257                                         <execution>
258                                                 <id>portal-offline-instrument</id>
259                                                 <goals>
260                                                         <goal>instrument</goal>
261                                                 </goals>
262                                         </execution>
263                                         <execution>
264                                                 <id>portal-restore-instrumented-classes</id>
265                                                 <phase>test</phase>
266                                                 <goals>
267                                                         <goal>restore-instrumented-classes</goal>
268                                                 </goals>
269                                         </execution>
270                                         <execution>
271                                                 <id>portal-post-unit-test</id>
272                                                 <phase>test</phase>
273                                                 <goals>
274                                                         <goal>report</goal>
275                                                 </goals>
276                                                 <configuration>
277                                                         <dataFile>${sonar.jacoco.reportPath}</dataFile>
278                                                         <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
279                                                 </configuration>
280                                         </execution>
281                                 </executions>
282                         </plugin>
283
284                         <plugin>
285                                 <groupId>org.apache.maven.plugins</groupId>
286                                 <artifactId>maven-surefire-plugin</artifactId>
287                                 <configuration>
288                                         <systemPropertyVariables>
289                                                 <jacoco-agent.destfile>${project.build.directory}/code-coverage/jacoco-ut.exec</jacoco-agent.destfile>
290                                         </systemPropertyVariables>
291                                 </configuration>
292                         </plugin>
293                 </plugins>
294
295         </build>
296
297         <!-- This POM cannot inherit from OParent -->
298         <distributionManagement>
299                 <site>
300                         <id>ecomp-site</id>
301                         <url>dav:https://nexus.onap.org/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</url>
302                 </site>
303         </distributionManagement>
304
305 </project>