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