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.0-SNAPSHOT</version>
30 <groupId>org.onap.aai.schema-service</groupId>
31 <artifactId>schema-service</artifactId>
32 <version>1.0.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.4.0</aai.core.version>
40 <spring.boot.version>1.5.15.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.68</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>v15</schema.version.api.default>
98 <schema.version.list>v10,v11,v12,v13,v14,v15</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</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>
414 <directory>${project.basedir}/src/main/swm</directory>
415 <targetPath>${project.build.directory}/swm</targetPath>
416 <filtering>false</filtering>
419 <directory>${project.basedir}/src/main/resources</directory>
421 <include>application.properties</include>
422 <include>dme2.properties</include>
423 <include>logback.xml</include>
424 <include>localhost-access-logback.xml</include>
426 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
427 <filtering>false</filtering>
430 <directory>${project.basedir}/src/main/resources</directory>
432 <include>**/*</include>
434 <filtering>true</filtering>
437 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
439 <include>aaiconfig.properties</include>
441 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
442 <filtering>false</filtering>
445 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
447 <include>aai-client-cert.p12</include>
448 <include>tomcat_keystore</include>
449 <include>aai_policy.json</include>
451 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
452 <filtering>true</filtering>
455 <directory>${project.basedir}/src/main/resources/</directory>
457 <include>logback.xml</include>
458 <include>localhost-access-logback.xml</include>
459 <include>hbase-site.xml</include>
461 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
462 <filtering>true</filtering>
465 <directory>${project.basedir}/src/main/docker</directory>
467 <include>**/*</include>
469 <targetPath>${aai.build.directory}</targetPath>
470 <filtering>true</filtering>
473 <directory>${project.build.directory}/</directory>
475 <include>${project.artifactId}-${project.version}.jar</include>
477 <targetPath>${aai.build.directory}/lib/</targetPath>
478 <filtering>false</filtering>
481 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
483 <include>**/oxm/**/*.xml</include>
484 <include>**/dbedgerules/**/*.json</include>
486 <targetPath>${project.basedir}/src/main/resources/schema</targetPath>
487 <filtering>false</filtering>
490 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
492 <include>**/query/**/*.json</include>
494 <targetPath>${project.basedir}/src/main/resources/schema</targetPath>
495 <filtering>false</filtering>
498 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
500 <include>**/oxm/**/*.xml</include>
501 <include>**/dbedgerules/**/*.json</include>
503 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</targetPath>
504 <filtering>false</filtering>
507 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
509 <include>**/query/**/*.json</include>
511 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</targetPath>
512 <filtering>false</filtering>
518 <groupId>org.codehaus.groovy.maven</groupId>
519 <artifactId>gmaven-plugin</artifactId>
520 <version>1.0</version>
523 <phase>validate</phase>
529 println project.properties['aai.project.version'];
531 if (project.properties['aai.project.version'] != null) {
532 versionArray = project.properties['aai.project.version'].split('\\.');
535 project.properties["project.major.version"] = versionArray[0];
536 project.properties["project.minor.version"] = versionArray[1];
537 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
538 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
548 <groupId>org.springframework.boot</groupId>
549 <artifactId>spring-boot-maven-plugin</artifactId>
552 <groupId>org.apache.maven.plugins</groupId>
553 <artifactId>maven-clean-plugin</artifactId>
554 <version>2.4.1</version>
558 <directory>${project.basedir}/src/main/resources/schema</directory>
560 <include>**/*</include>
562 <followSymlinks>false</followSymlinks>
568 <groupId>org.codehaus.groovy.maven</groupId>
569 <artifactId>gmaven-plugin</artifactId>
572 <groupId>org.apache.maven.plugins</groupId>
573 <artifactId>maven-dependency-plugin</artifactId>
574 <version>2.10</version>
577 <groupId>org.apache.maven.plugins</groupId>
578 <artifactId>maven-javadoc-plugin</artifactId>
579 <version>${javadoc.plugin.version}</version>
582 <artifactId>maven-assembly-plugin</artifactId>
585 <descriptor>src/main/assembly/descriptor.xml</descriptor>
590 <id>make-assembly</id> <!-- this is used for inheritance merges -->
591 <phase>package</phase> <!-- bind to the packaging phase -->
599 <groupId>org.apache.maven.plugins</groupId>
600 <artifactId>maven-surefire-plugin</artifactId>
601 <version>2.12.4</version>
603 <argLine>-noverify ${argLine}</argLine>
604 <runOrder>alphabetical</runOrder>
608 <groupId>com.mycila</groupId>
609 <artifactId>license-maven-plugin</artifactId>
612 <groupId>org.codehaus.mojo</groupId>
613 <artifactId>sonar-maven-plugin</artifactId>
614 <version>3.3</version>
617 <groupId>org.jacoco</groupId>
618 <artifactId>jacoco-maven-plugin</artifactId>
619 <version>0.7.9</version>
621 <dumpOnExit>true</dumpOnExit>
623 <exclude>**/**/models/**/*.class</exclude>
628 <id>jacoco-initialize-unit-tests</id>
630 <goal>prepare-agent</goal>
633 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
634 <!-- <append>true</append> -->
638 <id>post-unit-test</id>
644 <!-- Sets the path to the file which contains the execution data. -->
645 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
646 <!-- Sets the output directory for the code coverage report. -->
647 <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
651 <id>default-check</id>
656 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
658 <!-- implementation is needed only for Maven 2 -->
659 <rule implementation="org.jacoco.maven.RuleConfiguration">
660 <element>BUNDLE</element>
662 <limit implementation="org.jacoco.report.check.Limit">
663 <counter>LINE</counter>
664 <value>COVEREDRATIO</value>
665 <minimum>${jacoco.line.coverage.limit}</minimum>
675 <groupId>org.apache.maven.plugins</groupId>
676 <artifactId>maven-deploy-plugin</artifactId>
679 <id>default-deploy</id>
685 <groupId>org.sonatype.plugins</groupId>
686 <artifactId>nexus-staging-maven-plugin</artifactId>
687 <version>1.6.7</version>
688 <extensions>true</extensions>
690 <nexusUrl>${nexusproxy}</nexusUrl>
691 <stagingProfileId>176c31dfe190a</stagingProfileId>
692 <serverId>ecomp-staging</serverId>
696 <groupId>org.springframework.boot</groupId>
697 <artifactId>spring-boot-maven-plugin</artifactId>
698 <version>${spring.boot.version}</version>
700 <mainClass>${start-class}</mainClass>
706 <goal>repackage</goal>
712 <groupId>org.apache.maven.plugins</groupId>
713 <artifactId>maven-clean-plugin</artifactId>
714 <version>2.4.1</version>
718 <directory>${project.basedir}/src/main/resources/schema</directory>
720 <include>**/*</include>
722 <followSymlinks>false</followSymlinks>
732 <groupId>org.apache.maven.plugins</groupId>
733 <artifactId>maven-javadoc-plugin</artifactId>
734 <version>2.10.4</version>
736 <failOnError>false</failOnError>
737 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
739 <groupId>org.umlgraph</groupId>
740 <artifactId>umlgraph</artifactId>
741 <version>5.6</version>
743 <additionalparam>-views</additionalparam>
744 <useStandardDocletOptions>true</useStandardDocletOptions>