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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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.schema-service</groupId>
27 <artifactId>aai-schema-service</artifactId>
28 <version>1.6.1-SNAPSHOT</version>
30 <groupId>org.onap.aai.schema-service</groupId>
31 <artifactId>schema-service</artifactId>
32 <version>1.6.1-SNAPSHOT</version>
35 <java.version>1.8</java.version>
36 <start-class>org.onap.aai.schemaservice.SchemaServiceApp</start-class>
38 <aai.core.version>1.5.3</aai.core.version>
40 <spring.boot.version>1.5.21.RELEASE</spring.boot.version>
42 <!-- Start of the jacoco plugin properties -->
43 <sonar.language>java</sonar.language>
44 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
45 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
46 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
47 <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
48 <sonar.projectVersion>${project.version}</sonar.projectVersion>
49 <!-- End of the jacoco plugin properties -->
51 <!-- Start of Application Dependencies -->
52 <eelf.core.version>1.0.0</eelf.core.version>
53 <logback.version>1.2.3</logback.version>
54 <hamcrest.junit.version>2.0.0.0</hamcrest.junit.version>
55 <junit.version>4.12</junit.version>
56 <google.guava.version>16.0.1</google.guava.version>
57 <janusgraph.version>0.2.3</janusgraph.version>
58 <mockito.version>1.10.19</mockito.version>
59 <powermock.version>1.6.2</powermock.version>
60 <jaxb.version>2.2.11</jaxb.version>
61 <eclipse.persistence.version>2.6.2</eclipse.persistence.version>
62 <!-- End of Application Dependencies -->
64 <docker.fabric.version>0.28.0</docker.fabric.version>
65 <!-- Default docker registry that maven fabric plugin will try to pull from -->
66 <docker.registry>docker.io</docker.registry>
67 <!-- Specifying the docker push registry where the image should be pushed -->
68 <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
69 <docker.push.registry>localhost:5000</docker.push.registry>
70 <aai.docker.version>1.0.0</aai.docker.version>
73 Location where assembly of our scripts, resources and main jar will be held
74 Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
76 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
77 </aai.build.directory>
78 <aai.docker.namespace>onap</aai.docker.namespace>
79 <aai.base.image>alpine</aai.base.image>
80 <aai.base.image.version>1.6.0</aai.base.image.version>
82 <maven.skip.tests>true</maven.skip.tests>
84 <jacoco.line.coverage.limit>0.44</jacoco.line.coverage.limit>
86 <!-- This will be used for the docker images as the default format of maven build has issues -->
87 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
88 <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
90 <!-- Start of Default ONAP Schema Properties -->
91 <schema.source.name>onap</schema.source.name>
92 <schema.configuration.location>N/A</schema.configuration.location>
93 <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm
94 </schema.nodes.location>
95 <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules
96 </schema.edges.location>
97 <schema.version.depth.start>v10</schema.version.depth.start>
98 <schema.version.related.link.start>v10</schema.version.related.link.start>
99 <schema.version.app.root.start>v11</schema.version.app.root.start>
100 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
101 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
102 <schema.version.api.default>v16</schema.version.api.default>
103 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
104 <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
105 <!-- End of Default ONAP Schema Properties -->
107 <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
110 <!-- Docker profile to be used for building docker image and pushing to nexus -->
116 <groupId>org.codehaus.groovy.maven</groupId>
117 <artifactId>gmaven-plugin</artifactId>
120 <phase>pre-clean</phase>
124 <phase>pre-clean</phase>
130 def userAaiBaseImage = session.userProperties['aai.base.image'];
131 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
132 if (userAaiCommonVersion != null) {
133 project.properties['aai.base.image.version'] = userAaiCommonVersion;
135 if (userAaiBaseImage != null) {
136 project.properties['aai.base.image'] = userAaiBaseImage;
138 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
139 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
146 <groupId>io.fabric8</groupId>
147 <artifactId>docker-maven-plugin</artifactId>
148 <version>${docker.fabric.version}</version>
150 <verbose>true</verbose>
151 <apiVersion>1.23</apiVersion>
154 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
159 <tag>${project.docker.latesttag.version}</tag>
160 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
162 <cleanup>try</cleanup>
163 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
168 <directory>${aai.build.directory}</directory>
169 <outputDirectory>/${project.artifactId}</outputDirectory>
180 <id>clean-images</id>
181 <phase>pre-clean</phase>
186 <removeAll>true</removeAll>
190 <id>generate-images</id>
191 <phase>package</phase>
198 <phase>deploy</phase>
208 <!-- Start of ONAP Profile -->
212 <schema.source.name>onap</schema.source.name>
213 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
214 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
217 <!-- End of ONAP Profile -->
221 <skipTests>${maven.skip.tests}</skipTests>
224 <defaultGoal>pre-integration-test</defaultGoal>
227 <groupId>org.codehaus.mojo</groupId>
228 <artifactId>exec-maven-plugin</artifactId>
229 <version>1.6.0</version>
232 <id>run-spring-boot</id>
233 <phase>package</phase>
240 <mainClass>${start-class}</mainClass>
243 <key>schema.source.name</key>
244 <value>${schema.source.name}</value>
247 <key>schema.configuration.location</key>
248 <value>${schema.configuration.location}</value>
251 <key>schema.nodes.location</key>
252 <value>${schema.nodes.location}</value>
255 <key>schema.edges.location</key>
256 <value>${schema.edges.location}</value>
259 <key>schema.version.depth.start</key>
260 <value>${schema.version.depth.start}</value>
263 <key>schema.version.related.link.start</key>
264 <value>${schema.version.related.link.start}</value>
267 <key>schema.version.app.root.start</key>
268 <value>${schema.version.app.root.start}</value>
271 <key>schema.version.namespace.change.start</key>
272 <value>${schema.version.namespace.change.start}</value>
275 <key>schema.version.edge.label.start</key>
276 <value>${schema.version.edge.label.start}</value>
279 <key>schema.version.api.default</key>
280 <value>${schema.version.api.default}</value>
283 <key>schema.version.list</key>
284 <value>${schema.version.list}</value>
287 <key>schema.uri.base.path</key>
288 <value>${schema.uri.base.path}</value>
291 <executable>java</executable>
298 <dependencyManagement>
301 <groupId>org.springframework.boot</groupId>
302 <artifactId>spring-boot-starter-parent</artifactId>
303 <version>${spring.boot.version}</version>
305 <scope>import</scope>
308 </dependencyManagement>
311 <groupId>com.att.eelf</groupId>
312 <artifactId>eelf-core</artifactId>
313 <version>${eelf.core.version}</version>
316 <groupId>ch.qos.logback</groupId>
317 <artifactId>logback-core</artifactId>
318 <version>${logback.version}</version>
321 <groupId>ch.qos.logback</groupId>
322 <artifactId>logback-classic</artifactId>
323 <version>${logback.version}</version>
326 <groupId>ch.qos.logback</groupId>
327 <artifactId>logback-access</artifactId>
328 <version>${logback.version}</version>
331 <groupId>org.onap.aai.aai-common</groupId>
332 <artifactId>aai-core</artifactId>
333 <version>${aai.core.version}</version>
336 <groupId>com.sun.jersey</groupId>
337 <artifactId>jersey-core</artifactId>
340 <groupId>org.codehaus.jackson</groupId>
341 <artifactId>jackson-mapper-asl</artifactId>
344 <groupId>org.eclipse.jetty</groupId>
345 <artifactId>jetty-http</artifactId>
348 <groupId>org.eclipse.jetty</groupId>
349 <artifactId>jetty-server</artifactId>
352 <groupId>org.springframework</groupId>
353 <artifactId>spring-web</artifactId>
356 <groupId>org.onap.aai</groupId>
357 <artifactId>aai-schema-ingest</artifactId>
362 <groupId>org.hamcrest</groupId>
363 <artifactId>hamcrest-junit</artifactId>
364 <version>${hamcrest.junit.version}</version>
367 <groupId>junit</groupId>
368 <artifactId>junit</artifactId>
369 <version>${junit.version}</version>
373 <groupId>com.google.guava</groupId>
374 <artifactId>guava</artifactId>
375 <version>${google.guava.version}</version>
378 <groupId>com.fasterxml.jackson.jaxrs</groupId>
379 <artifactId>jackson-jaxrs-json-provider</artifactId>
382 <groupId>org.mockito</groupId>
383 <artifactId>mockito-all</artifactId>
384 <version>${mockito.version}</version>
388 <groupId>javax.xml.bind</groupId>
389 <artifactId>jaxb-api</artifactId>
390 <version>${jaxb.version}</version>
393 <groupId>com.sun.xml.bind</groupId>
394 <artifactId>jaxb-impl</artifactId>
395 <version>${jaxb.version}</version>
398 <groupId>com.sun.xml.bind</groupId>
399 <artifactId>jaxb-core</artifactId>
400 <version>${jaxb.version}</version>
403 <groupId>com.sun.xml.bind</groupId>
404 <artifactId>jaxb-xjc</artifactId>
405 <version>${jaxb.version}</version>
408 <groupId>org.eclipse.persistence</groupId>
409 <artifactId>eclipselink</artifactId>
410 <version>${eclipse.persistence.version}</version>
413 <groupId>org.eclipse.persistence</groupId>
414 <artifactId>org.eclipse.persistence.moxy</artifactId>
415 <version>${eclipse.persistence.version}</version>
416 <scope>compile</scope>
419 <groupId>org.springframework.boot</groupId>
420 <artifactId>spring-boot-starter-web</artifactId>
423 <groupId>org.springframework.boot</groupId>
424 <artifactId>spring-boot-starter-tomcat</artifactId>
429 <groupId>org.springframework.boot</groupId>
430 <artifactId>spring-boot-starter-jetty</artifactId>
433 <groupId>org.springframework.boot</groupId>
434 <artifactId>spring-boot-starter-jersey</artifactId>
437 <groupId>org.springframework.boot</groupId>
438 <artifactId>spring-boot-starter-aop</artifactId>
441 <groupId>org.springframework.boot</groupId>
442 <artifactId>spring-boot-test</artifactId>
446 <groupId>org.springframework</groupId>
447 <artifactId>spring-test</artifactId>
451 <groupId>org.mockito</groupId>
452 <artifactId>mockito-all</artifactId>
453 <version>${mockito.version}</version>
457 <groupId>org.hamcrest</groupId>
458 <artifactId>hamcrest-junit</artifactId>
459 <version>${hamcrest.junit.version}</version>
465 <directory>${project.basedir}/src/main/swm</directory>
466 <targetPath>${project.build.directory}/swm</targetPath>
467 <filtering>false</filtering>
470 <directory>${project.basedir}/src/main/resources</directory>
472 <include>application.properties</include>
473 <include>dme2.properties</include>
474 <include>logback.xml</include>
475 <include>localhost-access-logback.xml</include>
477 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
478 <filtering>false</filtering>
481 <directory>${project.basedir}/src/main/resources</directory>
483 <include>**/*</include>
485 <filtering>true</filtering>
488 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
490 <include>aaiconfig.properties</include>
492 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
493 <filtering>false</filtering>
496 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
498 <include>aai-client-cert.p12</include>
499 <include>tomcat_keystore</include>
500 <include>aai_policy.json</include>
502 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
503 <filtering>true</filtering>
506 <directory>${project.basedir}/src/main/resources/</directory>
508 <include>logback.xml</include>
509 <include>localhost-access-logback.xml</include>
510 <include>hbase-site.xml</include>
512 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
513 <filtering>true</filtering>
516 <directory>${project.basedir}/src/main/docker</directory>
518 <include>**/*</include>
520 <targetPath>${aai.build.directory}</targetPath>
521 <filtering>true</filtering>
524 <directory>${project.build.directory}/</directory>
526 <include>${project.artifactId}-${project.version}.jar</include>
528 <targetPath>${aai.build.directory}/lib/</targetPath>
529 <filtering>false</filtering>
535 <groupId>org.codehaus.groovy.maven</groupId>
536 <artifactId>gmaven-plugin</artifactId>
537 <version>1.0</version>
540 <phase>validate</phase>
546 println project.properties['aai.project.version'];
548 if (project.properties['aai.project.version'] != null) {
549 versionArray = project.properties['aai.project.version'].split('\\.');
552 project.properties["project.major.version"] = versionArray[0];
553 project.properties["project.minor.version"] = versionArray[1];
554 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
555 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
565 <groupId>org.springframework.boot</groupId>
566 <artifactId>spring-boot-maven-plugin</artifactId>
569 <groupId>org.apache.maven.plugins</groupId>
570 <artifactId>maven-clean-plugin</artifactId>
571 <version>2.4.1</version>
575 <directory>${project.basedir}/src/main/resources/schema</directory>
577 <include>**/*</include>
579 <followSymlinks>false</followSymlinks>
585 <groupId>org.codehaus.groovy.maven</groupId>
586 <artifactId>gmaven-plugin</artifactId>
589 <groupId>org.apache.maven.plugins</groupId>
590 <artifactId>maven-dependency-plugin</artifactId>
591 <version>2.10</version>
594 <groupId>org.apache.maven.plugins</groupId>
595 <artifactId>maven-javadoc-plugin</artifactId>
596 <version>${javadoc.plugin.version}</version>
599 <artifactId>maven-assembly-plugin</artifactId>
602 <descriptor>src/main/assembly/descriptor.xml</descriptor>
607 <id>make-assembly</id> <!-- this is used for inheritance merges -->
608 <phase>package</phase> <!-- bind to the packaging phase -->
616 <artifactId>maven-resources-plugin</artifactId>
617 <version>2.7</version>
620 <id>copy-oxm-edgerules-project</id>
621 <phase>initialize</phase>
623 <goal>copy-resources</goal>
626 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
629 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
631 <include>**/oxm/**/*.xml</include>
632 <include>**/dbedgerules/**/*.json</include>
639 <id>copy-queries-project</id>
640 <phase>initialize</phase>
642 <goal>copy-resources</goal>
645 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
648 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
650 <include>**/query/**/*.json</include>
657 <id>copy-oxm-edgerules</id>
658 <phase>initialize</phase>
660 <goal>copy-resources</goal>
663 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
666 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
668 <include>**/oxm/**/*.xml</include>
669 <include>**/dbedgerules/**/*.json</include>
676 <id>copy-queries</id>
677 <phase>initialize</phase>
679 <goal>copy-resources</goal>
682 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
685 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
687 <include>**/query/**/*.json</include>
696 <groupId>org.apache.maven.plugins</groupId>
697 <artifactId>maven-surefire-plugin</artifactId>
698 <version>2.12.4</version>
700 <argLine>-noverify ${argLine}</argLine>
701 <runOrder>alphabetical</runOrder>
705 <groupId>com.mycila</groupId>
706 <artifactId>license-maven-plugin</artifactId>
709 <groupId>org.codehaus.mojo</groupId>
710 <artifactId>sonar-maven-plugin</artifactId>
711 <version>3.3</version>
714 <groupId>org.jacoco</groupId>
715 <artifactId>jacoco-maven-plugin</artifactId>
716 <version>0.7.9</version>
718 <dumpOnExit>true</dumpOnExit>
720 <exclude>**/**/models/**/*.class</exclude>
725 <id>jacoco-initialize-unit-tests</id>
727 <goal>prepare-agent</goal>
730 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
731 <!-- <append>true</append> -->
735 <id>post-unit-test</id>
741 <!-- Sets the path to the file which contains the execution data. -->
742 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
743 <!-- Sets the output directory for the code coverage report. -->
744 <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
748 <id>default-check</id>
753 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
755 <!-- implementation is needed only for Maven 2 -->
756 <rule implementation="org.jacoco.maven.RuleConfiguration">
757 <element>BUNDLE</element>
759 <limit implementation="org.jacoco.report.check.Limit">
760 <counter>LINE</counter>
761 <value>COVEREDRATIO</value>
762 <minimum>${jacoco.line.coverage.limit}</minimum>
772 <groupId>org.apache.maven.plugins</groupId>
773 <artifactId>maven-deploy-plugin</artifactId>
777 <groupId>org.springframework.boot</groupId>
778 <artifactId>spring-boot-maven-plugin</artifactId>
779 <version>${spring.boot.version}</version>
781 <mainClass>${start-class}</mainClass>
787 <goal>repackage</goal>
793 <groupId>org.apache.maven.plugins</groupId>
794 <artifactId>maven-clean-plugin</artifactId>
795 <version>2.4.1</version>
799 <directory>${project.basedir}/src/main/resources/schema</directory>
801 <include>**/*</include>
803 <followSymlinks>false</followSymlinks>
813 <groupId>org.apache.maven.plugins</groupId>
814 <artifactId>maven-javadoc-plugin</artifactId>
815 <version>2.10.4</version>
817 <failOnError>false</failOnError>
818 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
820 <groupId>org.umlgraph</groupId>
821 <artifactId>umlgraph</artifactId>
822 <version>5.6</version>
824 <additionalparam>-views</additionalparam>
825 <useStandardDocletOptions>true</useStandardDocletOptions>