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.7.7-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 <docker.fabric.version>0.28.0</docker.fabric.version>
38 <!-- Default docker registry that maven fabric plugin will try to pull from -->
39 <docker.registry>docker.io</docker.registry>
40 <!-- Specifying the docker push registry where the image should be pushed -->
41 <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
42 <docker.push.registry>localhost:5000</docker.push.registry>
43 <aai.docker.version>1.0.0</aai.docker.version>
46 Location where assembly of our scripts, resources and main jar will be held
47 Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
49 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
50 </aai.build.directory>
51 <aai.docker.namespace>onap</aai.docker.namespace>
52 <aai.base.image>alpine</aai.base.image>
53 <aai.base.image.version>1.6.0</aai.base.image.version>
55 <maven.skip.tests>true</maven.skip.tests>
57 <jacoco.line.coverage.limit>0.44</jacoco.line.coverage.limit>
59 <!-- This will be used for the docker images as the default format of maven build has issues -->
60 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
61 <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
63 <!-- Start of Default ONAP Schema Properties -->
64 <schema.source.name>onap</schema.source.name>
65 <schema.configuration.location>N/A</schema.configuration.location>
66 <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm
67 </schema.nodes.location>
68 <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules
69 </schema.edges.location>
70 <schema.version.depth.start>v10</schema.version.depth.start>
71 <schema.version.related.link.start>v10</schema.version.related.link.start>
72 <schema.version.app.root.start>v11</schema.version.app.root.start>
73 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
74 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
75 <schema.version.api.default>v20</schema.version.api.default>
76 <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20</schema.version.list>
77 <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
78 <!-- End of Default ONAP Schema Properties -->
80 <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
83 <!-- Docker profile to be used for building docker image and pushing to nexus -->
89 <groupId>org.codehaus.groovy.maven</groupId>
90 <artifactId>gmaven-plugin</artifactId>
93 <phase>pre-clean</phase>
97 <phase>pre-clean</phase>
103 def userAaiBaseImage = session.userProperties['aai.base.image'];
104 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
105 if (userAaiCommonVersion != null) {
106 project.properties['aai.base.image.version'] = userAaiCommonVersion;
108 if (userAaiBaseImage != null) {
109 project.properties['aai.base.image'] = userAaiBaseImage;
111 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
112 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
119 <groupId>io.fabric8</groupId>
120 <artifactId>docker-maven-plugin</artifactId>
121 <version>${docker.fabric.version}</version>
123 <verbose>true</verbose>
124 <apiVersion>1.23</apiVersion>
127 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
132 <tag>${project.docker.latesttag.version}</tag>
133 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
135 <cleanup>try</cleanup>
136 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
141 <directory>${aai.build.directory}</directory>
142 <outputDirectory>/${project.artifactId}</outputDirectory>
153 <id>clean-images</id>
154 <phase>pre-clean</phase>
159 <removeAll>true</removeAll>
163 <id>generate-images</id>
164 <phase>package</phase>
171 <phase>deploy</phase>
181 <!-- Start of ONAP Profile -->
185 <schema.source.name>onap</schema.source.name>
186 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
187 <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,18,v19,v20</schema.version.list>
190 <!-- End of ONAP Profile -->
194 <skipTests>${maven.skip.tests}</skipTests>
197 <defaultGoal>pre-integration-test</defaultGoal>
200 <groupId>org.codehaus.mojo</groupId>
201 <artifactId>exec-maven-plugin</artifactId>
202 <version>1.6.0</version>
205 <id>run-spring-boot</id>
206 <phase>package</phase>
213 <mainClass>${start-class}</mainClass>
216 <key>schema.source.name</key>
217 <value>${schema.source.name}</value>
220 <key>schema.configuration.location</key>
221 <value>${schema.configuration.location}</value>
224 <key>schema.nodes.location</key>
225 <value>${schema.nodes.location}</value>
228 <key>schema.edges.location</key>
229 <value>${schema.edges.location}</value>
232 <key>schema.version.depth.start</key>
233 <value>${schema.version.depth.start}</value>
236 <key>schema.version.related.link.start</key>
237 <value>${schema.version.related.link.start}</value>
240 <key>schema.version.app.root.start</key>
241 <value>${schema.version.app.root.start}</value>
244 <key>schema.version.namespace.change.start</key>
245 <value>${schema.version.namespace.change.start}</value>
248 <key>schema.version.edge.label.start</key>
249 <value>${schema.version.edge.label.start}</value>
252 <key>schema.version.api.default</key>
253 <value>${schema.version.api.default}</value>
256 <key>schema.version.list</key>
257 <value>${schema.version.list}</value>
260 <key>schema.uri.base.path</key>
261 <value>${schema.uri.base.path}</value>
264 <executable>java</executable>
273 <groupId>javax.annotation</groupId>
274 <artifactId>javax.annotation-api</artifactId>
275 <scope>compile</scope>
278 <groupId>javax.el</groupId>
279 <artifactId>javax.el-api</artifactId>
280 <version>3.0.0</version>
283 <groupId>org.glassfish</groupId>
284 <artifactId>javax.el</artifactId>
285 <version>3.0.0</version>
288 <groupId>javax.jms</groupId>
289 <artifactId>javax.jms-api</artifactId>
290 <version>2.0.1</version>
293 <groupId>javax.ws.rs</groupId>
294 <artifactId>javax.ws.rs-api</artifactId>
295 <version>2.1</version>
298 <groupId>com.sun.xml.bind</groupId>
299 <artifactId>jaxb-impl</artifactId>
302 <groupId>com.sun.xml.bind</groupId>
303 <artifactId>jaxb-core</artifactId>
306 <groupId>com.att.eelf</groupId>
307 <artifactId>eelf-core</artifactId>
310 <groupId>ch.qos.logback</groupId>
311 <artifactId>logback-core</artifactId>
314 <groupId>ch.qos.logback</groupId>
315 <artifactId>logback-classic</artifactId>
318 <groupId>ch.qos.logback</groupId>
319 <artifactId>logback-access</artifactId>
322 <groupId>junit</groupId>
323 <artifactId>junit</artifactId>
327 <groupId>com.google.guava</groupId>
328 <artifactId>guava</artifactId>
331 <groupId>com.fasterxml.jackson.jaxrs</groupId>
332 <artifactId>jackson-jaxrs-json-provider</artifactId>
335 <groupId>org.mockito</groupId>
336 <artifactId>mockito-all</artifactId>
340 <groupId>javax.xml.bind</groupId>
341 <artifactId>jaxb-api</artifactId>
344 <groupId>org.eclipse.persistence</groupId>
345 <artifactId>eclipselink</artifactId>
348 <groupId>org.eclipse.persistence</groupId>
349 <artifactId>org.eclipse.persistence.moxy</artifactId>
350 <scope>compile</scope>
353 <groupId>org.springframework.boot</groupId>
354 <artifactId>spring-boot-starter-jetty</artifactId>
357 <groupId>org.springframework.boot</groupId>
358 <artifactId>spring-boot-starter-jersey</artifactId>
361 <groupId>org.springframework.boot</groupId>
362 <artifactId>spring-boot-starter-aop</artifactId>
365 <groupId>org.onap.aai.aai-common</groupId>
366 <artifactId>aai-core</artifactId>
369 <groupId>org.springframework.boot</groupId>
370 <artifactId>spring-boot-starter-web</artifactId>
373 <groupId>org.onap.aai.aai-common</groupId>
374 <artifactId>aai-schema-ingest</artifactId>
379 <groupId>org.springframework.boot</groupId>
380 <artifactId>spring-boot-test</artifactId>
384 <groupId>org.springframework</groupId>
385 <artifactId>spring-test</artifactId>
389 <groupId>org.mockito</groupId>
390 <artifactId>mockito-all</artifactId>
394 <groupId>org.hamcrest</groupId>
395 <artifactId>hamcrest-junit</artifactId>
401 <directory>${project.basedir}/src/main/swm</directory>
402 <targetPath>${project.build.directory}/swm</targetPath>
403 <filtering>false</filtering>
406 <directory>${project.basedir}/src/main/resources</directory>
408 <include>application.properties</include>
409 <include>dme2.properties</include>
410 <include>logback.xml</include>
411 <include>localhost-access-logback.xml</include>
413 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
414 <filtering>false</filtering>
417 <directory>${project.basedir}/src/main/resources</directory>
419 <include>**/*</include>
421 <filtering>true</filtering>
424 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
426 <include>aaiconfig.properties</include>
428 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
429 <filtering>false</filtering>
432 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
434 <include>aai-client-cert.p12</include>
435 <include>tomcat_keystore</include>
436 <include>aai_policy.json</include>
438 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
439 <filtering>true</filtering>
442 <directory>${project.basedir}/src/main/resources/</directory>
444 <include>logback.xml</include>
445 <include>localhost-access-logback.xml</include>
446 <include>hbase-site.xml</include>
448 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
449 <filtering>true</filtering>
452 <directory>${project.basedir}/src/main/docker</directory>
454 <include>**/*</include>
456 <targetPath>${aai.build.directory}</targetPath>
457 <filtering>true</filtering>
460 <directory>${project.build.directory}/</directory>
462 <include>${project.artifactId}-${project.version}.jar</include>
464 <targetPath>${aai.build.directory}/lib/</targetPath>
465 <filtering>false</filtering>
471 <groupId>org.codehaus.groovy.maven</groupId>
472 <artifactId>gmaven-plugin</artifactId>
473 <version>1.0</version>
476 <phase>validate</phase>
482 println project.properties['aai.project.version'];
484 if (project.properties['aai.project.version'] != null) {
485 versionArray = project.properties['aai.project.version'].split('\\.');
488 project.properties["project.major.version"] = versionArray[0];
489 project.properties["project.minor.version"] = versionArray[1];
490 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
491 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
501 <groupId>org.springframework.boot</groupId>
502 <artifactId>spring-boot-maven-plugin</artifactId>
505 <groupId>org.apache.maven.plugins</groupId>
506 <artifactId>maven-clean-plugin</artifactId>
507 <version>2.4.1</version>
511 <directory>${project.basedir}/src/main/resources/schema</directory>
513 <include>**/*</include>
515 <followSymlinks>false</followSymlinks>
521 <groupId>org.codehaus.groovy.maven</groupId>
522 <artifactId>gmaven-plugin</artifactId>
525 <groupId>org.apache.maven.plugins</groupId>
526 <artifactId>maven-dependency-plugin</artifactId>
527 <version>2.10</version>
530 <groupId>org.apache.maven.plugins</groupId>
531 <artifactId>maven-javadoc-plugin</artifactId>
532 <version>${javadoc.plugin.version}</version>
535 <artifactId>maven-assembly-plugin</artifactId>
538 <descriptor>src/main/assembly/descriptor.xml</descriptor>
543 <id>make-assembly</id> <!-- this is used for inheritance merges -->
544 <phase>package</phase> <!-- bind to the packaging phase -->
552 <artifactId>maven-resources-plugin</artifactId>
553 <version>2.7</version>
556 <id>copy-oxm-edgerules-project</id>
557 <phase>initialize</phase>
559 <goal>copy-resources</goal>
562 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
565 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
567 <include>**/oxm/**/*.xml</include>
568 <include>**/dbedgerules/**/*.json</include>
575 <id>copy-queries-project</id>
576 <phase>initialize</phase>
578 <goal>copy-resources</goal>
581 <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
584 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
586 <include>**/query/**/*.json</include>
593 <id>copy-oxm-edgerules</id>
594 <phase>initialize</phase>
596 <goal>copy-resources</goal>
599 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
602 <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
604 <include>**/oxm/**/*.xml</include>
605 <include>**/dbedgerules/**/*.json</include>
612 <id>copy-queries</id>
613 <phase>initialize</phase>
615 <goal>copy-resources</goal>
618 <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
621 <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
623 <include>**/query/**/*.json</include>
632 <groupId>org.apache.maven.plugins</groupId>
633 <artifactId>maven-surefire-plugin</artifactId>
635 <runOrder>alphabetical</runOrder>
639 <groupId>com.mycila</groupId>
640 <artifactId>license-maven-plugin</artifactId>
643 <groupId>org.apache.maven.plugins</groupId>
644 <artifactId>maven-deploy-plugin</artifactId>
648 <groupId>org.springframework.boot</groupId>
649 <artifactId>spring-boot-maven-plugin</artifactId>
650 <version>${spring.boot.version}</version>
652 <mainClass>${start-class}</mainClass>
658 <goal>repackage</goal>
664 <groupId>org.apache.maven.plugins</groupId>
665 <artifactId>maven-clean-plugin</artifactId>
666 <version>2.4.1</version>
670 <directory>${project.basedir}/src/main/resources/schema</directory>
672 <include>**/*</include>
674 <followSymlinks>false</followSymlinks>
684 <groupId>org.apache.maven.plugins</groupId>
685 <artifactId>maven-javadoc-plugin</artifactId>
686 <version>2.10.4</version>
688 <failOnError>false</failOnError>
689 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
691 <groupId>org.umlgraph</groupId>
692 <artifactId>umlgraph</artifactId>
693 <version>5.6</version>
695 <additionalparam>-views</additionalparam>
696 <useStandardDocletOptions>true</useStandardDocletOptions>