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.0-SNAPSHOT</version>
30 <groupId>org.onap.aai.schema-service</groupId>
31 <artifactId>schema-service</artifactId>
32 <version>1.6.0-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</schema.nodes.location>
94 <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules</schema.edges.location>
95 <schema.version.depth.start>v10</schema.version.depth.start>
96 <schema.version.related.link.start>v10</schema.version.related.link.start>
97 <schema.version.app.root.start>v11</schema.version.app.root.start>
98 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
99 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
100 <schema.version.api.default>v16</schema.version.api.default>
101 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
102 <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
103 <!-- End of Default ONAP Schema Properties -->
105 <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
108 <!-- Docker profile to be used for building docker image and pushing to nexus -->
114 <groupId>org.codehaus.groovy.maven</groupId>
115 <artifactId>gmaven-plugin</artifactId>
116 <version>1.0</version>
119 <phase>prepare-package</phase>
125 def userAaiBaseImage = session.userProperties['aai.base.image'];
126 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
127 if (userAaiCommonVersion != null) {
128 project.properties['aai.base.image.version'] = userAaiCommonVersion;
130 if (userAaiBaseImage != null) {
131 project.properties['aai.base.image'] = userAaiBaseImage;
133 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
134 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
141 <groupId>io.fabric8</groupId>
142 <artifactId>docker-maven-plugin</artifactId>
143 <version>${docker.fabric.version}</version>
145 <verbose>true</verbose>
146 <apiVersion>1.23</apiVersion>
149 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
154 <tag>${project.docker.latesttag.version}</tag>
155 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
157 <cleanup>try</cleanup>
158 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
163 <directory>${aai.build.directory}</directory>
164 <outputDirectory>/${project.artifactId}</outputDirectory>
175 <id>clean-images</id>
176 <phase>pre-clean</phase>
181 <removeAll>true</removeAll>
185 <id>generate-images</id>
186 <phase>package</phase>
193 <phase>deploy</phase>
203 <!-- Start of ONAP Profile -->
207 <schema.source.name>onap</schema.source.name>
208 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
209 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
212 <!-- End of ONAP Profile -->
216 <skipTests>${maven.skip.tests}</skipTests>
219 <defaultGoal>pre-integration-test</defaultGoal>
222 <groupId>org.codehaus.mojo</groupId>
223 <artifactId>exec-maven-plugin</artifactId>
224 <version>1.6.0</version>
227 <id>run-spring-boot</id>
228 <phase>package</phase>
235 <mainClass>${start-class}</mainClass>
238 <key>schema.source.name</key>
239 <value>${schema.source.name}</value>
242 <key>schema.configuration.location</key>
243 <value>${schema.configuration.location}</value>
246 <key>schema.nodes.location</key>
247 <value>${schema.nodes.location}</value>
250 <key>schema.edges.location</key>
251 <value>${schema.edges.location}</value>
254 <key>schema.version.depth.start</key>
255 <value>${schema.version.depth.start}</value>
258 <key>schema.version.related.link.start</key>
259 <value>${schema.version.related.link.start}</value>
262 <key>schema.version.app.root.start</key>
263 <value>${schema.version.app.root.start}</value>
266 <key>schema.version.namespace.change.start</key>
267 <value>${schema.version.namespace.change.start}</value>
270 <key>schema.version.edge.label.start</key>
271 <value>${schema.version.edge.label.start}</value>
274 <key>schema.version.api.default</key>
275 <value>${schema.version.api.default}</value>
278 <key>schema.version.list</key>
279 <value>${schema.version.list}</value>
282 <key>schema.uri.base.path</key>
283 <value>${schema.uri.base.path}</value>
286 <executable>java</executable>
293 <dependencyManagement>
296 <groupId>org.springframework.boot</groupId>
297 <artifactId>spring-boot-starter-parent</artifactId>
298 <version>${spring.boot.version}</version>
300 <scope>import</scope>
303 </dependencyManagement>
306 <groupId>com.att.eelf</groupId>
307 <artifactId>eelf-core</artifactId>
308 <version>${eelf.core.version}</version>
311 <groupId>ch.qos.logback</groupId>
312 <artifactId>logback-core</artifactId>
313 <version>${logback.version}</version>
316 <groupId>ch.qos.logback</groupId>
317 <artifactId>logback-classic</artifactId>
318 <version>${logback.version}</version>
321 <groupId>ch.qos.logback</groupId>
322 <artifactId>logback-access</artifactId>
323 <version>${logback.version}</version>
326 <groupId>org.onap.aai.aai-common</groupId>
327 <artifactId>aai-core</artifactId>
328 <version>${aai.core.version}</version>
331 <groupId>com.sun.jersey</groupId>
332 <artifactId>jersey-core</artifactId>
335 <groupId>org.codehaus.jackson</groupId>
336 <artifactId>jackson-mapper-asl</artifactId>
339 <groupId>org.eclipse.jetty</groupId>
340 <artifactId>jetty-http</artifactId>
343 <groupId>org.eclipse.jetty</groupId>
344 <artifactId>jetty-server</artifactId>
347 <groupId>org.springframework</groupId>
348 <artifactId>spring-web</artifactId>
351 <groupId>org.onap.aai</groupId>
352 <artifactId>aai-schema-ingest</artifactId>
357 <groupId>org.hamcrest</groupId>
358 <artifactId>hamcrest-junit</artifactId>
359 <version>${hamcrest.junit.version}</version>
362 <groupId>junit</groupId>
363 <artifactId>junit</artifactId>
364 <version>${junit.version}</version>
368 <groupId>com.google.guava</groupId>
369 <artifactId>guava</artifactId>
370 <version>${google.guava.version}</version>
373 <groupId>com.fasterxml.jackson.jaxrs</groupId>
374 <artifactId>jackson-jaxrs-json-provider</artifactId>
377 <groupId>org.mockito</groupId>
378 <artifactId>mockito-all</artifactId>
379 <version>${mockito.version}</version>
383 <groupId>javax.xml.bind</groupId>
384 <artifactId>jaxb-api</artifactId>
385 <version>${jaxb.version}</version>
388 <groupId>com.sun.xml.bind</groupId>
389 <artifactId>jaxb-impl</artifactId>
390 <version>${jaxb.version}</version>
393 <groupId>com.sun.xml.bind</groupId>
394 <artifactId>jaxb-core</artifactId>
395 <version>${jaxb.version}</version>
398 <groupId>com.sun.xml.bind</groupId>
399 <artifactId>jaxb-xjc</artifactId>
400 <version>${jaxb.version}</version>
403 <groupId>org.eclipse.persistence</groupId>
404 <artifactId>eclipselink</artifactId>
405 <version>${eclipse.persistence.version}</version>
408 <groupId>org.eclipse.persistence</groupId>
409 <artifactId>org.eclipse.persistence.moxy</artifactId>
410 <version>${eclipse.persistence.version}</version>
411 <scope>compile</scope>
414 <groupId>org.springframework.boot</groupId>
415 <artifactId>spring-boot-starter-web</artifactId>
418 <groupId>org.springframework.boot</groupId>
419 <artifactId>spring-boot-starter-tomcat</artifactId>
424 <groupId>org.springframework.boot</groupId>
425 <artifactId>spring-boot-starter-jetty</artifactId>
428 <groupId>org.springframework.boot</groupId>
429 <artifactId>spring-boot-starter-jersey</artifactId>
432 <groupId>org.springframework.boot</groupId>
433 <artifactId>spring-boot-starter-aop</artifactId>
436 <groupId>org.springframework.boot</groupId>
437 <artifactId>spring-boot-test</artifactId>
441 <groupId>org.springframework</groupId>
442 <artifactId>spring-test</artifactId>
446 <groupId>org.mockito</groupId>
447 <artifactId>mockito-all</artifactId>
448 <version>${mockito.version}</version>
452 <groupId>org.hamcrest</groupId>
453 <artifactId>hamcrest-junit</artifactId>
454 <version>${hamcrest.junit.version}</version>
460 <directory>${project.basedir}/src/main/swm</directory>
461 <targetPath>${project.build.directory}/swm</targetPath>
462 <filtering>false</filtering>
465 <directory>${project.basedir}/src/main/resources</directory>
467 <include>application.properties</include>
468 <include>dme2.properties</include>
469 <include>logback.xml</include>
470 <include>localhost-access-logback.xml</include>
472 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
473 <filtering>false</filtering>
476 <directory>${project.basedir}/src/main/resources</directory>
478 <include>**/*</include>
480 <filtering>true</filtering>
483 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
485 <include>aaiconfig.properties</include>
487 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
488 <filtering>false</filtering>
491 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
493 <include>aai-client-cert.p12</include>
494 <include>tomcat_keystore</include>
495 <include>aai_policy.json</include>
497 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
498 <filtering>true</filtering>
501 <directory>${project.basedir}/src/main/resources/</directory>
503 <include>logback.xml</include>
504 <include>localhost-access-logback.xml</include>
505 <include>hbase-site.xml</include>
507 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
508 <filtering>true</filtering>
511 <directory>${project.basedir}/src/main/docker</directory>
513 <include>**/*</include>
515 <targetPath>${aai.build.directory}</targetPath>
516 <filtering>true</filtering>
519 <directory>${project.build.directory}/</directory>
521 <include>${project.artifactId}-${project.version}.jar</include>
523 <targetPath>${aai.build.directory}/lib/</targetPath>
524 <filtering>false</filtering>
530 <groupId>org.codehaus.groovy.maven</groupId>
531 <artifactId>gmaven-plugin</artifactId>
532 <version>1.0</version>
535 <phase>validate</phase>
541 println project.properties['aai.project.version'];
543 if (project.properties['aai.project.version'] != null) {
544 versionArray = project.properties['aai.project.version'].split('\\.');
547 project.properties["project.major.version"] = versionArray[0];
548 project.properties["project.minor.version"] = versionArray[1];
549 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
550 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
560 <groupId>org.springframework.boot</groupId>
561 <artifactId>spring-boot-maven-plugin</artifactId>
564 <groupId>org.apache.maven.plugins</groupId>
565 <artifactId>maven-clean-plugin</artifactId>
566 <version>2.4.1</version>
570 <directory>${project.basedir}/src/main/resources/schema</directory>
572 <include>**/*</include>
574 <followSymlinks>false</followSymlinks>
580 <groupId>org.codehaus.groovy.maven</groupId>
581 <artifactId>gmaven-plugin</artifactId>
584 <groupId>org.apache.maven.plugins</groupId>
585 <artifactId>maven-dependency-plugin</artifactId>
586 <version>2.10</version>
589 <groupId>org.apache.maven.plugins</groupId>
590 <artifactId>maven-javadoc-plugin</artifactId>
591 <version>${javadoc.plugin.version}</version>
594 <artifactId>maven-assembly-plugin</artifactId>
597 <descriptor>src/main/assembly/descriptor.xml</descriptor>
602 <id>make-assembly</id> <!-- this is used for inheritance merges -->
603 <phase>package</phase> <!-- bind to the packaging phase -->
611 <artifactId>maven-resources-plugin</artifactId>
612 <version>2.7</version>
615 <id>copy-oxm-edgerules-project</id>
616 <phase>initialize</phase>
618 <goal>copy-resources</goal>
621 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
624 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
626 <include>**/oxm/**/*.xml</include>
627 <include>**/dbedgerules/**/*.json</include>
634 <id>copy-queries-project</id>
635 <phase>initialize</phase>
637 <goal>copy-resources</goal>
640 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
643 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
645 <include>**/query/**/*.json</include>
652 <id>copy-oxm-edgerules</id>
653 <phase>initialize</phase>
655 <goal>copy-resources</goal>
658 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
661 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
663 <include>**/oxm/**/*.xml</include>
664 <include>**/dbedgerules/**/*.json</include>
671 <id>copy-queries</id>
672 <phase>initialize</phase>
674 <goal>copy-resources</goal>
677 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
680 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
682 <include>**/query/**/*.json</include>
691 <groupId>org.apache.maven.plugins</groupId>
692 <artifactId>maven-surefire-plugin</artifactId>
693 <version>2.12.4</version>
695 <argLine>-noverify ${argLine}</argLine>
696 <runOrder>alphabetical</runOrder>
700 <groupId>com.mycila</groupId>
701 <artifactId>license-maven-plugin</artifactId>
704 <groupId>org.codehaus.mojo</groupId>
705 <artifactId>sonar-maven-plugin</artifactId>
706 <version>3.3</version>
709 <groupId>org.jacoco</groupId>
710 <artifactId>jacoco-maven-plugin</artifactId>
711 <version>0.7.9</version>
713 <dumpOnExit>true</dumpOnExit>
715 <exclude>**/**/models/**/*.class</exclude>
720 <id>jacoco-initialize-unit-tests</id>
722 <goal>prepare-agent</goal>
725 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
726 <!-- <append>true</append> -->
730 <id>post-unit-test</id>
736 <!-- Sets the path to the file which contains the execution data. -->
737 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
738 <!-- Sets the output directory for the code coverage report. -->
739 <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
743 <id>default-check</id>
748 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
750 <!-- implementation is needed only for Maven 2 -->
751 <rule implementation="org.jacoco.maven.RuleConfiguration">
752 <element>BUNDLE</element>
754 <limit implementation="org.jacoco.report.check.Limit">
755 <counter>LINE</counter>
756 <value>COVEREDRATIO</value>
757 <minimum>${jacoco.line.coverage.limit}</minimum>
767 <groupId>org.apache.maven.plugins</groupId>
768 <artifactId>maven-deploy-plugin</artifactId>
772 <groupId>org.springframework.boot</groupId>
773 <artifactId>spring-boot-maven-plugin</artifactId>
774 <version>${spring.boot.version}</version>
776 <mainClass>${start-class}</mainClass>
782 <goal>repackage</goal>
788 <groupId>org.apache.maven.plugins</groupId>
789 <artifactId>maven-clean-plugin</artifactId>
790 <version>2.4.1</version>
794 <directory>${project.basedir}/src/main/resources/schema</directory>
796 <include>**/*</include>
798 <followSymlinks>false</followSymlinks>
808 <groupId>org.apache.maven.plugins</groupId>
809 <artifactId>maven-javadoc-plugin</artifactId>
810 <version>2.10.4</version>
812 <failOnError>false</failOnError>
813 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
815 <groupId>org.umlgraph</groupId>
816 <artifactId>umlgraph</artifactId>
817 <version>5.6</version>
819 <additionalparam>-views</additionalparam>
820 <useStandardDocletOptions>true</useStandardDocletOptions>