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