Merge "HealthCheckController up"
[portal.git] / 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         <parent>
7                 <groupId>org.onap.oparent</groupId>
8                 <artifactId>oparent</artifactId>
9                 <version>2.0.0</version>
10                 <relativePath />
11         </parent>
12
13         <groupId>org.onap.portal</groupId>
14         <artifactId>onap-portal-parent</artifactId>
15         <version>3.5.0</version>
16
17         <packaging>pom</packaging>
18         <name>portal</name>
19
20         <modules>
21                 <!-- This parent POM names only ONAP projects -->
22                 <module>ecomp-portal-BE-common</module>
23                 <module>ecomp-portal-BE-os</module>
24                 <module>portal-FE-os</module>
25                 <module>ecomp-portal-widget-ms</module>
26         </modules>
27
28         <properties>
29                 <!-- Jenkins should invoke mvn with argument -Dbuild.number=${BUILD_NUMBER} -->
30                 <build.number>0</build.number>
31                 <epsdk.version>3.4.0-SNAPSHOT</epsdk.version>
32                 <springframework.version>4.3.24.RELEASE</springframework.version>
33                 <springframework.security.version>4.2.13.RELEASE</springframework.security.version>
34                 <hibernate.version>4.3.11.Final</hibernate.version>
35                 <fasterxml.version>2.8.11.4</fasterxml.version>
36                 <!-- NOT provided by OParent, unfortunately -->
37                 <jacocoVersion>0.8.1</jacocoVersion>
38                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39                 <encoding>UTF-8</encoding>
40                 <!-- <sonar.exclusions>**/scripts/**/*,**.js</sonar.exclusions>  -->
41                 <sonar.test.exclusions>**/test/**/*,**/tests/**/*</sonar.test.exclusions>
42                 <enforcer.skip>false</enforcer.skip>
43                 <sonar.scm.exclusions.disabled>true</sonar.scm.exclusions.disabled>
44                 <enforcerToDisableSnapshot>false</enforcerToDisableSnapshot>
45         </properties>
46
47         <!-- Specify the repositories here to avoid coordination of ~/.m2/settings.xml 
48                 files among developers. Use values (not properties) so oparent can be resolved. -->
49         <repositories>
50                 <repository>
51                         <id>onap-releases</id>
52                         <name>ONAP - Release Repository</name>
53                         <url>https://nexus.onap.org/content/repositories/releases</url>
54                 </repository>
55                 <repository>
56                         <id>onap-staging</id>
57                         <name>ONAP - Staging Repository</name>
58                         <url>https://nexus.onap.org/content/repositories/staging</url>
59                 </repository>
60                 <repository>
61                         <id>onap-snapshots</id>
62                         <name>ONAP - Snapshot Repository</name>
63                         <url>https://nexus.onap.org/content/repositories/snapshots</url>
64                 </repository>
65                 <repository>
66                         <id>onap-public</id>
67                         <url>https://nexus.onap.org/content/groups/public</url>
68                 </repository>
69         </repositories>
70
71         <!-- Specify the repositories here to avoid coordination of ~/.m2/settings.xml 
72                 files among all developers. -->
73         <pluginRepositories>
74                 <pluginRepository>
75                         <id>onap-plugin-release</id>
76                         <url>https://nexus.onap.org/content/repositories/releases/</url>
77                 </pluginRepository>
78                 <pluginRepository>
79                         <id>onap-plugin-staging</id>
80                         <url>https://nexus.onap.org/content/repositories/staging/</url>
81                 </pluginRepository>
82                 <pluginRepository>
83                         <id>onap-plugin-snapshots</id>
84                         <url>https://nexus.onap.org/content/repositories/snapshots/</url>
85                 </pluginRepository>
86         </pluginRepositories>
87
88         <profiles>
89                 <!-- disable doclint, a new feature in Java 8, when generating javadoc -->
90                 <profile>
91                         <id>doclint-java8-disable</id>
92                         <activation>
93                                 <jdk>[1.8,)</jdk>
94                         </activation>
95                         <build>
96                                 <plugins>
97                                         <plugin>
98                                                 <groupId>org.apache.maven.plugins</groupId>
99                                                 <artifactId>maven-javadoc-plugin</artifactId>
100                                                 <version>3.0.0-M1</version>
101                                                 <configuration>
102                                                         <additionalparam>-Xdoclint:none</additionalparam>
103                                                 </configuration>
104                                         </plugin>
105                                 </plugins>
106                         </build>
107                 </profile>
108         </profiles>
109
110         <build>
111                 <pluginManagement>
112                         <plugins>
113                                 <!-- Silence Eclipse m2e warnings -->
114                                 <plugin>
115                                         <groupId>org.eclipse.m2e</groupId>
116                                         <artifactId>lifecycle-mapping</artifactId>
117                                         <version>1.0.0</version>
118                                         <configuration>
119                                                 <lifecycleMappingMetadata>
120                                                         <pluginExecutions>
121                                                                 <pluginExecution>
122                                                                         <pluginExecutionFilter>
123                                                                                 <groupId>org.apache.maven.plugins</groupId>
124                                                                                 <artifactId>maven-checkstyle-plugin</artifactId>
125                                                                                 <versionRange>2.17,)</versionRange>
126                                                                                 <goals>
127                                                                                         <goal>check</goal>
128                                                                                 </goals>
129                                                                         </pluginExecutionFilter>
130                                                                         <action>
131                                                                                 <ignore />
132                                                                         </action>
133                                                                 </pluginExecution>
134                                                         </pluginExecutions>
135                                                 </lifecycleMappingMetadata>
136                                         </configuration>
137                                 </plugin>
138                                 <plugin>
139                                         <artifactId>maven-compiler-plugin</artifactId>
140                                         <version>3.1</version>
141                                         <configuration>
142                                                 <source>1.8</source>
143                                                 <target>1.8</target>
144                                         </configuration>
145                                 </plugin>
146                                 <!-- maven-site-plugin config is provided by OParent -->
147                                 <plugin>
148                                         <groupId>org.apache.maven.plugins</groupId>
149                                         <artifactId>maven-site-plugin</artifactId>
150                                         <version>3.6</version>
151                                         <dependencies>
152                                                 <dependency>
153                                                         <groupId>org.apache.maven.wagon</groupId>
154                                                         <artifactId>wagon-webdav-jackrabbit</artifactId>
155                                                         <version>2.10</version>
156                                                 </dependency>
157                                         </dependencies>
158                                 </plugin>
159                         </plugins>
160                 </pluginManagement>
161                 <plugins>
162                         <!-- Jacoco -->
163                         <plugin>
164                                 <groupId>org.jacoco</groupId>
165                                 <artifactId>jacoco-maven-plugin</artifactId>
166                                 <!-- Override OParent version -->
167                                 <version>${jacocoVersion}</version>
168                                 <executions>
169                                         <!-- disable jacoco executions from oparent -->
170                                         <execution>
171                                                 <id>pre-unit-test</id>
172                                                 <phase>none</phase>
173                                         </execution>
174                                         <execution>
175                                                 <id>post-unit-test</id>
176                                                 <phase>none</phase>
177                                         </execution>
178                                         <execution>
179                                                 <id>pre-integration-test</id>
180                                                 <phase>none</phase>
181                                         </execution>
182                                         <execution>
183                                                 <id>post-integration-test</id>
184                                                 <phase>none</phase>
185                                         </execution>
186                                         <!-- Order matters -->
187                                         <execution>
188                                                 <id>portal-prepare-agent</id>
189                                                 <goals>
190                                                         <goal>prepare-agent</goal>
191                                                 </goals>
192                                                 <configuration>
193                                                         <destFile>${sonar.jacoco.reportPath}</destFile>
194                                                 </configuration>
195                                         </execution>
196                                         <!-- offline instrumentation for PowerMock -->
197                                         <execution>
198                                                 <id>portal-offline-instrument</id>
199                                                 <goals>
200                                                         <goal>instrument</goal>
201                                                 </goals>
202                                         </execution>
203                                         <execution>
204                                                 <id>portal-restore-instrumented-classes</id>
205                                                 <phase>test</phase>
206                                                 <goals>
207                                                         <goal>restore-instrumented-classes</goal>
208                                                 </goals>
209                                         </execution>
210                                         <execution>
211                                                 <id>portal-post-unit-test</id>
212                                                 <phase>test</phase>
213                                                 <goals>
214                                                         <goal>report</goal>
215                                                 </goals>
216                                                 <configuration>
217                                                         <dataFile>${sonar.jacoco.reportPath}</dataFile>
218                                                         <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
219                                                 </configuration>
220                                         </execution>
221                                 </executions>
222                         </plugin>
223
224                         <plugin>
225                                 <groupId>org.apache.maven.plugins</groupId>
226                                 <artifactId>maven-surefire-plugin</artifactId>
227                                 <configuration>
228                                         <systemPropertyVariables>
229                                                 <jacoco-agent.destfile>${project.build.directory}/code-coverage/jacoco-ut.exec</jacoco-agent.destfile>
230                                         </systemPropertyVariables>
231                                 </configuration>
232                         </plugin>
233                         <!-- No deployment step for this project -->
234                         <plugin>
235                                 <groupId>org.apache.maven.plugins</groupId>
236                                 <artifactId>maven-deploy-plugin</artifactId>
237                                 <!-- version managed by oparent <version>2.8</version> -->
238                                 <configuration>
239                                         <skip>true</skip>
240                                 </configuration>
241                         </plugin>
242                         <plugin>
243                                 <groupId>org.codehaus.mojo</groupId>
244                                 <artifactId>sonar-maven-plugin</artifactId>
245                                 <version>3.0.2</version>
246                         </plugin>
247                         
248                         <plugin>
249                         <artifactId>maven-checkstyle-plugin</artifactId>
250                         <version>2.17</version>
251                         <dependencies>
252                           <dependency>
253                                 <groupId>org.onap.oparent</groupId>
254                                 <artifactId>checkstyle</artifactId>
255                                 <version>2.0.0</version>
256                           </dependency>
257                         </dependencies>
258                         <executions>
259                           <execution>
260                                 <id>onap-license</id>
261                                 <goals>
262                                   <goal>check</goal>
263                                 </goals>
264                                 <phase>process-sources</phase>
265                                 <configuration>
266                                   <configLocation>onap-checkstyle/check-license.xml</configLocation>
267                                   <includeResources>false</includeResources>
268                                   <includeTestSourceDirectory>true</includeTestSourceDirectory>
269                                   <includeTestResources>false</includeTestResources>
270                                   <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
271                                   <excludes>
272                                   </excludes>
273                                   <consoleOutput>true</consoleOutput>
274                                   <failsOnViolation>false</failsOnViolation>
275                                 </configuration>
276                           </execution>
277                           <execution>
278                                 <id>onap-java-style</id>
279                                 <goals>
280                                   <goal>check</goal>
281                                 </goals>
282                                 <phase>none</phase>
283                                 <configuration>
284                                   <!-- Use Google Java Style Guide:
285                                            https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
286                                            with minor changes -->
287                                   <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
288                                   <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
289                                   <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
290                                   <includeResources>true</includeResources>
291                                   <includeTestSourceDirectory>true</includeTestSourceDirectory>
292                                   <includeTestResources>true</includeTestResources>
293                                   <excludes>
294                                   </excludes>
295                                   <consoleOutput>true</consoleOutput>
296                                   <failsOnViolation>false</failsOnViolation>
297                                 </configuration>
298                           </execution>
299                         </executions>
300                   </plugin>
301                   <plugin>
302                      <groupId>org.apache.maven.plugins</groupId>
303                      <artifactId>maven-enforcer-plugin</artifactId>
304                      <version>3.0.0-M2</version>
305                      <executions>
306                       <execution>
307                       <id>enforce-no-snapshots</id>
308                       <goals>
309                       <goal>enforce</goal>
310                       </goals>
311                     <configuration>
312                     <rules>
313                     <requireReleaseVersion>
314                      <message>No Snapshots Allowed!</message>
315                     </requireReleaseVersion>
316                     </rules>
317                     <fail>${enforcerToDisableSnapshot}</fail>
318                     </configuration>
319                   </execution>
320                  </executions>
321                  </plugin>
322                 </plugins>
323         </build>
324
325         <distributionManagement>
326                 <!-- oparent.version defines snapshot and release repositories -->
327                 <site>
328                         <id>ecomp-site</id>
329                         <url>dav:https://nexus.onap.org/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</url>
330                 </site>
331         </distributionManagement>
332 </project>