09cda47807d36d53a04caeae664279421d0ec385
[aai/esr-server.git] / pom.xml
1 <?xml version="1.0"?>
2 <!--
3
4     Copyright 2016 ZTE Corporation.
5
6     Licensed under the Apache License, Version 2.0 (the "License");
7     you may not use this file except in compliance with the License.
8     You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS,
14     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15     See the License for the specific language governing permissions and
16     limitations under the License.
17
18 -->
19 <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">
20     <modelVersion>4.0.0</modelVersion>
21     <parent>
22         <groupId>org.onap.oparent</groupId>
23         <artifactId>oparent</artifactId>
24         <version>2.0.0</version>
25     </parent>
26
27         <groupId>org.onap.aai.esr-server</groupId>
28     <artifactId>aai-esr-server</artifactId>
29     <packaging>pom</packaging>
30
31     <version>1.5.2</version>
32     <name>aai-esr-server</name>
33     <modules>
34         <module>esr-mgr</module>
35                 <module>standalone</module>
36     </modules>
37
38         <properties>
39         <dropwizard.version>1.3.0</dropwizard.version>
40         <swagger.version>1.5.3</swagger.version>
41         <jersey.version>2.16</jersey.version>
42         <jaxrs.consumer.version>5.0</jaxrs.consumer.version>
43         <gson.version>2.2.4</gson.version>
44         <junit.version>4.10</junit.version>
45                 <jetty.version>9.4.22.v20191022</jetty.version>         
46         <org.apache.ant.version>1.10.5</org.apache.ant.version>
47
48         <sonar.jacoco.reportPath />
49         <sonar.jacoco.itReportPath />
50         <sonar.jacoco.reportMissing.force.zero />
51
52         <jacoco.line.coverage.limit>0.75</jacoco.line.coverage.limit>
53         <jacoco.version>0.8.5</jacoco.version>
54         <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
55         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
56         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
57         <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
58
59         <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
60         
61
62     </properties>
63
64     <dependencyManagement>
65         <dependencies>
66             <dependency>
67                 <groupId>io.dropwizard</groupId>
68                 <artifactId>dropwizard-core</artifactId>
69                 <version>${dropwizard.version}</version>
70             </dependency>
71             <dependency>
72                 <groupId>io.dropwizard</groupId>
73                 <artifactId>dropwizard-assets</artifactId>
74                 <version>${dropwizard.version}</version>
75             </dependency>
76             <dependency>
77                 <groupId>io.dropwizard</groupId>
78                 <artifactId>dropwizard-hibernate</artifactId>
79                 <version>${dropwizard.version}</version>
80             </dependency>
81             <dependency>
82                 <groupId>io.swagger</groupId>
83                 <artifactId>swagger-jersey2-jaxrs</artifactId>
84                 <version>${swagger.version}</version>
85             </dependency>
86                         <dependency>
87                                 <groupId>org.hibernate</groupId>
88                                 <artifactId>hibernate-validator</artifactId>
89                                 <version>5.4.2.Final</version>
90                         </dependency>
91
92                         <!-- Jetty -->
93                         <dependency>
94                                 <groupId>org.eclipse.jetty</groupId>
95                                 <artifactId>jetty-server</artifactId>
96                                 <version>${jetty.version}</version>
97                         </dependency>
98                         <dependency>
99                                 <groupId>org.eclipse.jetty</groupId>
100                                 <artifactId>jetty-util</artifactId>
101                                 <version>${jetty.version}</version>
102                         </dependency>
103                         <dependency>
104                                 <groupId>org.eclipse.jetty</groupId>
105                                 <artifactId>jetty-webapp</artifactId>
106                                 <version>${jetty.version}</version>
107                         </dependency>
108                         <dependency>
109                                 <groupId>org.eclipse.jetty</groupId>
110                                 <artifactId>jetty-continuation</artifactId>
111                                 <version>${jetty.version}</version>
112                         </dependency>
113                         <dependency>
114                                 <groupId>org.eclipse.jetty</groupId>
115                                 <artifactId>jetty-servlet</artifactId>
116                                 <version>${jetty.version}</version>
117                         </dependency>
118                         <dependency>
119                                 <groupId>org.eclipse.jetty</groupId>
120                                 <artifactId>jetty-servlet</artifactId>
121                                 <classifier>tests</classifier>
122                                 <version>${jetty.version}</version>
123                         </dependency>
124                         <dependency>
125                                 <groupId>org.eclipse.jetty</groupId>
126                                 <artifactId>jetty-servlets</artifactId>
127                                 <version>${jetty.version}</version>
128                         </dependency>
129                         <dependency>
130                                 <groupId>org.eclipse.jetty</groupId>
131                                 <artifactId>jetty-http</artifactId>
132                                 <version>${jetty.version}</version>
133                         </dependency>
134                         <dependency>
135                                 <groupId>org.eclipse.jetty</groupId>
136                                 <artifactId>jetty-http</artifactId>
137                                 <classifier>tests</classifier>
138                                 <version>${jetty.version}</version>
139                         </dependency>
140                         <dependency>
141                                 <groupId>org.eclipse.jetty</groupId>
142                                 <artifactId>jetty-alpn-openjdk8-server</artifactId>
143                                 <version>${jetty.version}</version>
144                         </dependency>
145                         <dependency>
146                                 <groupId>org.eclipse.jetty.http2</groupId>
147                                 <artifactId>http2-server</artifactId>
148                                 <version>${jetty.version}</version>
149                         </dependency>
150                         <dependency>
151                                 <groupId>org.eclipse.jetty.http2</groupId>
152                                 <artifactId>http2-client</artifactId>
153                                 <version>${jetty.version}</version>
154                         </dependency>
155                         <dependency>
156                                 <groupId>org.eclipse.jetty</groupId>
157                                 <artifactId>jetty-client</artifactId>
158                                 <version>${jetty.version}</version>
159                         </dependency>
160                         <dependency>
161                                 <groupId>org.eclipse.jetty.http2</groupId>
162                                 <artifactId>http2-http-client-transport</artifactId>
163                                 <version>${jetty.version}</version>
164                         </dependency>
165                         <dependency>
166                                 <groupId>org.eclipse.jetty</groupId>
167                                 <artifactId>jetty-alpn-openjdk8-client</artifactId>
168                                 <version>${jetty.version}</version>
169                         </dependency>
170                         <dependency>
171                                 <groupId>org.eclipse.jetty</groupId>
172                                 <artifactId>jetty-alpn-conscrypt-server</artifactId>
173                                 <version>${jetty.version}</version>
174                         </dependency>
175                         <dependency>
176                                 <groupId>org.eclipse.jetty.toolchain.setuid</groupId>
177                                 <artifactId>jetty-setuid-java</artifactId>
178                                 <version>1.0.3</version>
179                                 <exclusions>
180                                         <exclusion>
181                                                 <groupId>org.eclipse.jetty</groupId>
182                                                 <artifactId>jetty-util</artifactId>
183                                         </exclusion>
184                                         <exclusion>
185                                                 <groupId>org.eclipse.jetty</groupId>
186                                                 <artifactId>jetty-server</artifactId>
187                                         </exclusion>
188                                 </exclusions>
189                         </dependency>
190
191             <!-- jersey -->
192             <dependency>
193                 <groupId>org.glassfish.jersey.core</groupId>
194                 <artifactId>jersey-server</artifactId>
195                 <version>${jersey.version}</version>
196             </dependency>
197             <dependency>
198                 <groupId>org.glassfish.jersey.media</groupId>
199                 <artifactId>jersey-media-multipart</artifactId>
200                 <version>${jersey.version}</version>
201             </dependency>
202             <dependency>
203                 <groupId>org.glassfish.jersey.containers</groupId>
204                 <artifactId>jersey-container-servlet-core</artifactId>
205                 <version>${jersey.version}</version>
206             </dependency>
207             <!-- consumer -->
208             <dependency>
209                 <groupId>com.eclipsesource.jaxrs</groupId>
210                 <artifactId>consumer</artifactId>
211                 <version>${jaxrs.consumer.version}</version>
212             </dependency>
213             <!-- gson -->
214             <dependency>
215                 <groupId>com.google.code.gson</groupId>
216                 <artifactId>gson</artifactId>
217                 <version>${gson.version}</version>
218             </dependency> 
219             <!-- UT -->
220             <dependency>  
221                 <groupId>junit</groupId>  
222                 <artifactId>junit</artifactId>  
223                 <version>${junit.version}</version>
224             </dependency> 
225             <dependency>
226                 <groupId>org.apache.ant</groupId>
227                 <artifactId>ant</artifactId>
228                 <version>${org.apache.ant.version}</version>
229             </dependency>
230             <!-- UT end -->
231         </dependencies>
232     </dependencyManagement>
233     <build>
234         <pluginManagement>
235             <plugins>
236                 <plugin>
237                     <groupId>org.eclipse.m2e</groupId>
238                     <artifactId>lifecycle-mapping</artifactId>
239                     <version>1.0.0</version>
240                 </plugin>
241                 <plugin>
242                     <groupId>org.apache.maven.plugins</groupId>
243                     <artifactId>maven-compiler-plugin</artifactId>
244                     <version>3.3</version>
245                     <configuration>
246                         <verbose>true</verbose>
247                         <fork>true</fork>
248                         <compilerVersion>1.7</compilerVersion>
249                         <source>1.7</source>
250                         <target>1.7</target>
251                         <encoding>UTF-8</encoding>
252                         <debug>true</debug>
253                     </configuration>
254                 </plugin>
255                 <plugin>
256                     <groupId>org.apache.maven.plugins</groupId>
257                     <artifactId>maven-jar-plugin</artifactId>
258                     <version>2.6</version>
259                     <configuration>
260                         <archive>
261                             <addMavenDescriptor>false</addMavenDescriptor>
262                         </archive>
263                         <forceCreation>true</forceCreation>
264                     </configuration>
265                 </plugin>
266                 <plugin>
267                     <groupId>org.apache.maven.plugins</groupId>
268                     <artifactId>maven-shade-plugin</artifactId>
269                     <version>2.4</version>
270                 </plugin>
271                 <plugin>
272                     <groupId>org.apache.maven.plugins</groupId>
273                     <artifactId>maven-dependency-plugin</artifactId>
274                     <version>2.10</version>          
275                 </plugin>
276                 <plugin>
277                     <groupId>org.apache.maven.plugins</groupId>
278                     <artifactId>maven-resources-plugin</artifactId>
279                     <version>2.7</version>
280                     <configuration>
281                         <encoding>UTF-8</encoding>
282                         <nonFilteredFileExtensions>
283                             <nonFilteredFileExtension>pdf</nonFilteredFileExtension>
284                             <nonFilteredFileExtension>swf</nonFilteredFileExtension>
285                             <nonFilteredFileExtension>exe</nonFilteredFileExtension>
286                             <nonFilteredFileExtension>png</nonFilteredFileExtension>
287                             <nonFilteredFileExtension>gif</nonFilteredFileExtension>
288                             <nonFilteredFileExtension>jpg</nonFilteredFileExtension>
289                             <nonFilteredFileExtension>jpeg</nonFilteredFileExtension>
290                             <nonFilteredFileExtension>bmp</nonFilteredFileExtension>
291                             <nonFilteredFileExtension>eot</nonFilteredFileExtension>
292                             <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
293                             <nonFilteredFileExtension>svg</nonFilteredFileExtension>
294                             <nonFilteredFileExtension>woff</nonFilteredFileExtension>
295                             <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
296                             <nonFilteredFileExtension>mso</nonFilteredFileExtension>
297                             <nonFilteredFileExtension>wmz</nonFilteredFileExtension>
298                             <nonFilteredFileExtension>emz</nonFilteredFileExtension>
299                             <nonFilteredFileExtension>otf</nonFilteredFileExtension>
300                         </nonFilteredFileExtensions>
301                     </configuration>
302                 </plugin>
303                 <plugin>
304                     <groupId>org.codehaus.mojo</groupId>
305                     <artifactId>build-helper-maven-plugin</artifactId>
306                     <version>1.10</version>
307                 </plugin>
308                 <plugin>
309                     <groupId>com.mycila</groupId>
310                     <artifactId>license-maven-plugin</artifactId>
311                     <version>3.0.rc1</version>
312                 </plugin>
313                 <plugin>
314                     <artifactId>maven-antrun-plugin</artifactId>
315                     <version>1.8</version>
316                 </plugin>
317             </plugins>
318         </pluginManagement>
319
320         <plugins>
321           <!-- once we connect aai-parent or oparent 3.0+ we can take out this
322                whole section -->
323
324           <plugin>
325             <groupId>org.jacoco</groupId>
326             <artifactId>jacoco-maven-plugin</artifactId>
327             <version>${jacoco.version}</version>
328             <configuration>
329               <!-- Note: This exclusion list should match <sonar.exclusions> property
330                    above -->
331               <excludes>
332                 <exclude>**/gen/**</exclude>
333                 <exclude>**/generated-sources/**</exclude>
334                 <exclude>**/yang-gen/**</exclude>
335                 <exclude>**/pax/**</exclude>
336                 <exclude>org/onap/aai/babel/xml/generator/xsd/*</exclude>
337               </excludes>
338             </configuration>
339             <executions>
340               <!-- Prepares the property pointing to the JaCoCo runtime agent which
341                    is passed as VM argument when Maven the Surefire plugin is executed. -->
342               <execution>
343                 <id>pre-unit-test</id>
344                 <goals>
345                   <goal>prepare-agent</goal>
346                 </goals>
347                 <configuration>
348                   <!-- Sets the path to the file which contains the execution data
349                        . -->
350                   <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
351                   <!-- Sets the name of the property containing the settings for JaCoCo
352                        runtime agent. -->
353                   <propertyName>surefireArgLine</propertyName>
354                 </configuration>
355               </execution>
356               <!-- Ensures that the code coverage report for unit tests is created
357                    after unit tests have been run. -->
358               <execution>
359                 <id>post-unit-test</id>
360                 <phase>test</phase>
361                 <goals>
362                   <goal>report</goal>
363                 </goals>
364                 <configuration>
365                   <!-- Sets the path to the file which contains the execution data
366                        . -->
367                   <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
368                   <!-- Sets the output directory for the code coverage report. -->
369                   <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
370                 </configuration>
371               </execution>
372               <execution>
373                 <id>pre-integration-test</id>
374                 <phase>pre-integration-test</phase>
375                 <goals>
376                   <goal>prepare-agent</goal>
377                 </goals>
378                 <configuration>
379                   <!-- Sets the path to the file which contains the execution data
380                        . -->
381                   <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
382                   <!-- Sets the name of the property containing the settings for JaCoCo
383                        runtime agent. -->
384                   <propertyName>failsafeArgLine</propertyName>
385                 </configuration>
386               </execution>
387               <!-- Ensures that the code coverage report for integration tests after
388                    integration tests have been run. -->
389               <execution>
390                 <id>post-integration-test</id>
391                 <phase>post-integration-test</phase>
392                 <goals>
393                   <goal>report</goal>
394                 </goals>
395                 <configuration>
396                   <!-- Sets the path to the file which contains the execution data
397                        . -->
398                   <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
399                   <!-- Sets the output directory for the code coverage report. -->
400                   <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
401                 </configuration>
402               </execution>
403               <execution>
404                 <id>default-check</id>
405                 <goals>
406                   <goal>check</goal>
407                 </goals>
408                 <configuration>
409                   <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
410                   <rules>
411                     <rule implementation="org.jacoco.maven.RuleConfiguration">
412                       <element>BUNDLE</element>
413                       <limits>
414                         <limit implementation="org.jacoco.report.check.Limit">
415                           <counter>LINE</counter>
416                           <value>COVEREDRATIO</value>
417                           <minimum>${jacoco.line.coverage.limit}</minimum>
418                         </limit>
419                       </limits>
420                     </rule>
421                   </rules>
422                 </configuration>
423               </execution>
424             </executions>
425           </plugin>
426           <plugin>
427             <groupId>org.apache.maven.plugins</groupId>
428             <artifactId>maven-surefire-plugin</artifactId>
429             <version>3.0.0-M4</version>
430             <configuration>
431               <!-- Sets the VM argument line used when unit tests are run. -->
432               <argLine>${surefireArgLine}</argLine>
433               <!-- Excludes integration tests when unit tests are run. -->
434               <excludes>
435                 <exclude>**/IT*.java</exclude>
436               </excludes>
437             </configuration>
438           </plugin>
439           <plugin>
440             <groupId>org.apache.maven.plugins</groupId>
441             <artifactId>maven-failsafe-plugin</artifactId>
442             <version>3.0.0-M4</version>
443             <executions>
444               <!-- Ensures that both integration-test and verify goals of the Failsafe
445                    Maven plugin are executed. -->
446               <execution>
447                 <id>integration-tests</id>
448                 <goals>
449                   <goal>integration-test</goal>
450                   <goal>verify</goal>
451                 </goals>
452                 <configuration>
453                   <!-- Sets the VM argument line used when integration tests are run. -->
454                   <argLine>${failsafeArgLine}</argLine>
455                 </configuration>
456               </execution>
457             </executions>
458           </plugin>
459           <plugin>
460             <groupId>org.sonarsource.scanner.maven</groupId>
461             <artifactId>sonar-maven-plugin</artifactId>
462             <version>${sonar.scanner.version}</version>
463           </plugin>
464           <!-- end removable sonar config, note the additional exclusion for babel above
465           -->
466         </plugins>
467
468     </build>   
469 </project>