2cdf13f3cc315bd253e39b4136143e3e9da20779
[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>2.2.5.RELEASE</version>
11                 <relativePath /> <!-- lookup parent from repository -->
12         </parent>
13
14         <groupId>org.onap.portal</groupId>
15         <artifactId>widget-ms</artifactId>
16         <version>3.4.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>5.4.14.Final</hibernate.version>
26                 <skipTests>false</skipTests>
27                 <!-- Replicate this from OParent -->
28                 <jacocoVersion>0.8.2</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                         <exclusions>
48                                 <exclusion>
49                                         <groupId>org.springframework.security</groupId>
50                                 <artifactId>spring-security-web</artifactId>
51                                 </exclusion>
52                         </exclusions>
53                 </dependency>
54                 <dependency>
55                         <groupId>org.springframework.boot</groupId>
56                         <artifactId>spring-boot-starter-thymeleaf</artifactId>
57                 </dependency>
58                 <!-- <dependency>
59                         <groupId>org.springframework.boot</groupId>
60                         <artifactId>spring-boot-devtools</artifactId>
61                         <optional>true</optional>
62                 </dependency> -->
63                 <dependency>
64                         <groupId>org.springframework.boot</groupId>
65                         <artifactId>spring-boot-configuration-processor</artifactId>
66                         <optional>true</optional>
67                 </dependency>
68                 <dependency>
69                         <groupId>org.hibernate</groupId>
70                         <artifactId>hibernate-core</artifactId>
71                         <version>${hibernate.version}</version>
72                 </dependency>
73                 <dependency>
74                         <groupId>org.springframework.boot</groupId>
75                         <artifactId>spring-boot-starter</artifactId>
76                 </dependency>
77                 <dependency>
78                         <groupId>org.springframework.boot</groupId>
79                         <artifactId>spring-boot-starter-test</artifactId>
80                         <scope>test</scope>
81                 </dependency>
82                 <dependency>
83                         <groupId>org.springframework.boot</groupId>
84                         <artifactId>spring-boot-starter-web</artifactId>
85                 </dependency>
86                 <dependency>
87                         <groupId>commons-codec</groupId>
88                         <artifactId>commons-codec</artifactId>
89                         <!-- <version>1.10</version> -->
90                 </dependency>
91                 <dependency>
92                         <groupId>org.mariadb.jdbc</groupId>
93                         <artifactId>mariadb-java-client</artifactId>
94                         <version>1.5.8</version>
95                 </dependency>
96                 <dependency>
97                         <groupId>com.github.ulisesbocchio</groupId>
98                         <artifactId>jasypt-spring-boot-starter</artifactId>
99                         <version>2.1.0</version>
100                 </dependency>
101                 <dependency>
102                         <groupId>org.jsoup</groupId>
103                         <artifactId>jsoup</artifactId>
104                         <version>1.12.1</version>
105        </dependency>
106                 <!-- hibernate-core depends on dom4j, which has optional dependencies. 
107                         On jenkins, contrary to doc, mvn 3.0.5 packages the optional dependencies 
108                         in the war. Workaround: exclude them explicitly. -->
109                 <dependency>
110                         <groupId>dom4j</groupId>
111                         <artifactId>dom4j</artifactId>
112                         <version>1.6.1</version>
113                         <exclusions>
114                                 <exclusion>
115                                         <groupId>jaxme</groupId>
116                                         <artifactId>jaxme-api</artifactId>
117                                 </exclusion>
118                                 <exclusion>
119                                         <groupId>jaxen</groupId>
120                                         <artifactId>jaxen</artifactId>
121                                 </exclusion>
122                                 <exclusion>
123                                         <groupId>msv</groupId>
124                                         <artifactId>xsdlib</artifactId>
125                                 </exclusion>
126                                 <exclusion>
127                                         <groupId>msv</groupId>
128                                         <artifactId>relaxngDatatype</artifactId>
129                                 </exclusion>
130                                 <exclusion>
131                                         <groupId>pull-parser</groupId>
132                                         <artifactId>pull-parser</artifactId>
133                                 </exclusion>
134                                 <exclusion>
135                                         <groupId>xpp3</groupId>
136                                         <artifactId>xpp3</artifactId>
137                                 </exclusion>
138                                 <exclusion>
139                                         <groupId>stax</groupId>
140                                         <artifactId>stax-api</artifactId>
141                                 </exclusion>
142                         </exclusions>
143                 </dependency>
144                 <!-- Jacoco offline instrumentation agent -->
145                 <dependency>
146                         <groupId>org.jacoco</groupId>
147                         <artifactId>org.jacoco.agent</artifactId>
148                         <version>${jacocoVersion}</version>
149                         <classifier>runtime</classifier>
150                 </dependency>
151                 <dependency>
152                 <groupId>org.apache.tomcat.embed</groupId>
153                 <artifactId>tomcat-embed-core</artifactId>
154                 <version>9.0.33</version>
155                 </dependency>
156                 <dependency>
157                         <groupId>ch.qos.logback</groupId>
158                         <artifactId>logback-core</artifactId>
159                         <version>1.2.3</version>
160                 </dependency>
161                 <dependency>
162                         <groupId>ch.qos.logback</groupId>
163                         <artifactId>logback-classic</artifactId>
164                         <version>1.2.3</version>
165                 </dependency>
166                 <dependency>
167                         <groupId>com.fasterxml.jackson.core</groupId>
168                         <artifactId>jackson-annotations</artifactId>
169                         <version>2.9.8</version>
170                 </dependency>
171                 <dependency>
172                         <groupId>com.fasterxml.jackson.core</groupId>
173                         <artifactId>jackson-core</artifactId>
174                         <version>2.9.8</version>
175                 </dependency>
176                 <dependency>
177                         <groupId>com.fasterxml.jackson.core</groupId>
178                         <artifactId>jackson-databind</artifactId>
179                         <version>2.9.8</version>
180                 </dependency>
181                 <dependency>
182                 <groupId>org.springframework.security</groupId>
183                 <artifactId>spring-security-web</artifactId>
184                 <version>5.2.3.RELEASE</version>
185                 </dependency>
186                 <dependency>
187                         <groupId>org.projectlombok</groupId>
188                         <artifactId>lombok</artifactId>
189                         <version>1.18.4</version>
190                 </dependency>
191         </dependencies>
192
193         <build>
194
195                 <finalName>${project.artifactId}</finalName>
196
197                 <!-- To add resources, must name all including usual src/main/resources -->
198                 <resources>
199                         <resource>
200                                 <directory>src/main/resources</directory>
201                                 <filtering>true</filtering>
202                         </resource>
203                         <resource>
204                                 <directory>../common-widgets/target</directory>
205                                 <includes>
206                                         <include>**/*.zip</include>
207                                 </includes>
208                         </resource>
209                 </resources>
210
211                 <pluginManagement>
212                         <plugins>
213                                 <!-- replicated from OParent -->
214                                 <plugin>
215                                         <groupId>org.apache.maven.plugins</groupId>
216                                         <artifactId>maven-site-plugin</artifactId>
217                                         <version>3.6</version>
218                                         <dependencies>
219                                                 <dependency>
220                                                         <groupId>org.apache.maven.wagon</groupId>
221                                                         <artifactId>wagon-webdav-jackrabbit</artifactId>
222                                                         <version>2.10</version>
223                                                 </dependency>
224                                         </dependencies>
225                                 </plugin>
226                         </plugins>
227                 </pluginManagement>
228
229                 <plugins>
230
231                         <plugin>
232                                 <groupId>org.springframework.boot</groupId>
233                                 <artifactId>spring-boot-maven-plugin</artifactId>
234                         </plugin>
235
236                         <!-- No deployment step for this project -->
237                         <plugin>
238                                 <groupId>org.apache.maven.plugins</groupId>
239                                 <artifactId>maven-deploy-plugin</artifactId>
240                                 <!-- version set by spring <version>2.8</version> -->
241                                 <configuration>
242                                         <skip>true</skip>
243                                 </configuration>
244                         </plugin>
245                         <plugin>
246                                 <groupId>org.jacoco</groupId>
247                                 <artifactId>jacoco-maven-plugin</artifactId>
248                                 <version>${jacocoVersion}</version>
249                                 <executions>
250                                         <!-- disable jacoco executions from oparent -->
251                                         <execution>
252                                                 <id>pre-unit-test</id>
253                                                 <phase>none</phase>
254                                         </execution>
255                                         <execution>
256                                                 <id>post-unit-test</id>
257                                                 <phase>none</phase>
258                                         </execution>
259                                         <execution>
260                                                 <id>pre-integration-test</id>
261                                                 <phase>none</phase>
262                                         </execution>
263                                         <execution>
264                                                 <id>post-integration-test</id>
265                                                 <phase>none</phase>
266                                         </execution>
267                                         <!-- Order matters -->
268                                         <execution>
269                                                 <id>portal-prepare-agent</id>
270                                                 <goals>
271                                                         <goal>prepare-agent</goal>
272                                                 </goals>
273                                                 <configuration>
274                                                         <destFile>${sonar.jacoco.reportPath}</destFile>
275                                                 </configuration>
276                                         </execution>
277                                         <!-- offline instrumentation for PowerMock -->
278                                         <execution>
279                                                 <id>portal-offline-instrument</id>
280                                                 <goals>
281                                                         <goal>instrument</goal>
282                                                 </goals>
283                                         </execution>
284                                         <execution>
285                                                 <id>portal-restore-instrumented-classes</id>
286                                                 <phase>test</phase>
287                                                 <goals>
288                                                         <goal>restore-instrumented-classes</goal>
289                                                 </goals>
290                                         </execution>
291                                         <execution>
292                                                 <id>portal-post-unit-test</id>
293                                                 <phase>test</phase>
294                                                 <goals>
295                                                         <goal>report</goal>
296                                                 </goals>
297                                                 <configuration>
298                                                         <dataFile>${sonar.jacoco.reportPath}</dataFile>
299                                                         <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
300                                                 </configuration>
301                                         </execution>
302                                 </executions>
303                         </plugin>
304
305                         <plugin>
306                                 <groupId>org.apache.maven.plugins</groupId>
307                                 <artifactId>maven-surefire-plugin</artifactId>
308                                 <configuration>
309                                         <systemPropertyVariables>
310                                                 <jacoco-agent.destfile>${project.build.directory}/code-coverage/jacoco-ut.exec</jacoco-agent.destfile>
311                                         </systemPropertyVariables>
312                                 </configuration>
313                         </plugin>
314                 </plugins>
315
316         </build>
317
318         <!-- This POM cannot inherit from OParent -->
319         <distributionManagement>
320                 <site>
321                         <id>ecomp-site</id>
322                         <url>dav:https://nexus.onap.org/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</url>
323                 </site>
324         </distributionManagement>
325
326 </project>