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