Upversion to 1.6.3
[aai/model-loader.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     ============LICENSE_START=======================================================
4     org.onap.aai
5     ================================================================================
6     Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7     Copyright © 2017-2018 European Software Marketing Ltd.
8     ================================================================================
9     Licensed under the Apache License, Version 2.0 (the "License");
10     you may not use this file except in compliance with the License.
11     You may obtain a copy of the License at
12
13           http://www.apache.org/licenses/LICENSE-2.0
14
15     Unless required by applicable law or agreed to in writing, software
16     distributed under the License is distributed on an "AS IS" BASIS,
17     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18     See the License for the specific language governing permissions and
19     limitations under the License.
20     ============LICENSE_END=========================================================
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24         <modelVersion>4.0.0</modelVersion>
25
26         <parent>
27                 <groupId>org.onap.oparent</groupId>
28                 <artifactId>oparent</artifactId>
29                 <version>2.1.0</version>
30                 <relativePath />
31         </parent>
32
33         <groupId>org.onap.aai.model-loader</groupId>
34         <artifactId>model-loader</artifactId>
35         <name>aai-model-loader</name>
36         <version>1.6.3-SNAPSHOT</version>
37
38         <dependencyManagement>
39                 <dependencies>
40                         <dependency>
41                                 <groupId>org.springframework.boot</groupId>
42                                 <artifactId>spring-boot-dependencies</artifactId>
43                                 <version>${spring-boot.version}</version>
44                                 <type>pom</type>
45                                 <scope>import</scope>
46                         </dependency>
47                 </dependencies>
48         </dependencyManagement>
49
50         <properties>
51                 <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
52                 <nexusproxy>https://nexus.onap.org</nexusproxy>
53                 <docker.location>${basedir}/target</docker.location>
54                 <spring-boot.version>2.1.12.RELEASE</spring-boot.version>
55                 <apache.commons-text.version>1.8</apache.commons-text.version>
56                 <commons-compress.version>1.19</commons-compress.version>
57                 <hamcrest-all.version>1.3</hamcrest-all.version>
58                 <babel.version>1.6.2</babel.version>
59                 <aai.rest.client.version>1.2.1</aai.rest.client.version>
60                 <sdc-distribution-client.version>1.3.0</sdc-distribution-client.version>
61                 <logback.version>1.2.3</logback.version>
62                 <!-- docker related properties -->
63                 <docker.fabric.version>0.28.0</docker.fabric.version>
64                 <aai.docker.version>1.0.0</aai.docker.version>
65                 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/</aai.build.directory>
66                 <aai.docker.namespace>onap</aai.docker.namespace>
67                 <aai.base.image>alpine</aai.base.image>
68                 <aai.base.image.version>1.6.0</aai.base.image.version>
69                 <!-- This will be used for the docker images as the default format of maven build has issues -->
70                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
71
72                 <sonar.jacoco.reportPath />
73                 <sonar.jacoco.itReportPath />
74                 <sonar.jacoco.reportMissing.force.zero />
75                 
76                 <jacoco.line.coverage.limit>0.75</jacoco.line.coverage.limit>
77                 <jacoco.version>0.8.5</jacoco.version>
78                 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
79                 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
80                 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
81                 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
82
83                 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
84
85         </properties>
86
87         <distributionManagement>
88                 <repository>
89                         <id>ecomp-releases</id>
90                         <name>ECOMP Release Repository</name>
91                         <url>${nexusproxy}/content/repositories/releases/</url>
92                 </repository>
93                 <snapshotRepository>
94                         <id>ecomp-snapshots</id>
95                         <name>ECOMP Snapshot Repository</name>
96                         <url>${nexusproxy}/content/repositories/snapshots/</url>
97                 </snapshotRepository>
98         </distributionManagement>
99
100         <profiles>
101                 <!-- Docker profile to be used for building docker image and pushing to nexus -->
102                 <profile>
103                         <id>docker</id>
104                         <build>
105                                 <plugins>
106                                         <plugin>
107                                                 <groupId>org.codehaus.mojo</groupId>
108                                                 <artifactId>build-helper-maven-plugin</artifactId>
109                                                 <version>3.0.0</version>
110                                                 <executions>
111                                                         <execution>
112                                                                 <phase>pre-clean</phase>
113                                                                 <id>parse-version</id>
114                                                                 <goals>
115                                                                         <goal>parse-version</goal>
116                                                                 </goals>
117                                                         </execution>
118                                                 </executions>
119                                         </plugin>
120                                         <plugin>
121                                                 <groupId>org.codehaus.groovy.maven</groupId>
122                                                 <artifactId>gmaven-plugin</artifactId>
123                                                 <version>1.0</version>
124                                                 <executions>
125                                                         <execution>
126                                                                 <phase>pre-clean</phase>
127                                                                 <goals>
128                                                                         <goal>execute</goal>
129                                                                 </goals>
130                                                                 <configuration>
131                                                                         <source>
132                                                                                 def userAaiBaseImage = session.userProperties['aai.base.image'];
133                                                                                 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
134                                                                                 if (userAaiCommonVersion != null) {
135                                                                                         project.properties['aai.base.image.version'] = userAaiCommonVersion;
136                                                                                 }
137                                                                                 if (userAaiBaseImage != null) {
138                                                                                         project.properties['aai.base.image'] = userAaiBaseImage;
139                                                                                 }
140                                                                                 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
141                                                                                 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
142                                                                         </source>
143                                                                 </configuration>
144                                                         </execution>
145                                                 </executions>
146                                         </plugin>
147                                         <plugin>
148                                                 <groupId>io.fabric8</groupId>
149                                                 <artifactId>docker-maven-plugin</artifactId>
150                                                 <version>${docker.fabric.version}</version>
151                                                 <configuration>
152                                                         <verbose>true</verbose>
153                                                         <apiVersion>1.23</apiVersion>
154                                                         <images>
155                                                                 <image>
156                                                                         <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
157                                                                         <build>
158                                                                                 <filter>@</filter>
159                                                                                 <tags>
160                                                                                         <tag>latest</tag>
161                                                                                         <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
162                                                                                         <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
163                                                                                 </tags>
164                                                                                 <cleanup>try</cleanup>
165                                                                                 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
166                                                                                 <assembly>
167                                                                                         <inline>
168                                                                                                 <fileSets>
169                                                                                                         <fileSet>
170                                                                                                                 <directory>${aai.build.directory}</directory>
171                                                                                                                 <outputDirectory>/${project.artifactId}</outputDirectory>
172                                                                                                         </fileSet>
173                                                                                                 </fileSets>
174                                                                                         </inline>
175                                                                                 </assembly>
176                                                                         </build>
177                                                                 </image>
178                                                         </images>
179                                                 </configuration>
180                                                 <executions>
181                                                         <execution>
182                                                                 <id>clean-images</id>
183                                                                 <phase>pre-clean</phase>
184                                                                 <goals>
185                                                                         <goal>remove</goal>
186                                                                 </goals>
187                                                                 <configuration>
188                                                                         <removeAll>true</removeAll>
189                                                                 </configuration>
190                                                         </execution>
191                                                         <execution>
192                                                                 <id>generate-images</id>
193                                                                 <phase>package</phase>
194                                                                 <goals>
195                                                                         <goal>build</goal>
196                                                                 </goals>
197                                                         </execution>
198                                                         <execution>
199                                                                 <id>push-images</id>
200                                                                 <phase>deploy</phase>
201                                                                 <goals>
202                                                                         <goal>push</goal>
203                                                                 </goals>
204                                                         </execution>
205                                                 </executions>
206                                         </plugin>
207                                 </plugins>
208                         </build>
209                 </profile>
210         </profiles>
211
212         <dependencies>
213                 <dependency>
214                         <groupId>org.springframework.boot</groupId>
215                         <artifactId>spring-boot-starter-jetty</artifactId>
216                 </dependency>
217                 <dependency>
218                         <groupId>org.springframework.boot</groupId>
219                         <artifactId>spring-boot-starter-web</artifactId>
220                         <exclusions>
221                           <exclusion>
222                             <groupId>org.springframework.boot</groupId>
223                             <artifactId>spring-boot-starter-tomcat</artifactId>
224                           </exclusion>
225                         </exclusions>
226                 </dependency>
227                 <dependency>
228                         <groupId>org.onap.aai</groupId>
229                         <artifactId>babel</artifactId>
230                         <version>${babel.version}</version>
231                         <classifier>client</classifier>
232                         <exclusions>
233                                 <exclusion>
234                                         <groupId>*</groupId>
235                                         <artifactId>*</artifactId>
236                                 </exclusion>
237                         </exclusions>
238                 </dependency>
239                 <dependency>
240                         <groupId>org.glassfish.jersey.core</groupId>
241                         <artifactId>jersey-common</artifactId>
242                         <scope>test</scope>
243                 </dependency>
244                 <dependency>
245                         <groupId>org.onap.aai</groupId>
246                         <artifactId>rest-client</artifactId>
247                         <version>${aai.rest.client.version}</version>
248                 </dependency>
249                 <dependency>
250                         <groupId>com.google.code.gson</groupId>
251                         <artifactId>gson</artifactId>
252                 </dependency>
253
254                 <!-- Test dependencies -->
255                 <!-- https://mvnrepository.com/artifact/com.mikesamuel/json-sanitizer -->
256                 <dependency>
257                         <groupId>com.mikesamuel</groupId>
258                         <artifactId>json-sanitizer</artifactId>
259                         <version>1.2.0</version>
260                 </dependency>
261
262                 <!-- Common logging framework -->
263                 <dependency>
264                         <groupId>org.onap.aai.logging-service</groupId>
265                         <artifactId>common-logging</artifactId>
266                         <version>1.5.0</version>
267                 </dependency>
268                 <dependency>
269                         <groupId>ch.qos.logback</groupId>
270                         <artifactId>logback-classic</artifactId>
271                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$ -->
272                 </dependency>
273                 <dependency>
274                         <groupId>ch.qos.logback</groupId>
275                         <artifactId>logback-core</artifactId>
276                         <version>${logback.version}</version><!--$NO-MVN-MAN-VER$ -->
277                 </dependency>
278                 <dependency>
279                         <groupId>org.onap.sdc.sdc-distribution-client</groupId>
280                         <artifactId>sdc-distribution-client</artifactId>
281                         <version>${sdc-distribution-client.version}</version>
282                 </dependency>
283                 <dependency>
284                         <groupId>org.json</groupId>
285                         <artifactId>json</artifactId>
286                         <version>20131018</version><!--$NO-MVN-MAN-VER$ -->
287                 </dependency>
288                 <dependency>
289                         <groupId>org.eclipse.jetty</groupId>
290                         <artifactId>jetty-security</artifactId>
291                 </dependency>
292                 <dependency>
293                         <groupId>jline</groupId>
294                         <artifactId>jline</artifactId>
295                         <version>2.12.1</version>
296                 </dependency>
297                 <dependency>
298                         <groupId>org.apache.commons</groupId>
299                         <artifactId>commons-compress</artifactId>
300                         <version>${commons-compress.version}</version>
301                 </dependency>
302                 <dependency>
303                         <groupId>commons-io</groupId>
304                         <artifactId>commons-io</artifactId>
305                         <version>2.4</version>
306                 </dependency>
307                 <dependency>
308                         <groupId>org.apache.commons</groupId>
309                         <artifactId>commons-text</artifactId>
310                         <version>${apache.commons-text.version}</version>
311                 </dependency>
312
313                 <!-- Test dependencies -->
314                 <dependency>
315                         <groupId>junit</groupId>
316                         <artifactId>junit</artifactId>
317                         <scope>test</scope>
318                 </dependency>
319                 <dependency>
320                         <groupId>org.hamcrest</groupId>
321                         <artifactId>hamcrest-all</artifactId>
322                         <version>${hamcrest-all.version}</version>
323                         <scope>test</scope>
324                 </dependency>
325                 <dependency>
326                         <groupId>org.mockito</groupId>
327                         <artifactId>mockito-core</artifactId>
328                         <scope>test</scope>
329                 </dependency>
330                 <dependency>
331                         <groupId>org.springframework.boot</groupId>
332                         <artifactId>spring-boot-starter-test</artifactId>
333                         <scope>test</scope>
334                 </dependency>
335         </dependencies>
336
337         <!-- Plugins and repositories -->
338         <pluginRepositories>
339                 <pluginRepository>
340                         <id>central</id>
341                         <url>http://repo1.maven.org/maven2</url>
342                 </pluginRepository>
343                 <pluginRepository>
344                         <id>EvoSuite</id>
345                         <name>EvoSuite Repository</name>
346                         <url>http://www.evosuite.org/m2</url>
347                 </pluginRepository>
348         </pluginRepositories>
349
350         <repositories>
351                 <repository>
352                         <id>central</id>
353                         <name>Maven 2 repository 2</name>
354                         <url>http://repo2.maven.org/maven2/</url>
355                 </repository>
356                 <repository>
357                         <id>ecomp-releases</id>
358                         <name>ECOMP Release Repository</name>
359                         <url>${nexusproxy}/content/repositories/releases/</url>
360                 </repository>
361                 <repository>
362                         <id>ecomp-snapshots</id>
363                         <name>ECOMP Snapshot Repository</name>
364                         <url>${nexusproxy}/content/repositories/snapshots/</url>
365                 </repository>
366                 <repository>
367                         <id>ecomp-staging</id>
368                         <name>ECOMP Staging Repository</name>
369                         <url>${nexusproxy}/content/repositories/staging/</url>
370                 </repository>
371         </repositories>
372
373         <build>
374                 <plugins>
375                         <plugin>
376                                 <groupId>org.springframework.boot</groupId>
377                                 <artifactId>spring-boot-maven-plugin</artifactId>
378                                 <version>${spring-boot.version}</version>
379                                 <configuration>
380                                         <executable>true</executable>
381                                 </configuration>
382                                 <executions>
383                                         <execution>
384                                                 <goals>
385                                                         <goal>repackage</goal>
386                                                 </goals>
387                                         </execution>
388                                 </executions>
389                         </plugin>
390                         <plugin>
391                                 <groupId>com.mycila</groupId>
392                                 <artifactId>license-maven-plugin</artifactId>
393                                 <version>3.0</version>
394                                 <configuration>
395                                         <header>License.txt</header>
396                                         <includes>
397                                                 <include>src/main/java/**</include>
398                                                 <include>src/test/java/**</include>
399                                                 <include>version/properties</include>
400                                                 <include>pom.xml</include>
401                                         </includes>
402                                         <skipExistingHeaders>true</skipExistingHeaders>
403                                 </configuration>
404                                 <executions>
405                                         <execution>
406                                                 <goals>
407                                                         <!-- Set goal to "format" to auto update license headers -->
408                                                         <goal>check</goal>
409                                                 </goals>
410                                                 <phase>process-sources</phase>
411                                         </execution>
412                                 </executions>
413                         </plugin>
414                         <plugin>
415                                 <groupId>org.apache.maven.plugins</groupId>
416                                 <artifactId>maven-deploy-plugin</artifactId>
417                                 <configuration>
418                                         <classifier>client</classifier>
419                                 </configuration>
420                         </plugin>
421                         <plugin>
422                                 <artifactId>maven-assembly-plugin</artifactId>
423                                 <configuration>
424                                         <descriptors>
425                                                 <descriptor>src/main/assembly/descriptor.xml</descriptor>
426                                         </descriptors>
427                                 </configuration>
428                                 <executions>
429                                         <execution>
430                                                 <id>make-assembly</id>
431                                                 <phase>package</phase>
432                                                 <goals>
433                                                         <goal>single</goal>
434                                                 </goals>
435                                         </execution>
436                                 </executions>
437                         </plugin>
438
439                         <!-- once we connect aai-parent or oparent 3.0+ we can take out this 
440                              whole section -->
441
442                         <plugin>
443                           <groupId>org.jacoco</groupId>
444                           <artifactId>jacoco-maven-plugin</artifactId>
445                           <version>${jacoco.version}</version>
446                           <configuration>
447                             <!-- Note: This exclusion list should match <sonar.exclusions> property 
448                                  above -->
449                             <excludes>
450                               <exclude>**/gen/**</exclude>
451                               <exclude>**/generated-sources/**</exclude>
452                               <exclude>**/yang-gen/**</exclude>
453                               <exclude>**/pax/**</exclude>
454                             </excludes>
455                           </configuration>
456                           <executions>
457                             <!-- Prepares the property pointing to the JaCoCo runtime agent which 
458                                  is passed as VM argument when Maven the Surefire plugin is executed. -->
459                             <execution>
460                               <id>pre-unit-test</id>
461                               <goals>
462                                 <goal>prepare-agent</goal>
463                               </goals>
464                               <configuration>
465                                 <!-- Sets the path to the file which contains the execution data 
466                                      . -->
467                                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
468                                 <!-- Sets the name of the property containing the settings for JaCoCo 
469                                      runtime agent. -->
470                                 <propertyName>surefireArgLine</propertyName>
471                               </configuration>
472                             </execution>
473                             <!-- Ensures that the code coverage report for unit tests is created 
474                                  after unit tests have been run. -->
475                             <execution>
476                               <id>post-unit-test</id>
477                               <phase>test</phase>
478                               <goals>
479                                 <goal>report</goal>
480                               </goals>
481                               <configuration>
482                                 <!-- Sets the path to the file which contains the execution data 
483                                      . -->
484                                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
485                                 <!-- Sets the output directory for the code coverage report. -->
486                                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
487                               </configuration>
488                             </execution>
489                             <execution>
490                               <id>pre-integration-test</id>
491                               <phase>pre-integration-test</phase>
492                               <goals>
493                                 <goal>prepare-agent</goal>
494                               </goals>
495                               <configuration>
496                                 <!-- Sets the path to the file which contains the execution data 
497                                      . -->
498                                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
499                                 <!-- Sets the name of the property containing the settings for JaCoCo 
500                                      runtime agent. -->
501                                 <propertyName>failsafeArgLine</propertyName>
502                               </configuration>
503                             </execution>
504                             <!-- Ensures that the code coverage report for integration tests after 
505                                  integration tests have been run. -->
506                             <execution>
507                               <id>post-integration-test</id>
508                               <phase>post-integration-test</phase>
509                               <goals>
510                                 <goal>report</goal>
511                               </goals>
512                               <configuration>
513                                 <!-- Sets the path to the file which contains the execution data 
514                                      . -->
515                                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
516                                 <!-- Sets the output directory for the code coverage report. -->
517                                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
518                               </configuration>
519                             </execution>
520                             <execution>
521                               <id>default-check</id>
522                               <goals>
523                                 <goal>check</goal>
524                               </goals>
525                               <configuration>
526                                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
527                                 <rules>
528                                   <rule implementation="org.jacoco.maven.RuleConfiguration">
529                                     <element>BUNDLE</element>
530                                     <limits>
531                                       <limit implementation="org.jacoco.report.check.Limit">
532                                         <counter>LINE</counter>
533                                         <value>COVEREDRATIO</value>
534                                         <minimum>${jacoco.line.coverage.limit}</minimum>
535                                       </limit>
536                                     </limits>
537                                   </rule>
538                                 </rules>
539                               </configuration>
540                             </execution>
541                           </executions>
542                         </plugin>
543                         <plugin>
544                           <groupId>org.apache.maven.plugins</groupId>
545                           <artifactId>maven-surefire-plugin</artifactId>
546                           <version>3.0.0-M4</version>
547                           <configuration>
548                             <!-- Sets the VM argument line used when unit tests are run. -->
549                             <argLine>${surefireArgLine}</argLine>
550                             <!-- Excludes integration tests when unit tests are run. -->
551                             <excludes>
552                               <exclude>**/IT*.java</exclude>
553                             </excludes>
554                           </configuration>
555                         </plugin>
556                         <plugin>
557                           <groupId>org.apache.maven.plugins</groupId>
558                           <artifactId>maven-failsafe-plugin</artifactId>
559                           <version>3.0.0-M4</version>
560                           <executions>
561                             <!-- Ensures that both integration-test and verify goals of the Failsafe 
562                                  Maven plugin are executed. -->
563                             <execution>
564                               <id>integration-tests</id>
565                               <goals>
566                                 <goal>integration-test</goal>
567                                 <goal>verify</goal>
568                               </goals>
569                               <configuration>
570                                 <!-- Sets the VM argument line used when integration tests are run. -->
571                                 <argLine>${failsafeArgLine}</argLine>
572                               </configuration>
573                             </execution>
574                           </executions>
575                         </plugin>
576                         <plugin>
577                           <groupId>org.sonarsource.scanner.maven</groupId>
578                           <artifactId>sonar-maven-plugin</artifactId>
579                           <version>${sonar.scanner.version}</version>
580                         </plugin>
581                         <!-- end removable sonar config -->
582
583
584
585                 </plugins>
586         </build>
587 </project>