1 <?xml version="1.0" encoding="UTF-8"?>
4 ============LICENSE_START=======================================================
6 ================================================================================
7 Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
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
13 http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25 <modelVersion>4.0.0</modelVersion>
26 <groupId>org.onap.aai.resources</groupId>
27 <artifactId>aai-resources</artifactId>
29 <groupId>org.onap.aai.resources</groupId>
30 <artifactId>resources</artifactId>
31 <version>1.7.0-SNAPSHOT</version>
34 <java.version>1.8</java.version>
35 <start-class>org.onap.aai.ResourcesApp</start-class>
37 <!-- Default docker registry that maven fabric plugin will try to pull from -->
38 <docker.registry>docker.io</docker.registry>
39 <!-- Specifying the docker push registry where the image should be pushed -->
40 <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
41 <docker.push.registry>localhost:5000</docker.push.registry>
42 <aai.docker.version>1.0.0</aai.docker.version>
43 <aai.base.image>alpine</aai.base.image>
44 <aai.base.image.version>1.6.0</aai.base.image.version>
47 Location where assembly of our scripts, resources and main jar will be held
48 Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
50 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
51 </aai.build.directory>
52 <aai.docker.namespace>onap</aai.docker.namespace>
54 <maven.skip.tests>true</maven.skip.tests>
55 <snapshot.file>${project.basedir}/snapshots/snapshot.graphson</snapshot.file>
57 <jacoco.line.coverage.limit>0.68</jacoco.line.coverage.limit>
58 <license.goal.type>check</license.goal.type>
60 <!-- This will be used for the docker images as the default format of maven build has issues -->
61 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
63 <!-- Start of Default ONAP Schema Properties -->
64 <schema.source.name>onap</schema.source.name>
65 <schema.configuration.location>N/A</schema.configuration.location>
66 <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm</schema.nodes.location>
67 <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules</schema.edges.location>
68 <schema.version.depth.start>v10</schema.version.depth.start>
69 <schema.version.related.link.start>v10</schema.version.related.link.start>
70 <schema.version.app.root.start>v11</schema.version.app.root.start>
71 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
72 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
73 <schema.version.api.default>v20</schema.version.api.default>
74 <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20</schema.version.list>
75 <schema.uri.base.path>/aai</schema.uri.base.path>
76 <!-- <schema.translator.list>config</schema.translator.list> -->
77 <schema.ingest.file>${project.basedir}/src/main/resources/application.properties</schema.ingest.file>
79 <!-- End of Default ONAP Schema Properties -->
80 <keycloak.version>11.0.2</keycloak.version>
81 <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
84 <!-- Docker profile to be used for building docker image and pushing to nexus -->
90 <groupId>org.codehaus.groovy.maven</groupId>
91 <artifactId>gmaven-plugin</artifactId>
92 <version>1.0</version>
95 <phase>pre-clean</phase>
99 <phase>prepare-package</phase>
105 def userAaiBaseImage = session.userProperties['aai.base.image']
106 def userAaiCommonVersion = session.userProperties['aai.base.image.version']
107 if (userAaiCommonVersion != null) {
108 project.properties['aai.base.image.version'] = userAaiCommonVersion
110 if (userAaiBaseImage != null) {
111 project.properties['aai.base.image'] = userAaiBaseImage
113 log.info 'Base image flavour: ' + project.properties['aai.base.image']
114 log.info 'Base image version: ' + project.properties['aai.base.image.version']
121 <groupId>io.fabric8</groupId>
122 <artifactId>docker-maven-plugin</artifactId>
124 <verbose>true</verbose>
125 <apiVersion>1.23</apiVersion>
128 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
134 <tag>${project.docker.latesttag.version}</tag>
135 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
137 <cleanup>try</cleanup>
138 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
143 <directory>${aai.build.directory}</directory>
144 <outputDirectory>/${project.artifactId}</outputDirectory>
155 <id>clean-images</id>
156 <phase>pre-clean</phase>
161 <removeAll>true</removeAll>
165 <id>generate-images</id>
166 <phase>package</phase>
173 <phase>deploy</phase>
183 <!-- Start of ONAP Profile -->
187 <schema.source.name>onap</schema.source.name>
188 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
189 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
190 <schema.ingest.file>${project.basedir}/src/main/resources/application.properties</schema.ingest.file>
193 <!-- End of ONAP Profile -->
197 <skipTests>${maven.skip.tests}</skipTests>
200 <defaultGoal>pre-integration-test</defaultGoal>
203 <groupId>org.codehaus.mojo</groupId>
204 <artifactId>exec-maven-plugin</artifactId>
205 <version>1.6.0</version>
208 <id>run-spring-boot</id>
209 <phase>package</phase>
216 <mainClass>${start-class}</mainClass>
219 <key>snapshot.location</key>
220 <value>${snapshot.file}</value>
223 <key>schema.source.name</key>
224 <value>${schema.source.name}</value>
227 <key>schema.configuration.location</key>
228 <value>${schema.configuration.location}</value>
231 <key>schema.nodes.location</key>
232 <value>${schema.nodes.location}</value>
235 <key>schema.edges.location</key>
236 <value>${schema.edges.location}</value>
239 <key>schema.version.depth.start</key>
240 <value>${schema.version.depth.start}</value>
243 <key>schema.version.related.link.start</key>
244 <value>${schema.version.related.link.start}</value>
247 <key>schema.version.app.root.start</key>
248 <value>${schema.version.app.root.start}</value>
251 <key>schema.version.namespace.change.start</key>
252 <value>${schema.version.namespace.change.start}</value>
255 <key>schema.version.edge.label.start</key>
256 <value>${schema.version.edge.label.start}</value>
259 <key>schema.version.api.default</key>
260 <value>${schema.version.api.default}</value>
263 <key>schema.version.list</key>
264 <value>${schema.version.list}</value>
267 <key>schema.uri.base.path</key>
268 <value>${schema.uri.base.path}</value>
271 <key>schema.ingest.file</key>
272 <value>${schema.ingest.file}</value>
275 <executable>java</executable>
285 <groupId>javax.jms</groupId>
286 <artifactId>javax.jms-api</artifactId>
287 <version>2.0.1</version>
290 <groupId>javax.ws.rs</groupId>
291 <artifactId>javax.ws.rs-api</artifactId>
292 <version>2.1</version>
295 <groupId>javax.xml.bind</groupId>
296 <artifactId>jaxb-api</artifactId>
299 <groupId>com.sun.xml.bind</groupId>
300 <artifactId>jaxb-impl</artifactId>
303 <groupId>com.sun.xml.bind</groupId>
304 <artifactId>jaxb-core</artifactId>
308 <groupId>net.sf.jopt-simple</groupId>
309 <artifactId>jopt-simple</artifactId>
312 <groupId>io.swagger</groupId>
313 <artifactId>swagger-core</artifactId>
316 <groupId>javax.ws.rs</groupId>
317 <artifactId>jsr311-api</artifactId>
322 <groupId>io.swagger</groupId>
323 <artifactId>swagger-annotations</artifactId>
326 <groupId>commons-configuration</groupId>
327 <artifactId>commons-configuration</artifactId>
330 <artifactId>commons-lang</artifactId>
331 <groupId>commons-lang</groupId>
336 <groupId>io.swagger</groupId>
337 <artifactId>swagger-jersey-jaxrs</artifactId>
340 <groupId>org.glassfish.jersey.media</groupId>
341 <artifactId>jersey-media-multipart</artifactId>
344 <artifactId>jersey-core</artifactId>
345 <groupId>com.sun.jersey</groupId>
348 <artifactId>jersey-json</artifactId>
349 <groupId>com.sun.jersey</groupId>
352 <artifactId>jersey-server</artifactId>
353 <groupId>com.sun.jersey</groupId>
356 <artifactId>jersey-client</artifactId>
357 <groupId>com.sun.jersey</groupId>
360 <artifactId>jsr311-api</artifactId>
361 <groupId>javax.ws.rs</groupId>
364 <artifactId>jersey-multipart</artifactId>
365 <groupId>com.sun.jersey.contribs</groupId>
370 <groupId>commons-lang</groupId>
371 <artifactId>commons-lang</artifactId>
373 <!-- eelf dependency -->
375 <groupId>com.att.eelf</groupId>
376 <artifactId>eelf-core</artifactId>
379 <groupId>ch.qos.logback</groupId>
380 <artifactId>logback-core</artifactId>
383 <groupId>ch.qos.logback</groupId>
384 <artifactId>logback-classic</artifactId>
387 <groupId>ch.qos.logback</groupId>
388 <artifactId>logback-access</artifactId>
391 <groupId>org.hamcrest</groupId>
392 <artifactId>hamcrest-junit</artifactId>
395 <groupId>junit</groupId>
396 <artifactId>junit</artifactId>
400 <groupId>com.google.guava</groupId>
401 <artifactId>guava</artifactId>
404 <groupId>com.github.jnr</groupId>
405 <artifactId>jnr-ffi</artifactId>
408 <groupId>com.fasterxml.jackson.jaxrs</groupId>
409 <artifactId>jackson-jaxrs-json-provider</artifactId>
412 <groupId>org.mockito</groupId>
413 <artifactId>mockito-all</artifactId>
417 <groupId>org.mockito</groupId>
418 <artifactId>mockito-core</artifactId>
422 <groupId>com.beust</groupId>
423 <artifactId>jcommander</artifactId>
426 <groupId>org.json</groupId>
427 <artifactId>json</artifactId>
430 <groupId>org.freemarker</groupId>
431 <artifactId>freemarker</artifactId>
434 <groupId>javax.xml.bind</groupId>
435 <artifactId>jaxb-api</artifactId>
438 <groupId>org.onap.aaf.authz</groupId>
439 <artifactId>aaf-cadi-aaf</artifactId>
442 <groupId>org.eclipse.persistence</groupId>
443 <artifactId>eclipselink</artifactId>
446 <groupId>org.eclipse.persistence</groupId>
447 <artifactId>org.eclipse.persistence.moxy</artifactId>
448 <scope>compile</scope>
451 <groupId>com.github.fge</groupId>
452 <artifactId>json-patch</artifactId>
455 <groupId>org.javatuples</groupId>
456 <artifactId>javatuples</artifactId>
457 <scope>compile</scope>
460 <groupId>com.google.code.gson</groupId>
461 <artifactId>gson</artifactId>
464 <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
465 <artifactId>dmaapClient</artifactId>
468 <groupId>org.slf4j</groupId>
469 <artifactId>slf4j-log4j12</artifactId>
472 <groupId>com.att.aft</groupId>
473 <artifactId>dme2</artifactId>
478 <groupId>com.jayway.jsonpath</groupId>
479 <artifactId>json-path</artifactId>
481 <!-- Do not use activemq-all because they force you to use a specific logging
482 and they shade it so you can't simply exclude it and when you deploy the
483 jar, you will notice failure -->
485 <groupId>org.apache.activemq</groupId>
486 <artifactId>activemq-broker</artifactId>
489 <groupId>org.apache.activemq</groupId>
490 <artifactId>activemq-client</artifactId>
493 <groupId>org.onap.aai.aai-common</groupId>
494 <artifactId>aai-core</artifactId>
497 <groupId>com.sun.jersey</groupId>
498 <artifactId>jersey-core</artifactId>
501 <groupId>org.codehaus.jackson</groupId>
502 <artifactId>jackson-mapper-asl</artifactId>
505 <groupId>org.eclipse.jetty</groupId>
506 <artifactId>jetty-http</artifactId>
509 <groupId>org.eclipse.jetty</groupId>
510 <artifactId>jetty-server</artifactId>
513 <groupId>org.springframework</groupId>
514 <artifactId>spring-web</artifactId>
519 <groupId>org.onap.aai.aai-common</groupId>
520 <artifactId>aai-schema-ingest</artifactId>
524 <groupId>org.springframework</groupId>
525 <artifactId>spring-jms</artifactId>
528 <groupId>com.sun.jersey</groupId>
529 <artifactId>jersey-core</artifactId>
533 <!-- Do not use the jersey-client since jersey client 1.0 version clashes
534 with jersey 2 which we are using -->
535 <!-- Use this to make http requests instead of jersey 1.0 client -->
537 <groupId>org.apache.httpcomponents</groupId>
538 <artifactId>httpclient</artifactId>
541 <groupId>org.skyscreamer</groupId>
542 <artifactId>jsonassert</artifactId>
546 <groupId>com.vaadin.external.google</groupId>
547 <artifactId>android-json</artifactId>
552 Explicitly stating the security spring framework and
553 exclude the bouncy castle since that is somehow overwriting
554 our p12 file decryption that's built into java security
555 This will cause the password is incorrect
556 This needs to be added back if org.bouncy castle dependency
557 sneaks backs in and causing issues with the two way ssl
560 <groupId>org.springframework.security</groupId>
561 <artifactId>spring-security-rsa</artifactId>
564 <groupId>org.bouncycastle</groupId>
565 <artifactId>bcpkix-jdk15on</artifactId>
570 <groupId>io.netty</groupId>
571 <artifactId>netty-handler</artifactId>
574 <groupId>org.springframework.boot</groupId>
575 <artifactId>spring-boot-starter-web</artifactId>
578 <groupId>org.springframework.boot</groupId>
579 <artifactId>spring-boot-starter-tomcat</artifactId>
584 <groupId>org.springframework.boot</groupId>
585 <artifactId>spring-boot-starter-jetty</artifactId>
588 <groupId>io.netty</groupId>
589 <artifactId>netty-all</artifactId>
592 <groupId>org.codehaus.groovy</groupId>
593 <artifactId>groovy</artifactId>
594 <classifier>indy</classifier>
597 <groupId>org.springframework</groupId>
598 <artifactId>spring-test</artifactId>
602 <groupId>org.springframework.boot</groupId>
603 <artifactId>spring-boot-test</artifactId>
607 <groupId>org.apache.tinkerpop</groupId>
608 <artifactId>gremlin-groovy</artifactId>
611 <groupId>org.springframework.boot</groupId>
612 <artifactId>spring-boot-starter-security</artifactId>
615 <groupId>org.keycloak</groupId>
616 <artifactId>keycloak-spring-boot-starter</artifactId>
619 <dependencyManagement>
622 <groupId>org.keycloak.bom</groupId>
623 <artifactId>keycloak-adapter-bom</artifactId>
624 <version>${keycloak.version}</version>
626 <scope>import</scope>
629 </dependencyManagement>
633 <directory>${project.basedir}/src/main/swm</directory>
634 <targetPath>${project.build.directory}/swm</targetPath>
635 <filtering>false</filtering>
638 <directory>${project.basedir}/src/main/resources</directory>
640 <include>application.properties</include>
641 <include>dme2.properties</include>
642 <include>logback.xml</include>
643 <include>localhost-access-logback.xml</include>
645 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
646 <filtering>false</filtering>
649 <directory>${project.basedir}/src/main/resources</directory>
651 <include>**/*</include>
653 <filtering>true</filtering>
656 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
658 <include>janusgraph-realtime.properties</include>
659 <include>janusgraph-cached.properties</include>
660 <include>aaiconfig.properties</include>
662 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
663 <filtering>false</filtering>
666 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
668 <include>aai-client-cert.p12</include>
669 <include>tomcat_keystore</include>
670 <include>aai_policy.json</include>
672 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
673 <filtering>true</filtering>
676 <directory>${project.basedir}/src/main/resources/</directory>
678 <include>logback.xml</include>
679 <include>localhost-access-logback.xml</include>
680 <include>hbase-site.xml</include>
682 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
683 <filtering>true</filtering>
686 <directory>${project.basedir}/src/main/resources/schema/</directory>
688 <include>**/oxm/**/*.xml</include>
689 <include>**/dbedgerules/**/*.json</include>
691 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema</targetPath>
692 <filtering>false</filtering>
695 <directory>${project.basedir}/src/main/docker</directory>
697 <include>**/*</include>
699 <targetPath>${aai.build.directory}</targetPath>
700 <filtering>true</filtering>
703 <directory>${project.build.directory}/</directory>
705 <include>${project.artifactId}-${project.version}.jar</include>
707 <targetPath>${aai.build.directory}/lib/</targetPath>
708 <filtering>false</filtering>
714 <groupId>org.apache.maven.plugins</groupId>
715 <artifactId>maven-dependency-plugin</artifactId>
716 <version>2.8</version>
719 <id>unpack-schema-dependency</id>
720 <phase>initialize</phase>
727 <groupId>org.onap.aai.schema-service</groupId>
728 <artifactId>aai-schema</artifactId>
729 <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory>
730 <includes>**/oxm/**/*.xml</includes>
733 <!-- other configurations here -->
737 <id>unpack-edgerules-dependency</id>
738 <phase>initialize</phase>
745 <groupId>org.onap.aai.schema-service</groupId>
746 <artifactId>aai-schema</artifactId>
747 <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory>
748 <includes>**/dbedgerules/**/*.json</includes>
751 <!-- other configurations here -->
757 <groupId>org.codehaus.groovy.maven</groupId>
758 <artifactId>gmaven-plugin</artifactId>
759 <version>1.0</version>
762 <phase>validate</phase>
768 println project.properties['aai.project.version'];
770 if (project.properties['aai.project.version'] != null) {
771 versionArray = project.properties['aai.project.version'].split('\\.');
774 project.properties["project.major.version"] = versionArray[0];
775 project.properties["project.minor.version"] = versionArray[1];
776 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
777 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
784 <groupId>com.mycila</groupId>
785 <artifactId>license-maven-plugin</artifactId>
786 <version>3.0</version>
788 <header>LICENSE.TXT</header>
790 <include>src/main/java/**</include>
791 <include>src/test/java/**</include>
792 <include>pom.xml</include>
794 <skipExistingHeaders>false</skipExistingHeaders>
802 <groupId>org.springframework.boot</groupId>
803 <artifactId>spring-boot-maven-plugin</artifactId>
806 <groupId>org.apache.maven.plugins</groupId>
807 <artifactId>maven-clean-plugin</artifactId>
808 <version>2.4.1</version>
812 <directory>${project.basedir}/src/main/resources/schema</directory>
814 <include>**/*</include>
816 <followSymlinks>false</followSymlinks>
822 <groupId>org.codehaus.groovy.maven</groupId>
823 <artifactId>gmaven-plugin</artifactId>
826 <groupId>org.apache.maven.plugins</groupId>
827 <artifactId>maven-dependency-plugin</artifactId>
828 <version>2.10</version>
831 <groupId>org.apache.maven.plugins</groupId>
832 <artifactId>maven-javadoc-plugin</artifactId>
835 <artifactId>maven-assembly-plugin</artifactId>
838 <descriptor>src/main/assembly/descriptor.xml</descriptor>
843 <id>make-assembly</id> <!-- this is used for inheritance merges -->
844 <phase>package</phase> <!-- bind to the packaging phase -->
852 <groupId>org.apache.maven.plugins</groupId>
853 <artifactId>maven-surefire-plugin</artifactId>
855 <runOrder>alphabetical</runOrder>
859 <groupId>com.mycila</groupId>
860 <artifactId>license-maven-plugin</artifactId>
863 <groupId>org.apache.maven.plugins</groupId>
864 <artifactId>maven-deploy-plugin</artifactId>
867 <groupId>org.springframework.boot</groupId>
868 <artifactId>spring-boot-maven-plugin</artifactId>
870 <mainClass>${start-class}</mainClass>
876 <goal>repackage</goal>
882 <groupId>org.jacoco</groupId>
883 <artifactId>jacoco-maven-plugin</artifactId>
884 <configuration combine.children="append">
886 <exclude>**/*WebSecurityConfig.*</exclude>
895 <groupId>org.apache.maven.plugins</groupId>
896 <artifactId>maven-javadoc-plugin</artifactId>
897 <version>2.10.4</version>
899 <failOnError>false</failOnError>
900 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
902 <groupId>org.umlgraph</groupId>
903 <artifactId>umlgraph</artifactId>
904 <version>5.6</version>
906 <additionalparam>-views</additionalparam>
907 <useStandardDocletOptions>true</useStandardDocletOptions>