Update SONAR config
[aai/sparky-be.git] / sparkybe-onap-application / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2          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         <parent>
6           <groupId>org.onap.aai</groupId>
7           <artifactId>sparky-be</artifactId>
8           <version>1.6.1-SNAPSHOT</version>
9         </parent>
10
11         <groupId>org.onap.aai.sparky-be</groupId>
12         <artifactId>sparkybe-onap-application</artifactId>
13         <version>1.6.1-SNAPSHOT</version>
14         <packaging>jar</packaging>
15
16     <properties>
17         <java.version>1.8</java.version>
18         <frontEndGroupdId>org.onap.aai</frontEndGroupdId>
19         <frontEndArtifactId>sparky-fe</frontEndArtifactId>
20         <frontEndVersion>1.5.0</frontEndVersion>
21         <serverPort>9517</serverPort>
22         <sslport>8000</sslport>
23         <nexusproxy>https://nexus.onap.org</nexusproxy>
24         <camel-spring-boot.version>2.21.1</camel-spring-boot.version>
25         <config-home>${basedir}/</config-home>
26         <version.aai-schema>1.6.0</version.aai-schema>
27         <sitePath>/content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version}</sitePath>
28         <nexusproxy>https://nexus.onap.org</nexusproxy>
29         <spring.boot.version>1.5.21.RELEASE</spring.boot.version>
30         <shemaUnpackVersion>onap</shemaUnpackVersion>
31         <!-- docker related properties -->
32         <docker.image.name>sparky-be</docker.image.name>
33         <docker.fabric.version>0.28.0</docker.fabric.version>
34         <aai.docker.version>1.0.0</aai.docker.version>
35         <aai.build.directory>${project.build.directory}/${project.artifactId}-build/
36         </aai.build.directory>
37         <aai.docker.namespace>onap</aai.docker.namespace>
38         <aai.base.image>alpine</aai.base.image>
39         <aai.base.image.version>1.6.0</aai.base.image.version>
40         <!-- This will be used for the docker images as the default format of maven build has issues -->
41         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
42     </properties>
43
44     <dependencyManagement>
45         <dependencies>
46             <dependency>
47                 <groupId>org.springframework.boot</groupId>
48                 <artifactId>spring-boot-starter-parent</artifactId>
49                 <version>${spring.boot.version}</version>
50                 <type>pom</type>
51                 <scope>import</scope>
52             </dependency>
53             <!-- Camel BOM -->
54             <dependency>
55                 <groupId>org.apache.camel</groupId>
56                 <artifactId>camel-spring-boot-dependencies</artifactId>
57                 <version>${camel-spring-boot.version}</version>
58                 <type>pom</type>
59                 <scope>import</scope>
60             </dependency>
61
62             <dependency>
63                 <groupId>ch.qos.logback</groupId>
64                 <artifactId>logback-classic</artifactId>
65                 <version>1.2.3</version>
66             </dependency>
67
68         </dependencies>
69
70     </dependencyManagement>
71
72     <dependencies>
73
74         <!-- Spring dependencies -->
75         <dependency>
76             <groupId>org.springframework.boot</groupId>
77             <artifactId>spring-boot-starter-web</artifactId>
78             <exclusions>
79                 <exclusion>
80                     <groupId>org.springframework.boot</groupId>
81                     <artifactId>spring-boot-starter-tomcat</artifactId>
82                 </exclusion>
83             </exclusions>
84         </dependency>
85
86         <dependency>
87             <groupId>org.springframework.boot</groupId>
88             <artifactId>spring-boot-starter-jetty</artifactId>
89         </dependency>
90
91         <dependency>
92             <groupId>org.springframework.boot</groupId>
93             <artifactId>spring-boot-starter-actuator</artifactId>
94         </dependency>
95
96         <dependency>
97             <groupId>org.apache.camel</groupId>
98             <artifactId>camel-restlet</artifactId>
99             <exclusions>
100                 <exclusion>
101                     <groupId>commons-logging</groupId>
102                     <artifactId>commons-logging</artifactId>
103                 </exclusion>
104             </exclusions>
105         </dependency>
106
107         <dependency>
108             <groupId>org.springframework.boot</groupId>
109             <artifactId>spring-boot-starter-logging</artifactId>
110             <exclusions>
111                 <exclusion>
112                     <groupId>ch.qos.logback</groupId>
113                     <artifactId>logback-classic</artifactId>
114                 </exclusion>
115                 <exclusion>
116                     <groupId>org.slf4j</groupId>
117                     <artifactId>log4j-over-slf4j</artifactId>
118                 </exclusion>
119             </exclusions>
120         </dependency>
121
122         <dependency>
123             <groupId>org.apache.camel</groupId>
124             <artifactId>camel-servlet</artifactId>
125             <exclusions>
126                 <exclusion>
127                     <groupId>commons-logging</groupId>
128                     <artifactId>commons-logging</artifactId>
129                 </exclusion>
130             </exclusions>
131         </dependency>
132
133         <!-- Camel BOM -->
134         <dependency>
135             <groupId>org.apache.camel</groupId>
136             <artifactId>camel-spring-boot-dependencies</artifactId>
137             <version>${camel-spring-boot.version}</version>
138             <type>pom</type>
139             <scope>import</scope>
140         </dependency>
141
142         <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
143         <!-- <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId>
144             </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-core</artifactId>
145             </dependency> -->
146
147         <!-- Camel -->
148         <dependency>
149             <groupId>org.apache.camel</groupId>
150             <artifactId>camel-spring-boot-starter</artifactId>
151         </dependency>
152
153         <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-restlet -->
154         <dependency>
155             <groupId>org.apache.camel</groupId>
156             <artifactId>camel-restlet</artifactId>
157         </dependency>
158
159         <dependency>
160             <groupId>commons-io</groupId>
161             <artifactId>commons-io</artifactId>
162         </dependency>
163
164         <!-- https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util -->
165         <dependency>
166             <groupId>org.eclipse.jetty</groupId>
167             <artifactId>jetty-util</artifactId>
168             <scope>provided</scope>
169         </dependency>
170
171         <dependency>
172             <groupId>org.apache.camel</groupId>
173             <artifactId>camel-servlet-starter</artifactId>
174         </dependency>
175
176         <dependency>
177             <groupId>org.springframework.boot</groupId>
178             <artifactId>spring-boot-starter-actuator</artifactId>
179         </dependency>
180
181                 <dependency>
182                         <groupId>org.onap.aai.sparky-be</groupId>
183                         <artifactId>sparkybe-onap-service</artifactId>
184                         <version>1.6.0-SNAPSHOT</version>
185                 </dependency>
186
187
188         <!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
189         <dependency>
190             <groupId>commons-cli</groupId>
191             <artifactId>commons-cli</artifactId>
192             <version>1.2</version>
193         </dependency>
194
195         <!-- <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId>
196             </dependency> -->
197
198
199         <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-http-common -->
200         <!-- <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-http</artifactId>
201             <version>2.15.5</version> </dependency> <dependency> <groupId>abc.def</groupId>
202             <artifactId>att-camel-dme2-servlet</artifactId> <version>2.15.5</version>
203             <scope>system</scope> <systemPath>x:/222/att-camel-dme2-servlet-2.15.5.jar</systemPath>
204             </dependency> <dependency> <groupId>abc.def</groupId> <artifactId>att-camel-static-content</artifactId>
205             <version>2.11.2.1</version> <scope>system</scope> <systemPath>x:/222/att-camel-static-content-2.11.2.1.jar</systemPath>
206             </dependency> -->
207
208         <!-- Utility dependencies -->
209
210         <dependency>
211             <groupId>com.google.guava</groupId>
212             <artifactId>guava</artifactId>
213             <version>26.0-jre</version>
214         </dependency>
215
216         <dependency>
217             <groupId>org.onap.aai.logging-service</groupId>
218             <artifactId>common-logging</artifactId>
219             <version>1.5.0</version>
220         </dependency>
221
222         <dependency>
223             <groupId>org.dom4j</groupId>
224             <artifactId>dom4j</artifactId>
225             <scope>provided</scope>
226             <version>2.1.1</version>
227         </dependency>
228
229         <dependency>
230             <groupId>org.eclipse.persistence</groupId>
231             <artifactId>eclipselink</artifactId>
232             <version>2.6.2</version>
233         </dependency>
234
235         <dependency>
236             <groupId>org.slf4j</groupId>
237             <artifactId>slf4j-api</artifactId>
238             <scope>provided</scope>
239         </dependency>
240
241         <dependency>
242             <groupId>com.fasterxml.jackson.core</groupId>
243             <artifactId>jackson-core</artifactId>
244             <scope>provided</scope>
245         </dependency>
246
247         <dependency>
248             <groupId>org.onap.aai.schema-service</groupId>
249             <artifactId>aai-schema</artifactId>
250             <version>${version.aai-schema}</version>
251         </dependency>
252
253         <dependency>
254             <groupId>org.onap.aai</groupId>
255             <artifactId>rest-client</artifactId>
256             <version>1.5.0</version>
257         </dependency>
258
259         <!-- https://mvnrepository.com/artifact/org.restlet.jee/org.restlet.ext.servlet -->
260         <dependency>
261             <groupId>org.restlet.jee</groupId>
262             <artifactId>org.restlet.ext.servlet</artifactId>
263             <version>2.1.1</version>
264         </dependency>
265
266
267         <dependency>
268             <groupId>com.openpojo</groupId>
269             <artifactId>openpojo</artifactId>
270             <version>0.8.6</version>
271         </dependency>
272
273         <dependency>
274             <groupId>com.google.code.gson</groupId>
275             <artifactId>gson</artifactId>
276             <scope>provided</scope>
277         </dependency>
278
279
280         <dependency>
281             <groupId>org.json</groupId>
282             <artifactId>json</artifactId>
283             <scope>provided</scope>
284         </dependency>
285
286         <dependency>
287             <groupId>com.fasterxml.jackson.core</groupId>
288             <artifactId>jackson-databind</artifactId>
289             <scope>provided</scope>
290         </dependency>
291
292         <dependency>
293             <groupId>org.onap.portal.sdk</groupId>
294             <artifactId>epsdk-fw</artifactId>
295             <version>2.5.0</version>
296             <exclusions>
297                 <exclusion>
298                     <groupId>commons-logging</groupId>
299                     <artifactId>commons-logging</artifactId>
300                 </exclusion>
301                 <exclusion>
302                     <groupId>log4j</groupId>
303                     <artifactId>log4j</artifactId>
304                 </exclusion>
305                 <exclusion>
306                     <groupId>log4j</groupId>
307                     <artifactId>apache-log4j-extras</artifactId>
308                 </exclusion>
309                 <exclusion>
310                     <groupId>org.slf4j</groupId>
311                     <artifactId>slf4j-log4j12</artifactId>
312                 </exclusion>
313             </exclusions>
314         </dependency>
315
316         <!-- Test dependencies -->
317
318         <dependency>
319             <groupId>org.mockito</groupId>
320             <artifactId>mockito-all</artifactId>
321             <version>1.10.19</version>
322             <scope>test</scope>
323         </dependency>
324
325         <dependency>
326             <groupId>org.powermock</groupId>
327             <artifactId>powermock-module-junit4</artifactId>
328             <version>1.6.2</version>
329             <scope>test</scope>
330         </dependency>
331         <dependency>
332             <groupId>org.powermock</groupId>
333             <artifactId>powermock-api-mockito</artifactId>
334             <version>1.6.2</version>
335             <scope>test</scope>
336         </dependency>
337         <dependency>
338             <groupId>org.powermock</groupId>
339             <artifactId>powermock-module-javaagent</artifactId>
340             <version>1.6.2</version>
341             <scope>test</scope>
342         </dependency>
343         <dependency>
344             <groupId>org.powermock</groupId>
345             <artifactId>powermock-module-junit4-rule-agent</artifactId>
346             <version>1.6.2</version>
347             <scope>test</scope>
348         </dependency>
349
350         <dependency>
351             <groupId>org.hamcrest</groupId>
352             <artifactId>hamcrest-library</artifactId>
353             <scope>test</scope>
354         </dependency>
355
356     </dependencies>
357
358     <profiles>
359         <profile>
360             <id>docker</id>
361             <build>
362                 <plugins>
363                     <plugin>
364                         <groupId>org.codehaus.mojo</groupId>
365                         <artifactId>build-helper-maven-plugin</artifactId>
366                         <version>3.0.0</version>
367                         <executions>
368                             <execution>
369                                 <phase>pre-clean</phase>
370                                 <id>parse-version</id>
371                                 <goals>
372                                     <goal>parse-version</goal>
373                                 </goals>
374                             </execution>
375                         </executions>
376                     </plugin>
377                     <plugin>
378                         <groupId>org.codehaus.groovy.maven</groupId>
379                         <artifactId>gmaven-plugin</artifactId>
380                         <version>1.0</version>
381                         <executions>
382                             <execution>
383                                 <phase>pre-clean</phase>
384                                 <goals>
385                                     <goal>execute</goal>
386                                 </goals>
387                                 <configuration>
388                                     <source>
389                                         def userAaiBaseImage = session.userProperties['aai.base.image']
390                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version']
391                                         if (userAaiCommonVersion != null) {
392                                             project.properties['aai.base.image.version'] = userAaiCommonVersion
393                                         }
394                                         if (userAaiBaseImage != null) {
395                                             project.properties['aai.base.image'] = userAaiBaseImage
396                                         }
397                                         log.info 'Base image flavour: ' + project.properties['aai.base.image']
398                                         log.info 'Base image version: ' + project.properties['aai.base.image.version']
399                                     </source>
400                                 </configuration>
401                             </execution>
402                         </executions>
403                     </plugin>
404                     <plugin>
405                         <groupId>io.fabric8</groupId>
406                         <artifactId>docker-maven-plugin</artifactId>
407                         <version>${docker.fabric.version}</version>
408                         <configuration>
409                             <verbose>true</verbose>
410                             <apiVersion>1.23</apiVersion>
411                             <images>
412                                 <image>
413                                     <name>${docker.push.registry}/${aai.docker.namespace}/${docker.image.name}:%l
414                                     </name>
415                                     <build>
416                                         <filter>@</filter>
417                                         <tags>
418                                             <tag>latest</tag>
419                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
420                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
421                                         </tags>
422                                         <cleanup>try</cleanup>
423                                         <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
424                                         <assembly>
425                                             <inline>
426                                                 <fileSets>
427                                                     <fileSet>
428                                                         <directory>${aai.build.directory}</directory>
429                                                         <outputDirectory>/${project.artifactId}</outputDirectory>
430                                                     </fileSet>
431                                                 </fileSets>
432                                             </inline>
433                                         </assembly>
434                                     </build>
435                                 </image>
436                             </images>
437                         </configuration>
438                         <executions>
439                             <execution>
440                                 <id>clean-images</id>
441                                 <phase>pre-clean</phase>
442                                 <goals>
443                                     <goal>remove</goal>
444                                 </goals>
445                                 <configuration>
446                                     <removeAll>true</removeAll>
447                                 </configuration>
448                             </execution>
449                             <execution>
450                                 <id>generate-images</id>
451                                 <phase>package</phase>
452                                 <goals>
453                                     <goal>build</goal>
454                                 </goals>
455                             </execution>
456                             <execution>
457                                 <id>push-images</id>
458                                 <phase>deploy</phase>
459                                 <goals>
460                                     <goal>push</goal>
461                                 </goals>
462                             </execution>
463                         </executions>
464                     </plugin>
465                 </plugins>
466             </build>
467         </profile>
468     </profiles>
469
470     <build>
471         <finalName>${project.artifactId}</finalName>
472         <resources>
473             <resource>
474                 <directory>${project.basedir}/src/main/resources</directory>
475             </resource>
476             <resource>
477                 <directory>${project.basedir}/config/portal/BOOT-INF/classes</directory>
478                 <filtering>true</filtering>
479                 <includes>
480                     <include>*.properties</include>
481                 </includes>
482             </resource>
483         </resources>
484         <pluginManagement>
485             <plugins>
486                 <plugin>
487                     <groupId>org.apache.maven.plugins</groupId>
488                     <artifactId>maven-compiler-plugin</artifactId>
489                     <configuration>
490                         <source>1.8</source>
491                         <target>1.8</target>
492                     </configuration>
493                 </plugin>
494             </plugins>
495         </pluginManagement>
496
497         <plugins>
498             <plugin>
499                 <groupId>org.springframework.boot</groupId>
500                 <artifactId>spring-boot-maven-plugin</artifactId>
501                 <configuration>
502                     <folders>
503                         <folder>
504                             ${CONFIG_HOME}/portal/BOOT-INF/classes/
505                         </folder>
506                     </folders>
507                 </configuration>
508                 <executions>
509                     <execution>
510                         <phase>package</phase>
511                         <goals>
512                             <goal>repackage</goal>
513                         </goals>
514                     </execution>
515                 </executions>
516             </plugin>
517
518             <plugin>
519                 <artifactId>maven-assembly-plugin</artifactId>
520                 <configuration>
521                     <descriptors>
522                         <descriptor>src/main/assembly/descriptor.xml</descriptor>
523                     </descriptors>
524                 </configuration>
525                 <executions>
526                     <execution>
527                         <id>make-assembly</id>
528                         <phase>package</phase>
529                         <goals>
530                             <goal>single</goal>
531                         </goals>
532                     </execution>
533                 </executions>
534             </plugin>
535
536             <plugin>
537                 <groupId>org.apache.maven.plugins</groupId>
538                 <artifactId>maven-dependency-plugin</artifactId>
539                 <version>3.0.0</version>
540                 <executions>
541                     <execution>
542                         <id>copy-war-to-target</id>
543                         <phase>prepare-package</phase>
544                         <goals>
545                             <goal>unpack</goal>
546                         </goals>
547                         <configuration>
548                             <artifactItems>
549                                 <artifactItem>
550                                     <groupId>${frontEndGroupdId}</groupId>
551                                     <artifactId>${frontEndArtifactId}</artifactId>
552                                     <version>${frontEndVersion}</version>
553                                     <type>war</type>
554                                     <outputDirectory>${aai.build.directory}/static/services/aai/webapp/
555                                     </outputDirectory>
556                                 </artifactItem>
557                             </artifactItems>
558                         </configuration>
559                     </execution>
560                     <execution>
561                         <id>unpack</id>
562                         <phase>prepare-package</phase>
563                         <goals>
564                             <goal>unpack</goal>
565                         </goals>
566                         <configuration>
567                             <artifactItems>
568                                 <artifactItem>
569                                     <groupId>org.onap.aai.schema-service</groupId>
570                                     <artifactId>aai-schema</artifactId>
571                                     <version>${version.aai-schema}</version>
572                                     <type>jar</type>
573                                     <includes>/${shemaUnpackVersion}/oxm/</includes>
574                                     <outputDirectory>${aai.build.directory}</outputDirectory>
575                                 </artifactItem>
576                             </artifactItems>
577                         </configuration>
578                     </execution>
579                 </executions>
580             </plugin>
581
582             <plugin>
583                 <groupId>org.codehaus.mojo</groupId>
584                 <artifactId>cobertura-maven-plugin</artifactId>
585                 <executions>
586                     <execution>
587                         <phase/>
588                     </execution>
589                 </executions>
590             </plugin>
591
592             <plugin>
593                 <groupId>org.apache.maven.plugins</groupId>
594                 <artifactId>maven-site-plugin</artifactId>
595                 <configuration>
596                     <reportPlugins>
597                         <plugin>
598                             <groupId>org.apache.maven.plugins</groupId>
599                             <artifactId>maven-checkstyle-plugin</artifactId>
600                             <version>2.17</version>
601                             <reportSets>
602                                 <reportSet>
603                                     <reports>
604                                         <report>checkstyle</report>
605                                     </reports>
606                                 </reportSet>
607                             </reportSets>
608                         </plugin>
609                     </reportPlugins>
610                 </configuration>
611             </plugin>
612
613             <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId>
614                 <version>2.7</version> <executions> <execution> <id>copy-docker-file</id>
615                 <phase>package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration>
616                 <outputDirectory>target</outputDirectory> <overwrite>true</overwrite> <resources>
617                 <resource> <directory>${basedir}/src/main/docker</directory> <filtering>true</filtering>
618                 <includes> <include>**/*</include> </includes> </resource> <resource> <directory>${basedir}/src/main/scripts/</directory>
619                 </resource> </resources> </configuration> </execution> </executions> </plugin> -->
620             <plugin>
621                 <groupId>org.apache.maven.plugins</groupId>
622                 <artifactId>maven-deploy-plugin</artifactId>
623             </plugin>
624             <!-- license plugin -->
625             <!-- <plugin> <groupId>com.mycila</groupId> <artifactId>license-maven-plugin</artifactId>
626                 <version>3.0</version> <configuration> <header>LICENSE</header> <includes>
627                 <include>src/main/java/**</include> </includes> </configuration> <executions>
628                 <execution> <goals> <goal>format</goal> </goals> <phase>process-sources</phase>
629                 </execution> </executions> </plugin> -->
630         </plugins>
631     </build>
632
633     <distributionManagement>
634         <repository>
635             <id>ecomp-releases</id>
636             <name>ECOMP Release Repository</name>
637             <url>${nexusproxy}/content/repositories/releases/</url>
638         </repository>
639         <snapshotRepository>
640             <id>ecomp-snapshots</id>
641             <name>ECOMP Snapshot Repository</name>
642             <url>${nexusproxy}/content/repositories/snapshots/</url>
643         </snapshotRepository>
644     </distributionManagement>
645
646     <repositories>
647         <repository>
648             <id>central</id>
649             <name>Maven 2 repository 2</name>
650             <url>http://repo2.maven.org/maven2/</url>
651         </repository>
652         <repository>
653             <id>ecomp-releases</id>
654             <name>ECOMP Release Repository</name>
655             <url>${nexusproxy}/content/repositories/releases/</url>
656         </repository>
657         <repository>
658             <id>ecomp-staging</id>
659             <name>ECOMP Staging Repository</name>
660             <url>${nexusproxy}/content/repositories/staging/</url>
661         </repository>
662         <repository>
663             <id>ecomp-snapshots</id>
664             <name>ECOMP Snapshot Repository</name>
665             <url>${nexusproxy}/content/repositories/snapshots/</url>
666         </repository>
667     </repositories>
668 </project>