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>
27 <groupId>org.onap.aai.schema-service</groupId>
28 <artifactId>schema-service</artifactId>
29 <version>1.6.1-SNAPSHOT</version>
31 <groupId>org.onap.aai.schema-service</groupId>
32 <artifactId>aai-schema-service</artifactId>
34 <java.version>1.8</java.version>
35 <start-class>org.onap.aai.schemaservice.SchemaServiceApp</start-class>
37 <!-- Start of the jacoco plugin properties -->
38 <sonar.language>java</sonar.language>
39 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
40 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
41 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
42 <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
43 <sonar.projectVersion>${project.version}</sonar.projectVersion>
44 <!-- End of the jacoco plugin properties -->
46 <docker.fabric.version>0.28.0</docker.fabric.version>
47 <!-- Default docker registry that maven fabric plugin will try to pull from -->
48 <docker.registry>docker.io</docker.registry>
49 <!-- Specifying the docker push registry where the image should be pushed -->
50 <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
51 <docker.push.registry>localhost:5000</docker.push.registry>
52 <aai.docker.version>1.0.0</aai.docker.version>
55 Location where assembly of our scripts, resources and main jar will be held
56 Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
58 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
59 </aai.build.directory>
60 <aai.docker.namespace>onap</aai.docker.namespace>
61 <aai.base.image>alpine</aai.base.image>
62 <aai.base.image.version>1.6.0</aai.base.image.version>
64 <maven.skip.tests>true</maven.skip.tests>
66 <jacoco.line.coverage.limit>0.44</jacoco.line.coverage.limit>
68 <!-- This will be used for the docker images as the default format of maven build has issues -->
69 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
70 <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
72 <!-- Start of Default ONAP Schema Properties -->
73 <schema.source.name>onap</schema.source.name>
74 <schema.configuration.location>N/A</schema.configuration.location>
75 <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm
76 </schema.nodes.location>
77 <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules
78 </schema.edges.location>
79 <schema.version.depth.start>v10</schema.version.depth.start>
80 <schema.version.related.link.start>v10</schema.version.related.link.start>
81 <schema.version.app.root.start>v11</schema.version.app.root.start>
82 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
83 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
84 <schema.version.api.default>v16</schema.version.api.default>
85 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
86 <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
87 <!-- End of Default ONAP Schema Properties -->
89 <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
92 <!-- Docker profile to be used for building docker image and pushing to nexus -->
98 <groupId>org.codehaus.groovy.maven</groupId>
99 <artifactId>gmaven-plugin</artifactId>
102 <phase>pre-clean</phase>
106 <phase>pre-clean</phase>
112 def userAaiBaseImage = session.userProperties['aai.base.image'];
113 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
114 if (userAaiCommonVersion != null) {
115 project.properties['aai.base.image.version'] = userAaiCommonVersion;
117 if (userAaiBaseImage != null) {
118 project.properties['aai.base.image'] = userAaiBaseImage;
120 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
121 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
128 <groupId>io.fabric8</groupId>
129 <artifactId>docker-maven-plugin</artifactId>
130 <version>${docker.fabric.version}</version>
132 <verbose>true</verbose>
133 <apiVersion>1.23</apiVersion>
136 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
141 <tag>${project.docker.latesttag.version}</tag>
142 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
144 <cleanup>try</cleanup>
145 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
150 <directory>${aai.build.directory}</directory>
151 <outputDirectory>/${project.artifactId}</outputDirectory>
162 <id>clean-images</id>
163 <phase>pre-clean</phase>
168 <removeAll>true</removeAll>
172 <id>generate-images</id>
173 <phase>package</phase>
180 <phase>deploy</phase>
190 <!-- Start of ONAP Profile -->
194 <schema.source.name>onap</schema.source.name>
195 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
196 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
199 <!-- End of ONAP Profile -->
203 <skipTests>${maven.skip.tests}</skipTests>
206 <defaultGoal>pre-integration-test</defaultGoal>
209 <groupId>org.codehaus.mojo</groupId>
210 <artifactId>exec-maven-plugin</artifactId>
211 <version>1.6.0</version>
214 <id>run-spring-boot</id>
215 <phase>package</phase>
222 <mainClass>${start-class}</mainClass>
225 <key>schema.source.name</key>
226 <value>${schema.source.name}</value>
229 <key>schema.configuration.location</key>
230 <value>${schema.configuration.location}</value>
233 <key>schema.nodes.location</key>
234 <value>${schema.nodes.location}</value>
237 <key>schema.edges.location</key>
238 <value>${schema.edges.location}</value>
241 <key>schema.version.depth.start</key>
242 <value>${schema.version.depth.start}</value>
245 <key>schema.version.related.link.start</key>
246 <value>${schema.version.related.link.start}</value>
249 <key>schema.version.app.root.start</key>
250 <value>${schema.version.app.root.start}</value>
253 <key>schema.version.namespace.change.start</key>
254 <value>${schema.version.namespace.change.start}</value>
257 <key>schema.version.edge.label.start</key>
258 <value>${schema.version.edge.label.start}</value>
261 <key>schema.version.api.default</key>
262 <value>${schema.version.api.default}</value>
265 <key>schema.version.list</key>
266 <value>${schema.version.list}</value>
269 <key>schema.uri.base.path</key>
270 <value>${schema.uri.base.path}</value>
273 <executable>java</executable>
282 <groupId>com.att.eelf</groupId>
283 <artifactId>eelf-core</artifactId>
286 <groupId>ch.qos.logback</groupId>
287 <artifactId>logback-core</artifactId>
290 <groupId>ch.qos.logback</groupId>
291 <artifactId>logback-classic</artifactId>
294 <groupId>ch.qos.logback</groupId>
295 <artifactId>logback-access</artifactId>
298 <groupId>org.onap.aai.aai-common</groupId>
299 <artifactId>aai-core</artifactId>
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>
332 <groupId>junit</groupId>
333 <artifactId>junit</artifactId>
337 <groupId>com.google.guava</groupId>
338 <artifactId>guava</artifactId>
341 <groupId>com.fasterxml.jackson.jaxrs</groupId>
342 <artifactId>jackson-jaxrs-json-provider</artifactId>
345 <groupId>org.mockito</groupId>
346 <artifactId>mockito-all</artifactId>
350 <groupId>javax.xml.bind</groupId>
351 <artifactId>jaxb-api</artifactId>
354 <groupId>org.eclipse.persistence</groupId>
355 <artifactId>eclipselink</artifactId>
358 <groupId>org.eclipse.persistence</groupId>
359 <artifactId>org.eclipse.persistence.moxy</artifactId>
360 <scope>compile</scope>
363 <groupId>org.springframework.boot</groupId>
364 <artifactId>spring-boot-starter-web</artifactId>
367 <groupId>org.springframework.boot</groupId>
368 <artifactId>spring-boot-starter-tomcat</artifactId>
373 <groupId>org.springframework.boot</groupId>
374 <artifactId>spring-boot-starter-jetty</artifactId>
377 <groupId>org.springframework.boot</groupId>
378 <artifactId>spring-boot-starter-jersey</artifactId>
381 <groupId>org.springframework.boot</groupId>
382 <artifactId>spring-boot-starter-aop</artifactId>
385 <groupId>org.springframework.boot</groupId>
386 <artifactId>spring-boot-test</artifactId>
390 <groupId>org.springframework</groupId>
391 <artifactId>spring-test</artifactId>
395 <groupId>org.mockito</groupId>
396 <artifactId>mockito-all</artifactId>
400 <groupId>org.hamcrest</groupId>
401 <artifactId>hamcrest-junit</artifactId>
407 <directory>${project.basedir}/src/main/swm</directory>
408 <targetPath>${project.build.directory}/swm</targetPath>
409 <filtering>false</filtering>
412 <directory>${project.basedir}/src/main/resources</directory>
414 <include>application.properties</include>
415 <include>dme2.properties</include>
416 <include>logback.xml</include>
417 <include>localhost-access-logback.xml</include>
419 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
420 <filtering>false</filtering>
423 <directory>${project.basedir}/src/main/resources</directory>
425 <include>**/*</include>
427 <filtering>true</filtering>
430 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
432 <include>aaiconfig.properties</include>
434 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
435 <filtering>false</filtering>
438 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
440 <include>aai-client-cert.p12</include>
441 <include>tomcat_keystore</include>
442 <include>aai_policy.json</include>
444 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
445 <filtering>true</filtering>
448 <directory>${project.basedir}/src/main/resources/</directory>
450 <include>logback.xml</include>
451 <include>localhost-access-logback.xml</include>
452 <include>hbase-site.xml</include>
454 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
455 <filtering>true</filtering>
458 <directory>${project.basedir}/src/main/docker</directory>
460 <include>**/*</include>
462 <targetPath>${aai.build.directory}</targetPath>
463 <filtering>true</filtering>
466 <directory>${project.build.directory}/</directory>
468 <include>${project.artifactId}-${project.version}.jar</include>
470 <targetPath>${aai.build.directory}/lib/</targetPath>
471 <filtering>false</filtering>
477 <groupId>org.codehaus.groovy.maven</groupId>
478 <artifactId>gmaven-plugin</artifactId>
479 <version>1.0</version>
482 <phase>validate</phase>
488 println project.properties['aai.project.version'];
490 if (project.properties['aai.project.version'] != null) {
491 versionArray = project.properties['aai.project.version'].split('\\.');
494 project.properties["project.major.version"] = versionArray[0];
495 project.properties["project.minor.version"] = versionArray[1];
496 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
497 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
507 <groupId>org.springframework.boot</groupId>
508 <artifactId>spring-boot-maven-plugin</artifactId>
511 <groupId>org.apache.maven.plugins</groupId>
512 <artifactId>maven-clean-plugin</artifactId>
513 <version>2.4.1</version>
517 <directory>${project.basedir}/src/main/resources/schema</directory>
519 <include>**/*</include>
521 <followSymlinks>false</followSymlinks>
527 <groupId>org.codehaus.groovy.maven</groupId>
528 <artifactId>gmaven-plugin</artifactId>
531 <groupId>org.apache.maven.plugins</groupId>
532 <artifactId>maven-dependency-plugin</artifactId>
533 <version>2.10</version>
536 <groupId>org.apache.maven.plugins</groupId>
537 <artifactId>maven-javadoc-plugin</artifactId>
538 <version>${javadoc.plugin.version}</version>
541 <artifactId>maven-assembly-plugin</artifactId>
544 <descriptor>src/main/assembly/descriptor.xml</descriptor>
549 <id>make-assembly</id> <!-- this is used for inheritance merges -->
550 <phase>package</phase> <!-- bind to the packaging phase -->
558 <artifactId>maven-resources-plugin</artifactId>
559 <version>2.7</version>
562 <id>copy-oxm-edgerules-project</id>
563 <phase>initialize</phase>
565 <goal>copy-resources</goal>
568 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
571 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
573 <include>**/oxm/**/*.xml</include>
574 <include>**/dbedgerules/**/*.json</include>
581 <id>copy-queries-project</id>
582 <phase>initialize</phase>
584 <goal>copy-resources</goal>
587 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
590 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
592 <include>**/query/**/*.json</include>
599 <id>copy-oxm-edgerules</id>
600 <phase>initialize</phase>
602 <goal>copy-resources</goal>
605 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
608 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
610 <include>**/oxm/**/*.xml</include>
611 <include>**/dbedgerules/**/*.json</include>
618 <id>copy-queries</id>
619 <phase>initialize</phase>
621 <goal>copy-resources</goal>
624 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
627 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
629 <include>**/query/**/*.json</include>
638 <groupId>org.apache.maven.plugins</groupId>
639 <artifactId>maven-surefire-plugin</artifactId>
640 <version>2.12.4</version>
642 <argLine>-noverify ${argLine}</argLine>
643 <runOrder>alphabetical</runOrder>
647 <groupId>com.mycila</groupId>
648 <artifactId>license-maven-plugin</artifactId>
651 <groupId>org.codehaus.mojo</groupId>
652 <artifactId>sonar-maven-plugin</artifactId>
653 <version>3.3</version>
656 <groupId>org.jacoco</groupId>
657 <artifactId>jacoco-maven-plugin</artifactId>
658 <version>0.7.9</version>
660 <dumpOnExit>true</dumpOnExit>
662 <exclude>**/**/models/**/*.class</exclude>
667 <id>jacoco-initialize-unit-tests</id>
669 <goal>prepare-agent</goal>
672 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
673 <!-- <append>true</append> -->
677 <id>post-unit-test</id>
683 <!-- Sets the path to the file which contains the execution data. -->
684 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
685 <!-- Sets the output directory for the code coverage report. -->
686 <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
690 <id>default-check</id>
695 <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
697 <!-- implementation is needed only for Maven 2 -->
698 <rule implementation="org.jacoco.maven.RuleConfiguration">
699 <element>BUNDLE</element>
701 <limit implementation="org.jacoco.report.check.Limit">
702 <counter>LINE</counter>
703 <value>COVEREDRATIO</value>
704 <minimum>${jacoco.line.coverage.limit}</minimum>
714 <groupId>org.apache.maven.plugins</groupId>
715 <artifactId>maven-deploy-plugin</artifactId>
719 <groupId>org.springframework.boot</groupId>
720 <artifactId>spring-boot-maven-plugin</artifactId>
721 <version>${spring.boot.version}</version>
723 <mainClass>${start-class}</mainClass>
729 <goal>repackage</goal>
735 <groupId>org.apache.maven.plugins</groupId>
736 <artifactId>maven-clean-plugin</artifactId>
737 <version>2.4.1</version>
741 <directory>${project.basedir}/src/main/resources/schema</directory>
743 <include>**/*</include>
745 <followSymlinks>false</followSymlinks>
755 <groupId>org.apache.maven.plugins</groupId>
756 <artifactId>maven-javadoc-plugin</artifactId>
757 <version>2.10.4</version>
759 <failOnError>false</failOnError>
760 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
762 <groupId>org.umlgraph</groupId>
763 <artifactId>umlgraph</artifactId>
764 <version>5.6</version>
766 <additionalparam>-views</additionalparam>
767 <useStandardDocletOptions>true</useStandardDocletOptions>