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.5.1-SNAPSHOT</version>
30 <groupId>org.onap.aai.schema-service</groupId>
31 <artifactId>schema-service</artifactId>
32 <version>1.5.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.23.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>
80 <maven.skip.tests>true</maven.skip.tests>
82 <jacoco.line.coverage.limit>0.44</jacoco.line.coverage.limit>
84 <!-- This will be used for the docker images as the default format of maven build has issues -->
85 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
86 <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
88 <!-- Start of Default ONAP Schema Properties -->
89 <schema.source.name>onap</schema.source.name>
90 <schema.configuration.location>N/A</schema.configuration.location>
91 <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm</schema.nodes.location>
92 <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules</schema.edges.location>
93 <schema.version.depth.start>v10</schema.version.depth.start>
94 <schema.version.related.link.start>v10</schema.version.related.link.start>
95 <schema.version.app.root.start>v11</schema.version.app.root.start>
96 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
97 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
98 <schema.version.api.default>v16</schema.version.api.default>
99 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
100 <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
101 <!-- End of Default ONAP Schema Properties -->
103 <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
106 <!-- Docker profile to be used for building docker image and pushing to nexus -->
112 <groupId>io.fabric8</groupId>
113 <artifactId>docker-maven-plugin</artifactId>
114 <version>${docker.fabric.version}</version>
116 <verbose>true</verbose>
117 <apiVersion>1.23</apiVersion>
120 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
125 <tag>${project.docker.latesttag.version}</tag>
126 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
128 <cleanup>try</cleanup>
129 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
134 <directory>${aai.build.directory}</directory>
135 <outputDirectory>/${project.artifactId}</outputDirectory>
146 <id>clean-images</id>
147 <phase>pre-clean</phase>
152 <removeAll>true</removeAll>
156 <id>generate-images</id>
157 <phase>package</phase>
164 <phase>deploy</phase>
174 <!-- Start of ONAP Profile -->
178 <schema.source.name>onap</schema.source.name>
179 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
180 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
183 <!-- End of ONAP Profile -->
187 <skipTests>${maven.skip.tests}</skipTests>
190 <defaultGoal>pre-integration-test</defaultGoal>
193 <groupId>org.codehaus.mojo</groupId>
194 <artifactId>exec-maven-plugin</artifactId>
195 <version>1.6.0</version>
198 <id>run-spring-boot</id>
199 <phase>package</phase>
206 <mainClass>${start-class}</mainClass>
209 <key>schema.source.name</key>
210 <value>${schema.source.name}</value>
213 <key>schema.configuration.location</key>
214 <value>${schema.configuration.location}</value>
217 <key>schema.nodes.location</key>
218 <value>${schema.nodes.location}</value>
221 <key>schema.edges.location</key>
222 <value>${schema.edges.location}</value>
225 <key>schema.version.depth.start</key>
226 <value>${schema.version.depth.start}</value>
229 <key>schema.version.related.link.start</key>
230 <value>${schema.version.related.link.start}</value>
233 <key>schema.version.app.root.start</key>
234 <value>${schema.version.app.root.start}</value>
237 <key>schema.version.namespace.change.start</key>
238 <value>${schema.version.namespace.change.start}</value>
241 <key>schema.version.edge.label.start</key>
242 <value>${schema.version.edge.label.start}</value>
245 <key>schema.version.api.default</key>
246 <value>${schema.version.api.default}</value>
249 <key>schema.version.list</key>
250 <value>${schema.version.list}</value>
253 <key>schema.uri.base.path</key>
254 <value>${schema.uri.base.path}</value>
257 <executable>java</executable>
264 <dependencyManagement>
267 <groupId>org.springframework.boot</groupId>
268 <artifactId>spring-boot-starter-parent</artifactId>
269 <version>${spring.boot.version}</version>
271 <scope>import</scope>
274 </dependencyManagement>
277 <groupId>com.att.eelf</groupId>
278 <artifactId>eelf-core</artifactId>
279 <version>${eelf.core.version}</version>
282 <groupId>ch.qos.logback</groupId>
283 <artifactId>logback-core</artifactId>
284 <version>${logback.version}</version>
287 <groupId>ch.qos.logback</groupId>
288 <artifactId>logback-classic</artifactId>
289 <version>${logback.version}</version>
292 <groupId>ch.qos.logback</groupId>
293 <artifactId>logback-access</artifactId>
294 <version>${logback.version}</version>
297 <groupId>org.onap.aai.aai-common</groupId>
298 <artifactId>aai-core</artifactId>
299 <version>${aai.core.version}</version>
302 <groupId>com.sun.jersey</groupId>
303 <artifactId>jersey-core</artifactId>
306 <groupId>org.codehaus.jackson</groupId>
307 <artifactId>jackson-mapper-asl</artifactId>
310 <groupId>org.eclipse.jetty</groupId>
311 <artifactId>jetty-http</artifactId>
314 <groupId>org.eclipse.jetty</groupId>
315 <artifactId>jetty-server</artifactId>
318 <groupId>org.springframework</groupId>
319 <artifactId>spring-web</artifactId>
322 <groupId>org.onap.aai</groupId>
323 <artifactId>aai-schema-ingest</artifactId>
328 <groupId>org.hamcrest</groupId>
329 <artifactId>hamcrest-junit</artifactId>
330 <version>${hamcrest.junit.version}</version>
333 <groupId>junit</groupId>
334 <artifactId>junit</artifactId>
335 <version>${junit.version}</version>
339 <groupId>com.google.guava</groupId>
340 <artifactId>guava</artifactId>
341 <version>${google.guava.version}</version>
344 <groupId>com.fasterxml.jackson.jaxrs</groupId>
345 <artifactId>jackson-jaxrs-json-provider</artifactId>
348 <groupId>org.mockito</groupId>
349 <artifactId>mockito-all</artifactId>
350 <version>${mockito.version}</version>
354 <groupId>javax.xml.bind</groupId>
355 <artifactId>jaxb-api</artifactId>
356 <version>${jaxb.version}</version>
359 <groupId>com.sun.xml.bind</groupId>
360 <artifactId>jaxb-impl</artifactId>
361 <version>${jaxb.version}</version>
364 <groupId>com.sun.xml.bind</groupId>
365 <artifactId>jaxb-core</artifactId>
366 <version>${jaxb.version}</version>
369 <groupId>com.sun.xml.bind</groupId>
370 <artifactId>jaxb-xjc</artifactId>
371 <version>${jaxb.version}</version>
374 <groupId>org.eclipse.persistence</groupId>
375 <artifactId>eclipselink</artifactId>
376 <version>${eclipse.persistence.version}</version>
379 <groupId>org.eclipse.persistence</groupId>
380 <artifactId>org.eclipse.persistence.moxy</artifactId>
381 <version>${eclipse.persistence.version}</version>
382 <scope>compile</scope>
385 <groupId>org.springframework.boot</groupId>
386 <artifactId>spring-boot-starter-web</artifactId>
389 <groupId>org.springframework.boot</groupId>
390 <artifactId>spring-boot-starter-tomcat</artifactId>
395 <groupId>org.springframework.boot</groupId>
396 <artifactId>spring-boot-starter-jetty</artifactId>
399 <groupId>org.springframework.boot</groupId>
400 <artifactId>spring-boot-starter-jersey</artifactId>
403 <groupId>org.springframework.boot</groupId>
404 <artifactId>spring-boot-starter-aop</artifactId>
407 <groupId>org.springframework.boot</groupId>
408 <artifactId>spring-boot-test</artifactId>
412 <groupId>org.springframework</groupId>
413 <artifactId>spring-test</artifactId>
417 <groupId>org.mockito</groupId>
418 <artifactId>mockito-all</artifactId>
419 <version>${mockito.version}</version>
423 <groupId>org.hamcrest</groupId>
424 <artifactId>hamcrest-junit</artifactId>
425 <version>${hamcrest.junit.version}</version>
431 <directory>${project.basedir}/src/main/swm</directory>
432 <targetPath>${project.build.directory}/swm</targetPath>
433 <filtering>false</filtering>
436 <directory>${project.basedir}/src/main/resources</directory>
438 <include>application.properties</include>
439 <include>dme2.properties</include>
440 <include>logback.xml</include>
441 <include>localhost-access-logback.xml</include>
443 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
444 <filtering>false</filtering>
447 <directory>${project.basedir}/src/main/resources</directory>
449 <include>**/*</include>
451 <filtering>true</filtering>
454 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
456 <include>aaiconfig.properties</include>
458 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
459 <filtering>false</filtering>
462 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
464 <include>aai-client-cert.p12</include>
465 <include>tomcat_keystore</include>
466 <include>aai_policy.json</include>
468 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
469 <filtering>true</filtering>
472 <directory>${project.basedir}/src/main/resources/</directory>
474 <include>logback.xml</include>
475 <include>localhost-access-logback.xml</include>
476 <include>hbase-site.xml</include>
478 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
479 <filtering>true</filtering>
482 <directory>${project.basedir}/src/main/docker</directory>
484 <include>**/*</include>
486 <targetPath>${aai.build.directory}</targetPath>
487 <filtering>true</filtering>
490 <directory>${project.build.directory}/</directory>
492 <include>${project.artifactId}-${project.version}.jar</include>
494 <targetPath>${aai.build.directory}/lib/</targetPath>
495 <filtering>false</filtering>
501 <groupId>org.codehaus.groovy.maven</groupId>
502 <artifactId>gmaven-plugin</artifactId>
503 <version>1.0</version>
506 <phase>validate</phase>
512 println project.properties['aai.project.version'];
514 if (project.properties['aai.project.version'] != null) {
515 versionArray = project.properties['aai.project.version'].split('\\.');
518 project.properties["project.major.version"] = versionArray[0];
519 project.properties["project.minor.version"] = versionArray[1];
520 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
521 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
531 <groupId>org.springframework.boot</groupId>
532 <artifactId>spring-boot-maven-plugin</artifactId>
535 <groupId>org.apache.maven.plugins</groupId>
536 <artifactId>maven-clean-plugin</artifactId>
537 <version>2.4.1</version>
541 <directory>${project.basedir}/src/main/resources/schema</directory>
543 <include>**/*</include>
545 <followSymlinks>false</followSymlinks>
551 <groupId>org.codehaus.groovy.maven</groupId>
552 <artifactId>gmaven-plugin</artifactId>
555 <groupId>org.apache.maven.plugins</groupId>
556 <artifactId>maven-dependency-plugin</artifactId>
557 <version>2.10</version>
560 <groupId>org.apache.maven.plugins</groupId>
561 <artifactId>maven-javadoc-plugin</artifactId>
562 <version>${javadoc.plugin.version}</version>
565 <artifactId>maven-assembly-plugin</artifactId>
568 <descriptor>src/main/assembly/descriptor.xml</descriptor>
573 <id>make-assembly</id> <!-- this is used for inheritance merges -->
574 <phase>package</phase> <!-- bind to the packaging phase -->
582 <artifactId>maven-resources-plugin</artifactId>
583 <version>2.7</version>
586 <id>copy-oxm-edgerules-project</id>
587 <phase>initialize</phase>
589 <goal>copy-resources</goal>
592 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
595 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
597 <include>**/oxm/**/*.xml</include>
598 <include>**/dbedgerules/**/*.json</include>
605 <id>copy-queries-project</id>
606 <phase>initialize</phase>
608 <goal>copy-resources</goal>
611 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
614 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
616 <include>**/query/**/*.json</include>
623 <id>copy-oxm-edgerules</id>
624 <phase>initialize</phase>
626 <goal>copy-resources</goal>
629 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
632 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
634 <include>**/oxm/**/*.xml</include>
635 <include>**/dbedgerules/**/*.json</include>
642 <id>copy-queries</id>
643 <phase>initialize</phase>
645 <goal>copy-resources</goal>
648 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
651 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
653 <include>**/query/**/*.json</include>
662 <groupId>org.apache.maven.plugins</groupId>
663 <artifactId>maven-surefire-plugin</artifactId>
664 <version>2.12.4</version>
666 <argLine>-noverify ${argLine}</argLine>
667 <runOrder>alphabetical</runOrder>
671 <groupId>com.mycila</groupId>
672 <artifactId>license-maven-plugin</artifactId>
675 <groupId>org.codehaus.mojo</groupId>
676 <artifactId>sonar-maven-plugin</artifactId>
677 <version>3.3</version>
680 <groupId>org.jacoco</groupId>
681 <artifactId>jacoco-maven-plugin</artifactId>
682 <version>0.7.9</version>
684 <dumpOnExit>true</dumpOnExit>
686 <exclude>**/**/models/**/*.class</exclude>
691 <id>jacoco-initialize-unit-tests</id>
693 <goal>prepare-agent</goal>
696 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
697 <!-- <append>true</append> -->
701 <id>post-unit-test</id>
707 <!-- Sets the path to the file which contains the execution data. -->
708 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
709 <!-- Sets the output directory for the code coverage report. -->
710 <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
714 <id>default-check</id>
719 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
721 <!-- implementation is needed only for Maven 2 -->
722 <rule implementation="org.jacoco.maven.RuleConfiguration">
723 <element>BUNDLE</element>
725 <limit implementation="org.jacoco.report.check.Limit">
726 <counter>LINE</counter>
727 <value>COVEREDRATIO</value>
728 <minimum>${jacoco.line.coverage.limit}</minimum>
738 <groupId>org.apache.maven.plugins</groupId>
739 <artifactId>maven-deploy-plugin</artifactId>
743 <groupId>org.springframework.boot</groupId>
744 <artifactId>spring-boot-maven-plugin</artifactId>
745 <version>${spring.boot.version}</version>
747 <mainClass>${start-class}</mainClass>
753 <goal>repackage</goal>
759 <groupId>org.apache.maven.plugins</groupId>
760 <artifactId>maven-clean-plugin</artifactId>
761 <version>2.4.1</version>
765 <directory>${project.basedir}/src/main/resources/schema</directory>
767 <include>**/*</include>
769 <followSymlinks>false</followSymlinks>
779 <groupId>org.apache.maven.plugins</groupId>
780 <artifactId>maven-javadoc-plugin</artifactId>
781 <version>2.10.4</version>
783 <failOnError>false</failOnError>
784 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
786 <groupId>org.umlgraph</groupId>
787 <artifactId>umlgraph</artifactId>
788 <version>5.6</version>
790 <additionalparam>-views</additionalparam>
791 <useStandardDocletOptions>true</useStandardDocletOptions>