<?xml version="1.0" encoding="UTF-8"?>
<!--

    ============LICENSE_START=======================================================
    org.onap.aai
    ================================================================================
    Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
    ================================================================================
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    ============LICENSE_END=========================================================

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.onap.aai.aai-common</groupId>
        <artifactId>aai-parent</artifactId>
        <version>1.14.5</version>
    </parent>
    <groupId>org.onap.aai.graphadmin</groupId>
    <artifactId>aai-graphadmin</artifactId>
    <version>1.14.6-SNAPSHOT</version>

    <properties>

        <!-- Start of Compiler Related Properties -->
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- End of Compiler Related Properties -->

        <!-- Start of Test Related Properties -->
        <skip.unit.tests>false</skip.unit.tests>
        <skip.integration.tests>true</skip.integration.tests>
        <!-- End of Test Related Properties -->

        <!-- Start of Docker Related Properties -->
        <docker.fabric.version>0.28.0</docker.fabric.version>
        <!-- Default docker registry that maven fabric plugin will try to pull from -->
        <docker.registry>docker.io</docker.registry>
        <!-- Specifying the docker push registry where the image should be pushed -->
        <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
        <docker.push.registry>localhost:5000</docker.push.registry>
        <aai.docker.version>1.0.0</aai.docker.version>
        <aai.schema.service.version>1.12.5</aai.schema.service.version>
        <aai.common.version>1.14.5</aai.common.version>
        <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
        </aai.build.directory>
        <aai.docker.namespace>onap</aai.docker.namespace>

        <license.goal.type>check</license.goal.type>

        <!--
            Nexus Proxy Properties and Snapshot Locations
            Ideally this can be overwritten at runtime per internal environment specific values at runtime
        -->
        <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
        <site.path>/content/sites/site/org/onap/aai/graphadmin/${project.artifactId}/${project.version}</site.path>
        <release.path>/content/repositories/releases/</release.path>
        <snapshot.path>/content/repositories/snapshots/</snapshot.path>
        <!-- GMaven plugin uses this property to figure out the name of the docker tag -->
        <aai.project.version>${project.version}</aai.project.version>

        <!-- Start of Database Related Properties -->
        <!-- End of Database Related Properties -->

        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
        <start-class>org.onap.aai.GraphAdminApp</start-class>

        <snapshot.file>${project.basedir}/snapshots/int1-data.graphson</snapshot.file>
        <jacoco.line.coverage.limit>0.46</jacoco.line.coverage.limit>

        <!-- Start of Default ONAP Schema Properties -->
        <schema.source.name>onap</schema.source.name>
        <schema.configuration.location>N/A</schema.configuration.location>
        <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm</schema.nodes.location>
        <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules</schema.edges.location>
        <schema.version.depth.start>v10</schema.version.depth.start>
        <schema.version.related.link.start>v10</schema.version.related.link.start>
        <schema.version.app.root.start>v11</schema.version.app.root.start>
        <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
        <schema.version.edge.label.start>v12</schema.version.edge.label.start>
        <schema.version.api.default>v29</schema.version.api.default>
        <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29</schema.version.list>
        <schema.uri.base.path>/aai</schema.uri.base.path>
        <!-- End of Default ONAP Schema Properties -->

        <micrometer.version>1.8.1</micrometer.version>
        <activemq.version>5.16.7</activemq.version>
        <antlr.version>4.9.3</antlr.version>
        <jcommander.version>1.78</jcommander.version>
        <gremlin.version>3.5.8</gremlin.version>
        <janusgraph.version>0.6.4</janusgraph.version>
    </properties>

    <profiles>
        <!-- Used during verify stage in Jenkins -->
        <profile>
            <id>all-tests</id>
            <properties>
                <build.profile.id>all-tests</build.profile.id>

                <!-- All tests are run. -->
                <skip.integration.tests>false</skip.integration.tests>
                <skip.unit.tests>false</skip.unit.tests>
            </properties>
        </profile>
        <profile>
            <id>skipTests</id>
            <activation>
                <property>
                    <name>skipTests</name>
                </property>
            </activation>
            <properties>
                <!-- All tests are skipped. -->
                <skip.integration.tests>true</skip.integration.tests>
                <skip.unit.tests>true</skip.unit.tests>
            </properties>
        </profile>
        <profile>
            <id>dev</id>
        </profile>
        <profile>
            <id>integration-test</id>
            <properties>
                <!-- Only integration tests are run. -->
                <build.profile.id>integration-test</build.profile.id>
                <skip.integration.tests>false</skip.integration.tests>
                <skip.unit.tests>true</skip.unit.tests>
            </properties>
        </profile>
        <!-- Start of ONAP Profile -->
        <profile>
            <id>onap</id>
            <properties>
                <schema.source.name>onap</schema.source.name>
                <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
                <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29</schema.version.list>
            </properties>
        </profile>
        <!-- End of ONAP Profile -->
        <profile>
            <id>runAjsc</id>
            <properties>
                <skipTests>${skip.unit.tests}</skipTests>
            </properties>
            <build>
                <defaultGoal>pre-integration-test</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.6.0</version>
                        <executions>
                            <execution>
                                <id>run-spring-boot</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <mainClass>${start-class}</mainClass>
                            <systemProperties>
                                <property>
                                    <key>snapshot.location</key>
                                    <value>${snapshot.file}</value>
                                </property>
                                <property>
                                    <key>schema.source.name</key>
                                    <value>${schema.source.name}</value>
                                </property>
                                <property>
                                    <key>schema.configuration.location</key>
                                    <value>${schema.configuration.location}</value>
                                </property>
                                <property>
                                    <key>schema.nodes.location</key>
                                    <value>${schema.nodes.location}</value>
                                </property>
                                <property>
                                    <key>schema.edges.location</key>
                                    <value>${schema.edges.location}</value>
                                </property>
                                <property>
                                    <key>schema.version.depth.start</key>
                                    <value>${schema.version.depth.start}</value>
                                </property>
                                <property>
                                    <key>schema.version.related.link.start</key>
                                    <value>${schema.version.related.link.start}</value>
                                </property>
                                <property>
                                    <key>schema.version.app.root.start</key>
                                    <value>${schema.version.app.root.start}</value>
                                </property>
                                <property>
                                    <key>schema.version.namespace.change.start</key>
                                    <value>${schema.version.namespace.change.start}</value>
                                </property>
                                <property>
                                    <key>schema.version.edge.label.start</key>
                                    <value>${schema.version.edge.label.start}</value>
                                </property>
                                <property>
                                    <key>schema.version.api.default</key>
                                    <value>${schema.version.api.default}</value>
                                </property>
                                <property>
                                    <key>schema.version.list</key>
                                    <value>${schema.version.list}</value>
                                </property>
                                <property>
                                    <key>schema.uri.base.path</key>
                                    <value>${schema.uri.base.path}</value>
                                </property>
                            </systemProperties>
                            <executable>java</executable>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- Docker profile to be used for building docker image and pushing to nexus -->
        <profile>
            <id>docker</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.groovy.maven</groupId>
                        <artifactId>gmaven-plugin</artifactId>
                        <version>1.0</version>
                        <executions>
                            <execution>
                                <phase>pre-clean</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <version>${docker.fabric.version}</version>
                        <configuration>
                            <verbose>true</verbose>
                            <apiVersion>1.23</apiVersion>
                            <images>
                                <image>
                                    <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
                                    <build>
                                        <filter>@</filter>
                                        <tags>
                                            <tag>latest</tag>
                                            <tag>${project.docker.latesttag.version}</tag>
                                            <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
                                        </tags>
                                        <cleanup>try</cleanup>
                                        <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
                                        <assembly>
                                            <inline>
                                                <fileSets>
                                                    <fileSet>
                                                        <directory>${aai.build.directory}</directory>
                                                        <outputDirectory>/${project.artifactId}</outputDirectory>
                                                    </fileSet>
                                                </fileSets>
                                            </inline>
                                        </assembly>
                                    </build>
                                </image>
                            </images>
                        </configuration>
                        <executions>
                            <execution>
                                <id>clean-images</id>
                                <phase>pre-clean</phase>
                                <goals>
                                    <goal>remove</goal>
                                </goals>
                                <configuration>
                                    <removeAll>true</removeAll>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-images</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>build</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>push-images</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>push</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>25.0-jre</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <!-- Start of graphadmin metric collection dependencies -->
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
            <version>${micrometer.version}</version>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-prometheus</artifactId>
            <version>${micrometer.version}</version>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-jersey2</artifactId>
            <version>${micrometer.version}</version>
        </dependency>
        <!-- End of graphadmin metric collection dependencies -->

        <dependency>
            <groupId>javax.jms</groupId>
            <artifactId>javax.jms-api</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.onap.aai.aai-common</groupId>
            <artifactId>aai-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.dropwizard.metrics</groupId>
                    <artifactId>metrics-jmx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.onap.aai.aai-common</groupId>
                    <artifactId>aai-aaf-auth</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>jersey-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-http</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-server</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-web</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
        </dependency>

        <!-- Start of Logback Dependencies -->
        <dependency>
            <groupId>com.att.eelf</groupId>
            <artifactId>eelf-core</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-access</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
        </dependency>
        <dependency>
            <groupId>net.logstash.logback</groupId>
            <artifactId>logstash-logback-encoder</artifactId>
            <version>6.6</version>
        </dependency>
        <!-- End of Logback Dependencies -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-cql</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.janusgraph</groupId>
            <artifactId>janusgraph-inmemory</artifactId>
            <version>${janusgraph.version}</version>
            <scope>test</scope>
        </dependency>


        <!-- Start of Tinkerpop Dependencies -->
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>tinkergraph-gremlin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-driver</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- End of Tinkerpop Dependencies -->
        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.moxy</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <!--
            Do not use activemq-all because they force you to use a specific logging
            and they shade it so you can't simply exclude it and when you deploy the
            jar, you will notice failure
        -->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-broker</artifactId>
            <version>${activemq.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-client</artifactId>
            <version>${activemq.version}</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-json</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>jackson-mapper-asl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Do not use the jersey-client since jersey client 1.0 version clashes
            with jersey 2 which we are using -->
        <!-- Use this to make http requests instead of jersey 1.0 client -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <!-- Start of Spring Framework Dependencies -->
        <!--
            Explicitly stating the security spring framework and
            exclude the bouncy castle since that is somehow overwriting
            our p12 file decryption that's built into java security
            This will cause the password is incorrect
            This needs to be added back if org.bouncy castle dependency
            sneaks backs in and causing issues with the two way ssl
        -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-rsa</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcpkix-jdk15on</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>jersey-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jersey</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- End of Spring Framework Dependencies -->
        <!-- Start of Netty Dependencies -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>${netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
            <version>${netty.handler.version}</version>
        </dependency>
        <!-- End of Netty Dependencies -->
        <!-- Start of Antlr dependencies for DSL -->
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-maven-plugin</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.sonatype.sisu</groupId>
                    <artifactId>sisu-guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.beust</groupId>
            <artifactId>jcommander</artifactId>
            <version>${jcommander.version}</version>
          </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.vaadin.external.google</groupId>
                    <artifactId>android-json</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
          </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>com.github.kongchen</groupId>
                                        <artifactId>swagger-maven-plugin</artifactId>
                                        <versionRange>3.1.3</versionRange>
                                        <goals>
                                            <goal>generate</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.8</version>
                    <executions>
                        <execution>
                            <id>unpack-schema-dependency</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>unpack</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>org.onap.aai.schema-service</groupId>
                                        <artifactId>aai-schema</artifactId>
                                        <version>${aai.schema.service.version}</version>
                                        <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory>
                                        <includes>**/oxm/**/*.xml</includes>
                                    </artifactItem>
                                </artifactItems>
                                <!-- other configurations here -->
                            </configuration>
                        </execution>
                        <execution>
                            <id>unpack-edgerules-dependency</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>unpack</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>org.onap.aai.schema-service</groupId>
                                        <artifactId>aai-schema</artifactId>
                                        <version>${aai.schema.service.version}</version>
                                        <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory>
                                        <includes>**/dbedgerules/**/*.json</includes>
                                    </artifactItem>
                                </artifactItems>
                                <!-- other configurations here -->
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.groovy.maven</groupId>
                    <artifactId>gmaven-plugin</artifactId>
                    <version>1.0</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>execute</goal>
                            </goals>
                            <configuration>
                                <source>
                                    println project.properties['aai.project.version'];
                                    def versionArray;
                                    if (project.properties['aai.project.version'] != null) {
                                        versionArray = project.properties['aai.project.version'].split('\\.');
                                    }

                                    project.properties["project.major.version"] = versionArray[0];
                                    project.properties["project.minor.version"] = versionArray[1];
                                    project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
                                    println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
                                </source>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                    <configuration>
                        <header>LICENSE.TXT</header>
                        <includes>
                            <include>src/main/java/**</include>
                            <include>src/test/java/**</include>
                            <include>pom.xml</include>
                        </includes>
                        <skipExistingHeaders>true</skipExistingHeaders>
                        <skip>false</skip>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <!-- Set goal to "format" to auto update license headers -->
                                <goal>${license.goal.type}</goal>
                            </goals>
                            <phase>process-sources</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!--
            Using https://code.revelc.net/formatter-maven-plugin/ for Eclipse formatter
            Using https://github.com/diffplug/spotless/tree/master/plugin-maven for import order
            Use in combination to rewrite code and imports, then checkstyle

            mvn formatter:format spotless:apply process-sources
            -->
            <plugin>
                 <groupId>net.revelc.code.formatter</groupId>
                 <artifactId>formatter-maven-plugin</artifactId>
                 <version>2.8.1</version>
                 <configuration>
                    <configFile>${project.basedir}/onap-java-formatter.xml</configFile>
                 </configuration>
                 <!-- https://code.revelc.net/formatter-maven-plugin/
                      use mvn formatter:format to rewrite source files
                      use mvn formatter:validate to validate source files -->
             </plugin>
            <plugin>
              <groupId>com.diffplug.spotless</groupId>
              <artifactId>spotless-maven-plugin</artifactId>
              <version>1.18.0</version>
              <configuration>
                <java>
                 <importOrder>
                   <order>com,java,javax,org</order>
                 </importOrder>
                </java>
              </configuration>
            <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
                 use mvn spotless:apply to rewrite source files
                 use mvn spotless:check to validate source files -->
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.6</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-webdav-jackrabbit</artifactId>
                        <version>2.10</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.codehaus.groovy.maven</groupId>
                <artifactId>gmaven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${project.basedir}/src/main/resources/etc/oxm</directory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                        <fileset>
                            <directory>${project.basedir}/src/main/resources/etc/dbedgerules</directory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                        <fileset>
                            <directory>${project.basedir}/src/main/resources/schema</directory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <!-- Used for unit tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <!-- <argLine>-noverify ${argLine}</argLine> -->
                    <argLine>-Xmx4096m</argLine>
                    <runOrder>alphabetical</runOrder>
                    <!-- <forkCount>0</forkCount> -->
                </configuration>
        </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>${start-class}</mainClass>
                    <layout>ZIP</layout>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/descriptor.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>${antlr.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>src/main/resources/antlr4</sourceDirectory>
                            <!-- <outputDirectory>src/main/java/antlr4</outputDirectory> -->
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <!-- mention the logback.xml location through system property or environment
            variable to edit logback.xml at run time -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/swm</directory>
                <targetPath>${project.build.directory}/swm</targetPath>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
                <includes>
                    <include>janusgraph-realtime.properties</include>
                    <include>janusgraph-cached.properties</include>
                    <include>aaiconfig.properties</include>
                    <include>aaiEventDMaaPPublisher.properties</include>
                    <include>preferredRoute.txt</include>
                    <include>datatoolscrons.properties</include>
                </includes>
                <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig
                </targetPath>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <includes>
                    <include>application.properties</include>
                    <include>*logback.xml</include>
                    <include>hbase-site.xml</include>
                </includes>
                <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig
                </targetPath>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/resources/schema/</directory>
                <includes>
                    <include>**/oxm/**/*.xml</include>
                    <include>**/dbedgerules/**/*.json</include>
                </includes>
                <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema</targetPath>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/docker</directory>
                <includes>
                    <include>**/*</include>
                </includes>
                <targetPath>${aai.build.directory}</targetPath>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/resources/etc/auth</directory>
                <includes>
                    <include>**/*</include>
                </includes>
                <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig
                </targetPath>
                <filtering>false</filtering>
            </resource>
            <!--
               Place any files related for migration related into migration-input-files
               so they can be packaged into this location here so it can be volumed
               into the container as one folder rather than do this for each subfolder
           -->
            <resource>
                <directory>${project.basedir}/src/main/resources/migration-input-files</directory>
                <includes>
                    <include>**/*</include>
                </includes>
                <targetPath>
                    ${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/migration-input-files
                </targetPath>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>ecomp-snapshots</id>
            <name>ECOMP Snapshot Repository</name>
            <url>${onap.nexus.url}/content/repositories/snapshots/</url>
        </snapshotRepository>
        <site>
            <id>ecomp-site</id>
            <url>dav:${onap.nexus.url}${sitePath}</url>
        </site>
    </distributionManagement>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
                    <docletArtifact>
                        <groupId>org.umlgraph</groupId>
                        <artifactId>umlgraph</artifactId>
                        <version>5.6</version>
                    </docletArtifact>
                    <additionalparam>-views -Xdoclint:none</additionalparam>
                    <excludePackageNames>org.onap.aai.domain.yang.*:org.onap.aai.util.*</excludePackageNames>
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <!-- Start of ONAP Specific Repositories -->
    <repositories>
        <repository>
            <id>AJSC</id>
            <name>AJSC repository</name>
            <url>https://mvnrepository.com/artifact/com.att.ajsc</url>
        </repository>
        <repository>
            <id>restlet</id>
            <name>maven reslet</name>
            <url>https://maven.restlet.com/</url>
        </repository>

        <repository>
            <id>central</id>
            <name>Maven 2 repository 2</name>
            <url>http://repo2.maven.org/maven2/</url>
        </repository>
        <repository>
            <id>ecomp-releases</id>
            <name>ECOMP Release Repository</name>
            <url>${onap.nexus.url}/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>ecomp-staging</id>
            <name>ECOMP Staging Repository</name>
            <url>${onap.nexus.url}/content/repositories/staging/</url>
        </repository>
        <repository>
            <id>ecomp-snapshots</id>
            <name>ECOMP Snapshot Repository</name>
            <url>${onap.nexus.url}/content/repositories/snapshots/</url>
        </repository>
    </repositories>
    <!-- End of ONAP Specific Repositories -->
</project>