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.0.7-SNAPSHOT</version>
30 <groupId>org.onap.aai.schema-service</groupId>
31 <artifactId>schema-service</artifactId>
32 <version>1.0.7-SNAPSHOT</version>
35 <java.version>1.8</java.version>
36 <start-class>org.onap.aai.schemaservice.SchemaServiceApp</start-class>
38 <aai.core.version>1.4.0</aai.core.version>
40 <spring.boot.version>1.5.20.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.0</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>
72 Location where assembly of our scripts, resources and main jar will be held
73 Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
75 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
76 </aai.build.directory>
77 <aai.docker.namespace>onap</aai.docker.namespace>
79 <maven.skip.tests>true</maven.skip.tests>
81 <jacoco.line.coverage.limit>0.44</jacoco.line.coverage.limit>
83 <!-- This will be used for the docker images as the default format of maven build has issues -->
84 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
85 <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
87 <!-- Start of Default ONAP Schema Properties -->
88 <schema.source.name>onap</schema.source.name>
89 <schema.configuration.location>N/A</schema.configuration.location>
90 <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm</schema.nodes.location>
91 <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules</schema.edges.location>
92 <schema.version.depth.start>v10</schema.version.depth.start>
93 <schema.version.related.link.start>v10</schema.version.related.link.start>
94 <schema.version.app.root.start>v11</schema.version.app.root.start>
95 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
96 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
97 <schema.version.api.default>v16</schema.version.api.default>
98 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
99 <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
100 <!-- End of Default ONAP Schema Properties -->
102 <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
105 <!-- Docker profile to be used for building docker image and pushing to nexus -->
111 <groupId>io.fabric8</groupId>
112 <artifactId>docker-maven-plugin</artifactId>
113 <version>${docker.fabric.version}</version>
115 <verbose>true</verbose>
116 <apiVersion>1.23</apiVersion>
119 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
124 <tag>${project.docker.latesttag.version}</tag>
125 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
127 <cleanup>try</cleanup>
128 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
133 <directory>${aai.build.directory}</directory>
134 <outputDirectory>/${project.artifactId}</outputDirectory>
145 <id>clean-images</id>
146 <phase>pre-clean</phase>
151 <removeAll>true</removeAll>
155 <id>generate-images</id>
156 <phase>package</phase>
163 <phase>deploy</phase>
173 <!-- Start of ONAP Profile -->
177 <schema.source.name>onap</schema.source.name>
178 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
179 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
182 <!-- End of ONAP Profile -->
186 <skipTests>${maven.skip.tests}</skipTests>
189 <defaultGoal>pre-integration-test</defaultGoal>
192 <groupId>org.codehaus.mojo</groupId>
193 <artifactId>exec-maven-plugin</artifactId>
194 <version>1.6.0</version>
197 <id>run-spring-boot</id>
198 <phase>package</phase>
205 <mainClass>${start-class}</mainClass>
208 <key>schema.source.name</key>
209 <value>${schema.source.name}</value>
212 <key>schema.configuration.location</key>
213 <value>${schema.configuration.location}</value>
216 <key>schema.nodes.location</key>
217 <value>${schema.nodes.location}</value>
220 <key>schema.edges.location</key>
221 <value>${schema.edges.location}</value>
224 <key>schema.version.depth.start</key>
225 <value>${schema.version.depth.start}</value>
228 <key>schema.version.related.link.start</key>
229 <value>${schema.version.related.link.start}</value>
232 <key>schema.version.app.root.start</key>
233 <value>${schema.version.app.root.start}</value>
236 <key>schema.version.namespace.change.start</key>
237 <value>${schema.version.namespace.change.start}</value>
240 <key>schema.version.edge.label.start</key>
241 <value>${schema.version.edge.label.start}</value>
244 <key>schema.version.api.default</key>
245 <value>${schema.version.api.default}</value>
248 <key>schema.version.list</key>
249 <value>${schema.version.list}</value>
252 <key>schema.uri.base.path</key>
253 <value>${schema.uri.base.path}</value>
256 <executable>java</executable>
263 <dependencyManagement>
266 <groupId>org.springframework.boot</groupId>
267 <artifactId>spring-boot-starter-parent</artifactId>
268 <version>${spring.boot.version}</version>
270 <scope>import</scope>
273 </dependencyManagement>
276 <groupId>com.att.eelf</groupId>
277 <artifactId>eelf-core</artifactId>
278 <version>${eelf.core.version}</version>
281 <groupId>ch.qos.logback</groupId>
282 <artifactId>logback-core</artifactId>
283 <version>${logback.version}</version>
286 <groupId>ch.qos.logback</groupId>
287 <artifactId>logback-classic</artifactId>
288 <version>${logback.version}</version>
291 <groupId>ch.qos.logback</groupId>
292 <artifactId>logback-access</artifactId>
293 <version>${logback.version}</version>
296 <groupId>org.onap.aai.aai-common</groupId>
297 <artifactId>aai-core</artifactId>
298 <version>${aai.core.version}</version>
301 <groupId>com.sun.jersey</groupId>
302 <artifactId>jersey-core</artifactId>
305 <groupId>org.codehaus.jackson</groupId>
306 <artifactId>jackson-mapper-asl</artifactId>
309 <groupId>org.eclipse.jetty</groupId>
310 <artifactId>jetty-http</artifactId>
313 <groupId>org.eclipse.jetty</groupId>
314 <artifactId>jetty-server</artifactId>
317 <groupId>org.springframework</groupId>
318 <artifactId>spring-web</artifactId>
321 <groupId>org.onap.aai</groupId>
322 <artifactId>aai-schema-ingest</artifactId>
327 <groupId>org.hamcrest</groupId>
328 <artifactId>hamcrest-junit</artifactId>
329 <version>${hamcrest.junit.version}</version>
332 <groupId>junit</groupId>
333 <artifactId>junit</artifactId>
334 <version>${junit.version}</version>
338 <groupId>com.google.guava</groupId>
339 <artifactId>guava</artifactId>
340 <version>${google.guava.version}</version>
343 <groupId>com.fasterxml.jackson.jaxrs</groupId>
344 <artifactId>jackson-jaxrs-json-provider</artifactId>
347 <groupId>org.mockito</groupId>
348 <artifactId>mockito-all</artifactId>
349 <version>${mockito.version}</version>
353 <groupId>javax.xml.bind</groupId>
354 <artifactId>jaxb-api</artifactId>
355 <version>${jaxb.version}</version>
358 <groupId>com.sun.xml.bind</groupId>
359 <artifactId>jaxb-impl</artifactId>
360 <version>${jaxb.version}</version>
363 <groupId>com.sun.xml.bind</groupId>
364 <artifactId>jaxb-core</artifactId>
365 <version>${jaxb.version}</version>
368 <groupId>com.sun.xml.bind</groupId>
369 <artifactId>jaxb-xjc</artifactId>
370 <version>${jaxb.version}</version>
373 <groupId>org.eclipse.persistence</groupId>
374 <artifactId>eclipselink</artifactId>
375 <version>${eclipse.persistence.version}</version>
378 <groupId>org.eclipse.persistence</groupId>
379 <artifactId>org.eclipse.persistence.moxy</artifactId>
380 <version>${eclipse.persistence.version}</version>
381 <scope>compile</scope>
384 <groupId>org.springframework.boot</groupId>
385 <artifactId>spring-boot-starter-web</artifactId>
388 <groupId>org.springframework.boot</groupId>
389 <artifactId>spring-boot-starter-tomcat</artifactId>
394 <groupId>org.springframework.boot</groupId>
395 <artifactId>spring-boot-starter-jetty</artifactId>
398 <groupId>org.springframework.boot</groupId>
399 <artifactId>spring-boot-starter-jersey</artifactId>
402 <groupId>org.springframework.boot</groupId>
403 <artifactId>spring-boot-starter-aop</artifactId>
406 <groupId>org.springframework.boot</groupId>
407 <artifactId>spring-boot-test</artifactId>
411 <groupId>org.springframework</groupId>
412 <artifactId>spring-test</artifactId>
416 <groupId>org.mockito</groupId>
417 <artifactId>mockito-all</artifactId>
418 <version>${mockito.version}</version>
422 <groupId>org.hamcrest</groupId>
423 <artifactId>hamcrest-junit</artifactId>
424 <version>${hamcrest.junit.version}</version>
430 <directory>${project.basedir}/src/main/swm</directory>
431 <targetPath>${project.build.directory}/swm</targetPath>
432 <filtering>false</filtering>
435 <directory>${project.basedir}/src/main/resources</directory>
437 <include>application.properties</include>
438 <include>dme2.properties</include>
439 <include>logback.xml</include>
440 <include>localhost-access-logback.xml</include>
442 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
443 <filtering>false</filtering>
446 <directory>${project.basedir}/src/main/resources</directory>
448 <include>**/*</include>
450 <filtering>true</filtering>
453 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
455 <include>aaiconfig.properties</include>
457 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
458 <filtering>false</filtering>
461 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
463 <include>aai-client-cert.p12</include>
464 <include>tomcat_keystore</include>
465 <include>aai_policy.json</include>
467 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
468 <filtering>true</filtering>
471 <directory>${project.basedir}/src/main/resources/</directory>
473 <include>logback.xml</include>
474 <include>localhost-access-logback.xml</include>
475 <include>hbase-site.xml</include>
477 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
478 <filtering>true</filtering>
481 <directory>${project.basedir}/src/main/docker</directory>
483 <include>**/*</include>
485 <targetPath>${aai.build.directory}</targetPath>
486 <filtering>true</filtering>
489 <directory>${project.build.directory}/</directory>
491 <include>${project.artifactId}-${project.version}.jar</include>
493 <targetPath>${aai.build.directory}/lib/</targetPath>
494 <filtering>false</filtering>
500 <groupId>org.codehaus.groovy.maven</groupId>
501 <artifactId>gmaven-plugin</artifactId>
502 <version>1.0</version>
505 <phase>validate</phase>
511 println project.properties['aai.project.version'];
513 if (project.properties['aai.project.version'] != null) {
514 versionArray = project.properties['aai.project.version'].split('\\.');
517 project.properties["project.major.version"] = versionArray[0];
518 project.properties["project.minor.version"] = versionArray[1];
519 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
520 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
530 <groupId>org.springframework.boot</groupId>
531 <artifactId>spring-boot-maven-plugin</artifactId>
534 <groupId>org.apache.maven.plugins</groupId>
535 <artifactId>maven-clean-plugin</artifactId>
536 <version>2.4.1</version>
540 <directory>${project.basedir}/src/main/resources/schema</directory>
542 <include>**/*</include>
544 <followSymlinks>false</followSymlinks>
550 <groupId>org.codehaus.groovy.maven</groupId>
551 <artifactId>gmaven-plugin</artifactId>
554 <groupId>org.apache.maven.plugins</groupId>
555 <artifactId>maven-dependency-plugin</artifactId>
556 <version>2.10</version>
559 <groupId>org.apache.maven.plugins</groupId>
560 <artifactId>maven-javadoc-plugin</artifactId>
561 <version>${javadoc.plugin.version}</version>
564 <artifactId>maven-assembly-plugin</artifactId>
567 <descriptor>src/main/assembly/descriptor.xml</descriptor>
572 <id>make-assembly</id> <!-- this is used for inheritance merges -->
573 <phase>package</phase> <!-- bind to the packaging phase -->
581 <artifactId>maven-resources-plugin</artifactId>
582 <version>2.7</version>
585 <id>copy-oxm-edgerules-project</id>
586 <phase>initialize</phase>
588 <goal>copy-resources</goal>
591 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
594 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
596 <include>**/oxm/**/*.xml</include>
597 <include>**/dbedgerules/**/*.json</include>
604 <id>copy-queries-project</id>
605 <phase>initialize</phase>
607 <goal>copy-resources</goal>
610 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
613 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
615 <include>**/query/**/*.json</include>
622 <id>copy-oxm-edgerules</id>
623 <phase>initialize</phase>
625 <goal>copy-resources</goal>
628 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
631 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
633 <include>**/oxm/**/*.xml</include>
634 <include>**/dbedgerules/**/*.json</include>
641 <id>copy-queries</id>
642 <phase>initialize</phase>
644 <goal>copy-resources</goal>
647 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
650 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
652 <include>**/query/**/*.json</include>
661 <groupId>org.apache.maven.plugins</groupId>
662 <artifactId>maven-surefire-plugin</artifactId>
663 <version>2.12.4</version>
665 <argLine>-noverify ${argLine}</argLine>
666 <runOrder>alphabetical</runOrder>
670 <groupId>com.mycila</groupId>
671 <artifactId>license-maven-plugin</artifactId>
674 <groupId>org.codehaus.mojo</groupId>
675 <artifactId>sonar-maven-plugin</artifactId>
676 <version>3.3</version>
679 <groupId>org.jacoco</groupId>
680 <artifactId>jacoco-maven-plugin</artifactId>
681 <version>0.7.9</version>
683 <dumpOnExit>true</dumpOnExit>
685 <exclude>**/**/models/**/*.class</exclude>
690 <id>jacoco-initialize-unit-tests</id>
692 <goal>prepare-agent</goal>
695 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
696 <!-- <append>true</append> -->
700 <id>post-unit-test</id>
706 <!-- Sets the path to the file which contains the execution data. -->
707 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
708 <!-- Sets the output directory for the code coverage report. -->
709 <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
713 <id>default-check</id>
718 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
720 <!-- implementation is needed only for Maven 2 -->
721 <rule implementation="org.jacoco.maven.RuleConfiguration">
722 <element>BUNDLE</element>
724 <limit implementation="org.jacoco.report.check.Limit">
725 <counter>LINE</counter>
726 <value>COVEREDRATIO</value>
727 <minimum>${jacoco.line.coverage.limit}</minimum>
737 <groupId>org.apache.maven.plugins</groupId>
738 <artifactId>maven-deploy-plugin</artifactId>
741 <id>default-deploy</id>
747 <groupId>org.sonatype.plugins</groupId>
748 <artifactId>nexus-staging-maven-plugin</artifactId>
749 <version>1.6.7</version>
750 <extensions>true</extensions>
752 <nexusUrl>${nexusproxy}</nexusUrl>
753 <stagingProfileId>176c31dfe190a</stagingProfileId>
754 <serverId>ecomp-staging</serverId>
758 <groupId>org.springframework.boot</groupId>
759 <artifactId>spring-boot-maven-plugin</artifactId>
760 <version>${spring.boot.version}</version>
762 <mainClass>${start-class}</mainClass>
768 <goal>repackage</goal>
774 <groupId>org.apache.maven.plugins</groupId>
775 <artifactId>maven-clean-plugin</artifactId>
776 <version>2.4.1</version>
780 <directory>${project.basedir}/src/main/resources/schema</directory>
782 <include>**/*</include>
784 <followSymlinks>false</followSymlinks>
794 <groupId>org.apache.maven.plugins</groupId>
795 <artifactId>maven-javadoc-plugin</artifactId>
796 <version>2.10.4</version>
798 <failOnError>false</failOnError>
799 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
801 <groupId>org.umlgraph</groupId>
802 <artifactId>umlgraph</artifactId>
803 <version>5.6</version>
805 <additionalparam>-views</additionalparam>
806 <useStandardDocletOptions>true</useStandardDocletOptions>