diff options
30 files changed, 1046 insertions, 1050 deletions
diff --git a/aai-aaf-auth/pom.xml b/aai-aaf-auth/pom.xml index 883ed593..580f56eb 100644 --- a/aai-aaf-auth/pom.xml +++ b/aai-aaf-auth/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-aaf-auth</artifactId> diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java index dfac48dd..46285396 100644 --- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java +++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java @@ -23,7 +23,7 @@ package org.onap.aai.aaf.filters; import org.onap.aai.aaf.auth.ResponseFormatter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter; +import org.springframework.boot.web.filter.OrderedRequestContextFilter; import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Component; @@ -79,6 +79,9 @@ public class AafAuthorizationFilter extends OrderedRequestContextFilter { @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws IOException, ServletException { + if(request.getRequestURI().matches("^.*/util/echo$")){ + filterChain.doFilter(request, response); + } if(request.getRequestURI().endsWith("/query")){ gremlinFilter.doBasicAuthFilter(request, response, filterChain); } else { diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java index e0adf191..7ec6bb64 100644 --- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java +++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java @@ -23,7 +23,7 @@ package org.onap.aai.aaf.filters; import org.onap.aai.aaf.auth.AafRequestFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter; +import org.springframework.boot.web.filter.OrderedRequestContextFilter; import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Component; diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java index 7a47b972..71238cfc 100644 --- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java +++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java @@ -27,7 +27,7 @@ import org.onap.aaf.cadi.filter.CadiFilter; import org.onap.aai.aaf.auth.AafRequestFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter; +import org.springframework.boot.web.filter.OrderedRequestContextFilter; import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Component; diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java index e6769dda..16d9afd2 100644 --- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java +++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java @@ -26,7 +26,7 @@ import org.onap.aaf.cadi.PropAccess; import org.onap.aaf.cadi.filter.CadiFilter; import org.onap.aai.aaf.auth.ResponseFormatter; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter; +import org.springframework.boot.web.filter.OrderedRequestContextFilter; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/TwoWaySslAuthorization.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/TwoWaySslAuthorization.java index 150802b8..0e206c50 100644 --- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/TwoWaySslAuthorization.java +++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/TwoWaySslAuthorization.java @@ -26,7 +26,7 @@ import org.onap.aai.aaf.auth.CertUtil; import org.onap.aai.aaf.auth.ResponseFormatter; import org.onap.aai.exceptions.AAIException; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter; +import org.springframework.boot.web.filter.OrderedRequestContextFilter; import org.springframework.context.annotation.Profile; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; diff --git a/aai-annotations/pom.xml b/aai-annotations/pom.xml index 1db79303..e11c6196 100644 --- a/aai-annotations/pom.xml +++ b/aai-annotations/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-annotations</artifactId> diff --git a/aai-auth/pom.xml b/aai-auth/pom.xml index 12c10aaf..0dbd11ab 100644 --- a/aai-auth/pom.xml +++ b/aai-auth/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-auth</artifactId> diff --git a/aai-common-docker/aai-common-images/pom.xml b/aai-common-docker/aai-common-images/pom.xml index 57f845cd..31b878b1 100644 --- a/aai-common-docker/aai-common-images/pom.xml +++ b/aai-common-docker/aai-common-images/pom.xml @@ -25,11 +25,11 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-common-docker</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> </parent> <artifactId>aai-common-images</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <packaging>pom</packaging> <name>aai-aai-common-images</name> <description>Contains dockerfiles for aai-common images (alpine and ubuntu based).</description> diff --git a/aai-common-docker/aai-haproxy-image/pom.xml b/aai-common-docker/aai-haproxy-image/pom.xml index cfda0299..d77f7f62 100644 --- a/aai-common-docker/aai-haproxy-image/pom.xml +++ b/aai-common-docker/aai-haproxy-image/pom.xml @@ -25,11 +25,11 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-common-docker</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> </parent> <artifactId>aai-haproxy-image</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <packaging>pom</packaging> <name>aai-aai-haproxy-image</name> <description>Contains dockerfiles for aai-haproxy image.</description> diff --git a/aai-common-docker/pom.xml b/aai-common-docker/pom.xml index 009b4a04..1eec1141 100644 --- a/aai-common-docker/pom.xml +++ b/aai-common-docker/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> diff --git a/aai-core/pom.xml b/aai-core/pom.xml index eb8e8ee7..84fb4dc8 100644 --- a/aai-core/pom.xml +++ b/aai-core/pom.xml @@ -28,7 +28,7 @@ limitations under the License. <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-core</artifactId> diff --git a/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java b/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java index 6173e4bd..d373ae78 100644 --- a/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java +++ b/aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java @@ -26,7 +26,6 @@ import org.onap.aai.restclient.NoAuthRestClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; -import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.util.MultiValueMap; diff --git a/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java b/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java index fc32f859..a757d3db 100644 --- a/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java +++ b/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java @@ -47,21 +47,25 @@ public class URITools { MultivaluedMap<String, String> result = new MultivaluedHashMap<>(); String queryParams = uri.getRawQuery(); if (queryParams != null) { - String[] sections = queryParams.split("&"); - String[] query = null; - String key, value = ""; - for (String section : sections) { - query = section.split("="); - key = UriUtils.decode(query[0], "UTF-8"); - if (query[1] != null) { - query[1] = query[1].replaceAll("\\+", "%20"); - } - value = UriUtils.decode(query[1], "UTF-8"); - if (result.containsKey(key)) { - result.add(key, value); - } else { - result.putSingle(key, value); + try { + String[] sections = queryParams.split("&"); + String[] query = null; + String key, value = ""; + for (String section : sections) { + query = section.split("="); + key = UriUtils.decode(query[0], "UTF-8"); + if (query[1] != null) { + query[1] = query[1].replaceAll("\\+", "%20"); + } + value = UriUtils.decode(query[1], "UTF-8"); + if (result.containsKey(key)) { + result.add(key, value); + } else { + result.putSingle(key, value); + } } + } catch (UnsupportedEncodingException e) { + } } return result; diff --git a/aai-els-onap-logging/pom.xml b/aai-els-onap-logging/pom.xml index 0ac283dc..2dcc6f61 100644 --- a/aai-els-onap-logging/pom.xml +++ b/aai-els-onap-logging/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-els-onap-logging</artifactId> diff --git a/aai-parent/pom.xml b/aai-parent/pom.xml index eecc370d..1a237e82 100644 --- a/aai-parent/pom.xml +++ b/aai-parent/pom.xml @@ -1,968 +1,966 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- -============LICENSE_START====================================================== -org.onap.aai -=============================================================================== -Copyright © 2019 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_START====================================================== + org.onap.aai + =============================================================================== + Copyright © 2019 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/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-common</artifactId> - <version>1.6.9-SNAPSHOT</version> - </parent> - <artifactId>aai-parent</artifactId> - <name>aai-parent</name> - <packaging>pom</packaging> - - <modules> - - </modules> - - <properties> - <!-- update this just prior to release or figure out something with version.properties --> - <aai.release.version>${aai.common.version}</aai.release.version> - <aai.common.logging.version>1.5.1</aai.common.logging.version> - <aai.rest.client.version>1.5.1</aai.rest.client.version> - <aai.schema.service.version>1.6.3</aai.schema.service.version> - - <aaf.version>2.1.15</aaf.version> - <antlr.version>4.7.2</antlr.version> - <activemq.version>5.15.11</activemq.version> - <codehaus.jackson.version>1.9.13</codehaus.jackson.version> - <commons.beanutils.version>1.9.4</commons.beanutils.version> - <commons.cli.version>1.4</commons.cli.version> - <commons.compress.version>1.19</commons.compress.version> - <commons.configuration.version>1.10</commons.configuration.version> - <commons.io.version>2.6</commons.io.version> - <commons.lang.version>2.6</commons.lang.version> - <commons.lang3.version>3.9</commons.lang3.version> - <commons.net.version>3.6</commons.net.version> - <commons.text.version>1.8</commons.text.version> - <docker.fabric.version>0.31.0</docker.fabric.version> - <dmaap.client.version>1.1.9</dmaap.client.version> - <easy.mock.version>4.0.2</easy.mock.version> - <eclipse.persistence.version>2.6.2</eclipse.persistence.version> - <eelf.core.version>1.0.1-oss</eelf.core.version> - <freemarker.version>2.3.29</freemarker.version> - <google.guava.version>19.0</google.guava.version> - <gremlin.version>3.2.3</gremlin.version> - <groovy.version>2.5.8</groovy.version> - <gson.version>2.8.6</gson.version> - <hamcrest.junit.version>2.0.0.0</hamcrest.junit.version> - <hamcrest.core.version>2.2</hamcrest.core.version> - <jackson.bom.version>2.10.1</jackson.bom.version> - <janusgraph.version>0.2.3</janusgraph.version> - <javatuples.version>1.2</javatuples.version> - <jaxb.version>2.2.12</jaxb.version> - <jaxrs.version>2.0.1</jaxrs.version> - <jcommander.version>1.78</jcommander.version> - <jersey.version>1.19.4</jersey.version> - <jnr.ffi.version>2.1.11</jnr.ffi.version> - <jolt.version>0.0.24</jolt.version> - <jopt.simple.version>5.0.4</jopt.simple.version> - <jsonassert.version>1.5.0</jsonassert.version> - <json.patch.version>1.9</json.patch.version> - <!-- - JSONPath has an bug when it tries to parse an expression - when nesting reaches three levels so an junit was failing - when it was moving to an library of 2.3.0 or above - There seems to be no new releases since 2017 so not sure if - this library is still active or not - We might need to move away from this library but its in the core logic - and would take some time to refactor - Please don't upgrade to 2.3.0 or above for nexus iq or security scans - as it could potentially break our code - --> - <json.path.version>2.2.0</json.path.version> - <json.version>20190722</json.version> - <junit.version>4.12</junit.version> - <httpclient.version>4.5.10</httpclient.version> - <io.swagger.version>1.5.24</io.swagger.version> - <logback.version>1.2.3</logback.version> - <slf4j.version>1.7.25</slf4j.version> - <log4j.version>1.2.17</log4j.version> - <mockito.all.version>1.10.19</mockito.all.version> - <mockito.core.version>1.10.19</mockito.core.version> - <netty.handler.version>4.1.43.Final</netty.handler.version> - <netty.version>4.0.56.Final</netty.version> - <opencsv.version>3.1</opencsv.version> - <powermock.version>1.6.6</powermock.version> - <plexus.utils.version>3.1.1</plexus.utils.version> - <reflections.version>0.9.10</reflections.version> - <snakeyaml.version>1.25</snakeyaml.version> - - <spring.boot.version>1.5.22.RELEASE</spring.boot.version> - <javax.servlet.version>3.1.0</javax.servlet.version> - <javax.annotation.version>1.2</javax.annotation.version> - - <sonar.jacoco.reportPath /> - <sonar.jacoco.itReportPath /> - <sonar.jacoco.reportMissing.force.zero /> - - <!-- we let things pass by default, set custom level for each child project --> - <jacoco.line.coverage.limit>0.00</jacoco.line.coverage.limit> - - <jacoco.version>0.8.5</jacoco.version> - <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version> - <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin> - <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> - <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions> - - <sonar.scanner.version>3.7.0.1746</sonar.scanner.version> - - <spring.version>5.1.13.RELEASE</spring.version> - <spring.jms.version>5.1.13.RELEASE</spring.jms.version> - <spring.test.version>5.1.13.RELEASE</spring.test.version> - <spring.security.rsa.version>1.0.8.RELEASE</spring.security.rsa.version> - <json.simple.version>1.1.1</json.simple.version> - <powermock.api.mockito2.version>2.0.4</powermock.api.mockito2.version> - <aspectj.version>1.9.1</aspectj.version> - <logging.analytics.version>1.5.1</logging.analytics.version> - </properties> - - <profiles> - <profile> - <id>spring-boot-2-1</id> - <properties> - <spring.boot.version>2.1.12.RELEASE</spring.boot.version> - </properties> - </profile> - </profiles> - - <dependencyManagement> - <dependencies> - - <dependency> - <groupId>com.googlecode.json-simple</groupId> - <artifactId>json-simple</artifactId> - <version>${json.simple.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-schema-ingest</artifactId> - <version>${aai.release.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-core</artifactId> - <version>${aai.release.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-aaf-auth</artifactId> - <version>${aai.release.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-els-onap-logging</artifactId> - <version>${aai.release.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-annotations</artifactId> - <version>${aai.release.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.aai-common</groupId> - <artifactId>aai-rest</artifactId> - <version>${aai.release.version}</version> - </dependency> - - <dependency> - <groupId>com.fasterxml.jackson</groupId> - <artifactId>jackson-bom</artifactId> - <version>${jackson.bom.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - <version>${spring.boot.version}</version> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-parent</artifactId> - <version>${spring.boot.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-dependencies</artifactId> - <version>${spring.boot.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-test</artifactId> - <scope>test</scope> - <version>${spring.boot.version}</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${spring.test.version}</version> - </dependency> - - <dependency> - <groupId>commons-configuration</groupId> - <artifactId>commons-configuration</artifactId> - <version>${commons.configuration.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - <version>${commons.lang3.version}</version> - </dependency> - - - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>${commons.lang.version}</version> - </dependency> - - <dependency> - <groupId>com.att.eelf</groupId> - <artifactId>eelf-core</artifactId> - <version>${eelf.core.version}</version> - </dependency> - - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-core</artifactId> - <version>${logback.version}</version> - </dependency> - - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - <version>${logback.version}</version> - </dependency> - - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-access</artifactId> - <version>${logback.version}</version> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> - </dependency> - - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>java-hamcrest</artifactId> - <version>${hamcrest.junit.version}</version> - </dependency> - - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> - <version>${hamcrest.core.version}</version> - </dependency> - - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-junit</artifactId> - <version>${hamcrest.junit.version}</version> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>${javax.servlet.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>javax.annotation-api</artifactId> - <version>${javax.annotation.version}</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>${google.guava.version}</version> - </dependency> - - <dependency> - <groupId>org.janusgraph</groupId> - <artifactId>janusgraph-core</artifactId> - <version>${janusgraph.version}</version> - </dependency> - - <dependency> - <groupId>org.janusgraph</groupId> - <artifactId>janusgraph-cassandra</artifactId> - <version>${janusgraph.version}</version> - </dependency> - - <dependency> - <groupId>org.janusgraph</groupId> - <artifactId>janusgraph-cql</artifactId> - <version>${janusgraph.version}</version> - </dependency> - - <dependency> - <groupId>com.github.jnr</groupId> - <artifactId>jnr-ffi</artifactId> - <version>${jnr.ffi.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tinkerpop</groupId> - <artifactId>tinkergraph-gremlin</artifactId> - <version>${gremlin.version}</version> - </dependency> - <dependency> - <groupId>org.apache.tinkerpop</groupId> - <artifactId>gremlin-core</artifactId> - <version>${gremlin.version}</version> - </dependency> - <dependency> - <groupId>org.apache.tinkerpop</groupId> - <artifactId>gremlin-driver</artifactId> - <version>${gremlin.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.tinkerpop</groupId> - <artifactId>gremlin-groovy</artifactId> - <version>${gremlin.version}</version> - </dependency> - - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy</artifactId> - <version>${groovy.version}</version> - <classifier>indy</classifier> - </dependency> - - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>${mockito.all.version}</version> - </dependency> - - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>${mockito.core.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-junit4</artifactId> - <version>${powermock.version}</version> - </dependency> - - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-junit4-rule-agent</artifactId> - <version>${powermock.version}</version> - </dependency> - - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito2</artifactId> - <version>${powermock.api.mockito2.version}</version> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-core</artifactId> - <version>${powermock.api.mockito2.version}</version> - </dependency> - <dependency> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-javaagent</artifactId> - <version>${powermock.version}</version> - </dependency> - <dependency> - <groupId>com.beust</groupId> - <artifactId>jcommander</artifactId> - <version>${jcommander.version}</version> - </dependency> - - <dependency> - <groupId>org.antlr</groupId> - <artifactId>antlr4-runtime</artifactId> - <version>${antlr.version}</version> - </dependency> - <dependency> - <groupId>org.antlr</groupId> - <artifactId>antlr4-maven-plugin</artifactId> - <version>${antlr.version}</version> - </dependency> - - <dependency> - <groupId>org.json</groupId> - <artifactId>json</artifactId> - <version>${json.version}</version> - </dependency> - - <dependency> - <groupId>org.freemarker</groupId> - <artifactId>freemarker</artifactId> - <version>${freemarker.version}</version> - </dependency> - - <dependency> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>${jaxb.version}</version> - </dependency> - - <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>org.apache.activemq</groupId> - <artifactId>activemq-openwire-legacy</artifactId> - <version>${activemq.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-cadi-core</artifactId> - <version>${aaf.version}</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-cadi-aaf</artifactId> - <version>${aaf.version}</version> - <scope>compile</scope> - </dependency> - - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymock</artifactId> - <version>${easy.mock.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-xjc</artifactId> - <version>${jaxb.version}</version> - </dependency> - - <dependency> - <groupId>org.eclipse.persistence</groupId> - <artifactId>eclipselink</artifactId> - <version>${eclipse.persistence.version}</version> - </dependency> - - <dependency> - <groupId>org.eclipse.persistence</groupId> - <artifactId>org.eclipse.persistence.moxy</artifactId> - <version>${eclipse.persistence.version}</version> - </dependency> - - <dependency> - <groupId>com.github.fge</groupId> - <artifactId>json-patch</artifactId> - <version>${json.patch.version}</version> - </dependency> - - <dependency> - <groupId>com.jayway.jsonpath</groupId> - <artifactId>json-path</artifactId> - <version>${json.path.version}</version> - </dependency> - <dependency> - <groupId>com.jayway.jsonpath</groupId> - <artifactId>json-path-assert</artifactId> - <version>${json.path.version}</version> - </dependency> - - <dependency> - <groupId>org.javatuples</groupId> - <artifactId>javatuples</artifactId> - <version>${javatuples.version}</version> - </dependency> - - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>${gson.version}</version> - </dependency> - - - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-text</artifactId> - <version>${commons.text.version}</version> - </dependency> - - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-core-asl</artifactId> - <version>${codehaus.jackson.version}</version> - </dependency> - - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-core</artifactId> - <version>${jersey.version}</version> - </dependency> - - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-client</artifactId> - <version>${jersey.version}</version> - </dependency> - - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-json</artifactId> - <version>${jersey.version}</version> - </dependency> - - <dependency> - <groupId>javax.ws.rs</groupId> - <artifactId>javax.ws.rs-api</artifactId> - <version>${jaxrs.version}</version> - </dependency> - - <dependency> - <groupId>commons-cli</groupId> - <artifactId>commons-cli</artifactId> - <version>${commons.cli.version}</version> - </dependency> - - <dependency> - <groupId>com.bazaarvoice.jolt</groupId> - <artifactId>jolt-complete</artifactId> - <version>${jolt.version}</version> - </dependency> - - <dependency> - <groupId>com.opencsv</groupId> - <artifactId>opencsv</artifactId> - <version>${opencsv.version}</version> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>${log4j.version}</version> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>apache-log4j-extras</artifactId> - <version>${log4j.version}</version> - </dependency> - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>${commons.io.version}</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-orm</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-oxm</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-aspects</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-tx</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-webmvc</artifactId> - <version>${spring.version}</version> - </dependency> - - <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-rsa</artifactId> - <version>${spring.security.rsa.version}</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jms</artifactId> - <version>${spring.jms.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>common-logging</artifactId> - <version>${aai.common.logging.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>logging-api</artifactId> - <version>${aai.common.logging.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.logging-analytics</groupId> - <artifactId>logging-slf4j</artifactId> - <version>${logging.analytics.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai</groupId> - <artifactId>rest-client</artifactId> - <version>${aai.rest.client.version}</version> - </dependency> - - <dependency> - <groupId>net.sf.jopt-simple</groupId> - <artifactId>jopt-simple</artifactId> - <version>${jopt.simple.version}</version> - </dependency> - - <dependency> - <groupId>io.swagger</groupId> - <artifactId>swagger-core</artifactId> - <version>${io.swagger.version}</version> - </dependency> - - <dependency> - <groupId>org.aspectj</groupId> - <artifactId>aspectjrt</artifactId> - <version>${aspectj.version}</version> - </dependency> - - <dependency> - <groupId>io.swagger</groupId> - <artifactId>swagger-annotations</artifactId> - <version>${io.swagger.version}</version> - </dependency> - - <dependency> - <groupId>io.swagger</groupId> - <artifactId>swagger-jersey-jaxrs</artifactId> - <version>${io.swagger.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId> - <artifactId>dmaapClient</artifactId> - <version>${dmaap.client.version}</version> - </dependency> - - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-handler</artifactId> - <version>${netty.handler.version}</version> - </dependency> - - <dependency> - <groupId>io.netty</groupId> - <artifactId>netty-all</artifactId> - <version>${netty.version}</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.schema-service</groupId> - <artifactId>aai-schema</artifactId> - <version>${aai.schema.service.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>${httpclient.version}</version> - </dependency> - - <dependency> - <groupId>org.skyscreamer</groupId> - <artifactId>jsonassert</artifactId> - <version>${jsonassert.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-utils</artifactId> - <version>${plexus.utils.version}</version> - </dependency> - - <dependency> - <groupId>org.yaml</groupId> - <artifactId>snakeyaml</artifactId> - <version>${snakeyaml.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-compress</artifactId> - <version>${commons.compress.version}</version> - </dependency> - - <dependency> - <groupId>org.reflections</groupId> - <artifactId>reflections</artifactId> - <version>${reflections.version}</version> - </dependency> - - <dependency> - <groupId>commons-net</groupId> - <artifactId>commons-net</artifactId> - <version>${commons.net.version}</version> - </dependency> - - </dependencies> - - </dependencyManagement> - - <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <version>${spring.boot.version}</version> - </plugin> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>${docker.fabric.version}</version> - </plugin> - - <plugin> - <groupId>org.jacoco</groupId> - <artifactId>jacoco-maven-plugin</artifactId> - <version>${jacoco.version}</version> - <configuration> - <!-- Note: This exclusion list should match <sonar.exclusions> property - above --> - <excludes> - <exclude>**/gen/**</exclude> - <exclude>**/generated-sources/**</exclude> - <exclude>**/yang-gen/**</exclude> - <exclude>**/pax/**</exclude> - </excludes> - </configuration> - <executions> - <!-- Prepares the property pointing to the JaCoCo runtime agent which - is passed as VM argument when Maven the Surefire plugin is executed. --> - <execution> - <id>pre-unit-test</id> - <goals> - <goal>prepare-agent</goal> - </goals> - <configuration> - <!-- Sets the path to the file which contains the execution data - . --> - <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile> - <!-- Sets the name of the property containing the settings for JaCoCo - runtime agent. --> - <propertyName>surefireArgLine</propertyName> - </configuration> - </execution> - <!-- Ensures that the code coverage report for unit tests is created - after unit tests have been run. --> - <execution> - <id>post-unit-test</id> - <phase>test</phase> - <goals> - <goal>report</goal> - </goals> - <configuration> - <!-- Sets the path to the file which contains the execution data - . --> - <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> - <!-- Sets the output directory for the code coverage report. --> - <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> - </configuration> - </execution> - <execution> - <id>pre-integration-test</id> - <phase>pre-integration-test</phase> - <goals> - <goal>prepare-agent</goal> - </goals> - <configuration> - <!-- Sets the path to the file which contains the execution data - . --> - <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile> - <!-- Sets the name of the property containing the settings for JaCoCo - runtime agent. --> - <propertyName>failsafeArgLine</propertyName> - </configuration> - </execution> - <!-- Ensures that the code coverage report for integration tests after - integration tests have been run. --> - <execution> - <id>post-integration-test</id> - <phase>post-integration-test</phase> - <goals> - <goal>report</goal> - </goals> - <configuration> - <!-- Sets the path to the file which contains the execution data - . --> - <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile> - <!-- Sets the output directory for the code coverage report. --> - <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory> - </configuration> - </execution> - <execution> - <id>default-check</id> - <goals> - <goal>check</goal> - </goals> - <configuration> - <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> - <rules> - <rule implementation="org.jacoco.maven.RuleConfiguration"> - <element>BUNDLE</element> - <limits> - <limit implementation="org.jacoco.report.check.Limit"> - <counter>LINE</counter> - <value>COVEREDRATIO</value> - <minimum>${jacoco.line.coverage.limit}</minimum> - </limit> - </limits> - </rule> - </rules> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>3.0.0-M4</version> - <configuration> - <!-- Sets the VM argument line used when unit tests are run. --> - <argLine>${surefireArgLine}</argLine> - <!-- Excludes integration tests when unit tests are run. --> - <excludes> - <exclude>**/IT*.java</exclude> - </excludes> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>3.0.0-M4</version> - <executions> - <!-- Ensures that both integration-test and verify goals of the Failsafe - Maven plugin are executed. --> - <execution> - <id>integration-tests</id> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - <configuration> - <!-- Sets the VM argument line used when integration tests are run. --> - <argLine>${failsafeArgLine}</argLine> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.sonarsource.scanner.maven</groupId> - <artifactId>sonar-maven-plugin</artifactId> - <version>${sonar.scanner.version}</version> - </plugin> - - </plugins> - </pluginManagement> - - <plugins> - <plugin> - <groupId>org.jacoco</groupId> - <artifactId>jacoco-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - </plugin> - </plugins> - - </build> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-common</artifactId> + <version>1.6.10-SNAPSHOT</version> + </parent> + <artifactId>aai-parent</artifactId> + <name>aai-parent</name> + <packaging>pom</packaging> + + <modules> + + </modules> + + <properties> + <!-- update this just prior to release or figure out something with version.properties --> + <aai.release.version>${aai.common.version}</aai.release.version> + <aai.common.logging.version>1.5.1</aai.common.logging.version> + <aai.rest.client.version>1.5.1</aai.rest.client.version> + <aai.schema.service.version>1.6.4</aai.schema.service.version> + + <aaf.version>2.1.15</aaf.version> + <antlr.version>4.7.2</antlr.version> + <activemq.version>5.15.11</activemq.version> + <codehaus.jackson.version>1.9.13</codehaus.jackson.version> + <commons.beanutils.version>1.9.4</commons.beanutils.version> + <commons.cli.version>1.4</commons.cli.version> + <commons.compress.version>1.19</commons.compress.version> + <commons.configuration.version>1.10</commons.configuration.version> + <commons.io.version>2.6</commons.io.version> + <commons.lang.version>2.6</commons.lang.version> + <commons.lang3.version>3.9</commons.lang3.version> + <commons.net.version>3.6</commons.net.version> + <commons.text.version>1.8</commons.text.version> + <docker.fabric.version>0.31.0</docker.fabric.version> + <dmaap.client.version>1.1.9</dmaap.client.version> + <easy.mock.version>4.0.2</easy.mock.version> + <eclipse.persistence.version>2.6.2</eclipse.persistence.version> + <eelf.core.version>1.0.1-oss</eelf.core.version> + <freemarker.version>2.3.29</freemarker.version> + <google.guava.version>19.0</google.guava.version> + <gremlin.version>3.2.3</gremlin.version> + <groovy.version>2.5.8</groovy.version> + <gson.version>2.8.6</gson.version> + <hamcrest.junit.version>2.0.0.0</hamcrest.junit.version> + <hamcrest.core.version>2.2</hamcrest.core.version> + <jackson.bom.version>2.10.1</jackson.bom.version> + <janusgraph.version>0.2.3</janusgraph.version> + <javatuples.version>1.2</javatuples.version> + <jaxb.version>2.2.12</jaxb.version> + <jaxrs.version>2.0.1</jaxrs.version> + <jcommander.version>1.78</jcommander.version> + <jersey.version>1.19.4</jersey.version> + <jnr.ffi.version>2.1.11</jnr.ffi.version> + <jolt.version>0.0.24</jolt.version> + <jopt.simple.version>5.0.4</jopt.simple.version> + <jsonassert.version>1.5.0</jsonassert.version> + <json.patch.version>1.9</json.patch.version> + <!-- + JSONPath has an bug when it tries to parse an expression + when nesting reaches three levels so an junit was failing + when it was moving to an library of 2.3.0 or above + There seems to be no new releases since 2017 so not sure if + this library is still active or not + We might need to move away from this library but its in the core logic + and would take some time to refactor + Please don't upgrade to 2.3.0 or above for nexus iq or security scans + as it could potentially break our code + --> + <json.path.version>2.2.0</json.path.version> + <json.version>20190722</json.version> + <junit.version>4.12</junit.version> + <httpclient.version>4.5.10</httpclient.version> + <io.swagger.version>1.5.24</io.swagger.version> + <logback.version>1.2.3</logback.version> + <slf4j.version>1.7.25</slf4j.version> + <log4j.version>1.2.17</log4j.version> + <mockito.all.version>1.10.19</mockito.all.version> + <mockito.core.version>2.15.0</mockito.core.version> + <netty.handler.version>4.1.43.Final</netty.handler.version> + <netty.version>4.0.56.Final</netty.version> + <opencsv.version>3.1</opencsv.version> + <powermock.version>1.6.6</powermock.version> + <plexus.utils.version>3.1.1</plexus.utils.version> + <reflections.version>0.9.10</reflections.version> + <snakeyaml.version>1.25</snakeyaml.version> + + <spring.boot.version>1.5.22.RELEASE</spring.boot.version> + <javax.servlet.version>3.1.0</javax.servlet.version> + <javax.annotation.version>1.2</javax.annotation.version> + + <sonar.jacoco.reportPath /> + <sonar.jacoco.itReportPath /> + <sonar.jacoco.reportMissing.force.zero /> + + <!-- we let things pass by default, set custom level for each child project --> + <jacoco.line.coverage.limit>0.00</jacoco.line.coverage.limit> + + <jacoco.version>0.8.5</jacoco.version> + <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version> + <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin> + <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> + <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions> + + <sonar.scanner.version>3.7.0.1746</sonar.scanner.version> + + <spring.version>4.3.25.RELEASE</spring.version> + <spring.jms.version>4.3.25.RELEASE</spring.jms.version> + <spring.test.version>4.3.25.RELEASE</spring.test.version> + <spring.security.rsa.version>1.0.8.RELEASE</spring.security.rsa.version> + <json.simple.version>1.1.1</json.simple.version> + <powermock.api.mockito2.version>2.0.4</powermock.api.mockito2.version> + <aspectj.version>1.9.1</aspectj.version> + <logging.analytics.version>1.5.1</logging.analytics.version> + </properties> + + <profiles> + <profile> + <id>spring-boot-2-1</id> + <properties> + <spring.boot.version>1.5.22.RELEASE</spring.boot.version> + </properties> + </profile> + </profiles> + + <dependencyManagement> + <dependencies> + + <dependency> + <groupId>com.googlecode.json-simple</groupId> + <artifactId>json-simple</artifactId> + <version>${json.simple.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-schema-ingest</artifactId> + <version>${aai.release.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-core</artifactId> + <version>${aai.release.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-aaf-auth</artifactId> + <version>${aai.release.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-els-onap-logging</artifactId> + <version>${aai.release.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-annotations</artifactId> + <version>${aai.release.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.aai-common</groupId> + <artifactId>aai-rest</artifactId> + <version>${aai.release.version}</version> + </dependency> + + <dependency> + <groupId>com.fasterxml.jackson</groupId> + <artifactId>jackson-bom</artifactId> + <version>${jackson.bom.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + <version>${spring.boot.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-parent</artifactId> + <version>${spring.boot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${spring.boot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-test</artifactId> + <scope>test</scope> + <version>${spring.boot.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.test.version}</version> + </dependency> + + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>${commons.configuration.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>${commons.lang3.version}</version> + </dependency> + + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>${commons.lang.version}</version> + </dependency> + + <dependency> + <groupId>com.att.eelf</groupId> + <artifactId>eelf-core</artifactId> + <version>${eelf.core.version}</version> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>${logback.version}</version> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>${logback.version}</version> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-access</artifactId> + <version>${logback.version}</version> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>java-hamcrest</artifactId> + <version>${hamcrest.junit.version}</version> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-core</artifactId> + <version>${hamcrest.core.version}</version> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-junit</artifactId> + <version>${hamcrest.junit.version}</version> + </dependency> + + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + <version>${javax.servlet.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>javax.annotation-api</artifactId> + <version>${javax.annotation.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${junit.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>${google.guava.version}</version> + </dependency> + + <dependency> + <groupId>org.janusgraph</groupId> + <artifactId>janusgraph-core</artifactId> + <version>${janusgraph.version}</version> + </dependency> + + <dependency> + <groupId>org.janusgraph</groupId> + <artifactId>janusgraph-cassandra</artifactId> + <version>${janusgraph.version}</version> + </dependency> + + <dependency> + <groupId>org.janusgraph</groupId> + <artifactId>janusgraph-cql</artifactId> + <version>${janusgraph.version}</version> + </dependency> + + <dependency> + <groupId>com.github.jnr</groupId> + <artifactId>jnr-ffi</artifactId> + <version>${jnr.ffi.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.tinkerpop</groupId> + <artifactId>tinkergraph-gremlin</artifactId> + <version>${gremlin.version}</version> + </dependency> + <dependency> + <groupId>org.apache.tinkerpop</groupId> + <artifactId>gremlin-core</artifactId> + <version>${gremlin.version}</version> + </dependency> + <dependency> + <groupId>org.apache.tinkerpop</groupId> + <artifactId>gremlin-driver</artifactId> + <version>${gremlin.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.tinkerpop</groupId> + <artifactId>gremlin-groovy</artifactId> + <version>${gremlin.version}</version> + </dependency> + + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy</artifactId> + <version>${groovy.version}</version> + <classifier>indy</classifier> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-all</artifactId> + <version>${mockito.all.version}</version> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>${mockito.core.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + <version>${powermock.version}</version> + </dependency> + + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4-rule-agent</artifactId> + <version>${powermock.version}</version> + </dependency> + + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito2</artifactId> + <version>${powermock.api.mockito2.version}</version> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-core</artifactId> + <version>${powermock.api.mockito2.version}</version> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-javaagent</artifactId> + <version>${powermock.version}</version> + </dependency> + <dependency> + <groupId>com.beust</groupId> + <artifactId>jcommander</artifactId> + <version>${jcommander.version}</version> + </dependency> + + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr4-runtime</artifactId> + <version>${antlr.version}</version> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr4-maven-plugin</artifactId> + <version>${antlr.version}</version> + </dependency> + + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>${json.version}</version> + </dependency> + + <dependency> + <groupId>org.freemarker</groupId> + <artifactId>freemarker</artifactId> + <version>${freemarker.version}</version> + </dependency> + + <dependency> + <groupId>javax.xml.bind</groupId> + <artifactId>jaxb-api</artifactId> + <version>${jaxb.version}</version> + </dependency> + + <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>org.apache.activemq</groupId> + <artifactId>activemq-openwire-legacy</artifactId> + <version>${activemq.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aaf.authz</groupId> + <artifactId>aaf-cadi-core</artifactId> + <version>${aaf.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.onap.aaf.authz</groupId> + <artifactId>aaf-cadi-aaf</artifactId> + <version>${aaf.version}</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.easymock</groupId> + <artifactId>easymock</artifactId> + <version>${easy.mock.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-xjc</artifactId> + <version>${jaxb.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.persistence</groupId> + <artifactId>eclipselink</artifactId> + <version>${eclipse.persistence.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.persistence</groupId> + <artifactId>org.eclipse.persistence.moxy</artifactId> + <version>${eclipse.persistence.version}</version> + </dependency> + + <dependency> + <groupId>com.github.fge</groupId> + <artifactId>json-patch</artifactId> + <version>${json.patch.version}</version> + </dependency> + + <dependency> + <groupId>com.jayway.jsonpath</groupId> + <artifactId>json-path</artifactId> + <version>${json.path.version}</version> + </dependency> + <dependency> + <groupId>com.jayway.jsonpath</groupId> + <artifactId>json-path-assert</artifactId> + <version>${json.path.version}</version> + </dependency> + + <dependency> + <groupId>org.javatuples</groupId> + <artifactId>javatuples</artifactId> + <version>${javatuples.version}</version> + </dependency> + + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>${gson.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-text</artifactId> + <version>${commons.text.version}</version> + </dependency> + + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-core-asl</artifactId> + <version>${codehaus.jackson.version}</version> + </dependency> + + <dependency> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-core</artifactId> + <version>${jersey.version}</version> + </dependency> + + <dependency> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-client</artifactId> + <version>${jersey.version}</version> + </dependency> + + <dependency> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-json</artifactId> + <version>${jersey.version}</version> + </dependency> + + <dependency> + <groupId>javax.ws.rs</groupId> + <artifactId>javax.ws.rs-api</artifactId> + <version>${jaxrs.version}</version> + </dependency> + + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>${commons.cli.version}</version> + </dependency> + + <dependency> + <groupId>com.bazaarvoice.jolt</groupId> + <artifactId>jolt-complete</artifactId> + <version>${jolt.version}</version> + </dependency> + + <dependency> + <groupId>com.opencsv</groupId> + <artifactId>opencsv</artifactId> + <version>${opencsv.version}</version> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>${log4j.version}</version> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>apache-log4j-extras</artifactId> + <version>${log4j.version}</version> + </dependency> + + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${commons.io.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-orm</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-oxm</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aspects</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-tx</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-webmvc</artifactId> + <version>${spring.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework.security</groupId> + <artifactId>spring-security-rsa</artifactId> + <version>${spring.security.rsa.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jms</artifactId> + <version>${spring.jms.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.logging-service</groupId> + <artifactId>common-logging</artifactId> + <version>${aai.common.logging.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.logging-service</groupId> + <artifactId>logging-api</artifactId> + <version>${aai.common.logging.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.logging-analytics</groupId> + <artifactId>logging-slf4j</artifactId> + <version>${logging.analytics.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai</groupId> + <artifactId>rest-client</artifactId> + <version>${aai.rest.client.version}</version> + </dependency> + + <dependency> + <groupId>net.sf.jopt-simple</groupId> + <artifactId>jopt-simple</artifactId> + <version>${jopt.simple.version}</version> + </dependency> + + <dependency> + <groupId>io.swagger</groupId> + <artifactId>swagger-core</artifactId> + <version>${io.swagger.version}</version> + </dependency> + + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjrt</artifactId> + <version>${aspectj.version}</version> + </dependency> + + <dependency> + <groupId>io.swagger</groupId> + <artifactId>swagger-annotations</artifactId> + <version>${io.swagger.version}</version> + </dependency> + + <dependency> + <groupId>io.swagger</groupId> + <artifactId>swagger-jersey-jaxrs</artifactId> + <version>${io.swagger.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId> + <artifactId>dmaapClient</artifactId> + <version>${dmaap.client.version}</version> + </dependency> + + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-handler</artifactId> + <version>${netty.handler.version}</version> + </dependency> + + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> + <version>${netty.version}</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.schema-service</groupId> + <artifactId>aai-schema</artifactId> + <version>${aai.schema.service.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>${httpclient.version}</version> + </dependency> + + <dependency> + <groupId>org.skyscreamer</groupId> + <artifactId>jsonassert</artifactId> + <version>${jsonassert.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + <version>${plexus.utils.version}</version> + </dependency> + + <dependency> + <groupId>org.yaml</groupId> + <artifactId>snakeyaml</artifactId> + <version>${snakeyaml.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>${commons.compress.version}</version> + </dependency> + + <dependency> + <groupId>org.reflections</groupId> + <artifactId>reflections</artifactId> + <version>${reflections.version}</version> + </dependency> + + <dependency> + <groupId>commons-net</groupId> + <artifactId>commons-net</artifactId> + <version>${commons.net.version}</version> + </dependency> + + </dependencies> + + </dependencyManagement> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>${spring.boot.version}</version> + </plugin> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>${docker.fabric.version}</version> + </plugin> + + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>${jacoco.version}</version> + <configuration> + <!-- Note: This exclusion list should match <sonar.exclusions> property + above --> + <excludes> + <exclude>**/gen/**</exclude> + <exclude>**/generated-sources/**</exclude> + <exclude>**/yang-gen/**</exclude> + <exclude>**/pax/**</exclude> + </excludes> + </configuration> + <executions> + <!-- Prepares the property pointing to the JaCoCo runtime agent which + is passed as VM argument when Maven the Surefire plugin is executed. --> + <execution> + <id>pre-unit-test</id> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data + . --> + <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile> + <!-- Sets the name of the property containing the settings for JaCoCo + runtime agent. --> + <propertyName>surefireArgLine</propertyName> + </configuration> + </execution> + <!-- Ensures that the code coverage report for unit tests is created + after unit tests have been run. --> + <execution> + <id>post-unit-test</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data + . --> + <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> + </configuration> + </execution> + <execution> + <id>pre-integration-test</id> + <phase>pre-integration-test</phase> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data + . --> + <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile> + <!-- Sets the name of the property containing the settings for JaCoCo + runtime agent. --> + <propertyName>failsafeArgLine</propertyName> + </configuration> + </execution> + <!-- Ensures that the code coverage report for integration tests after + integration tests have been run. --> + <execution> + <id>post-integration-test</id> + <phase>post-integration-test</phase> + <goals> + <goal>report</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data + . --> + <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory> + </configuration> + </execution> + <execution> + <id>default-check</id> + <goals> + <goal>check</goal> + </goals> + <configuration> + <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile> + <rules> + <rule implementation="org.jacoco.maven.RuleConfiguration"> + <element>BUNDLE</element> + <limits> + <limit implementation="org.jacoco.report.check.Limit"> + <counter>LINE</counter> + <value>COVEREDRATIO</value> + <minimum>${jacoco.line.coverage.limit}</minimum> + </limit> + </limits> + </rule> + </rules> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>3.0.0-M4</version> + <configuration> + <!-- Sets the VM argument line used when unit tests are run. --> + <argLine>${surefireArgLine}</argLine> + <!-- Excludes integration tests when unit tests are run. --> + <excludes> + <exclude>**/IT*.java</exclude> + </excludes> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <version>3.0.0-M4</version> + <executions> + <!-- Ensures that both integration-test and verify goals of the Failsafe + Maven plugin are executed. --> + <execution> + <id>integration-tests</id> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + <configuration> + <!-- Sets the VM argument line used when integration tests are run. --> + <argLine>${failsafeArgLine}</argLine> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.sonarsource.scanner.maven</groupId> + <artifactId>sonar-maven-plugin</artifactId> + <version>${sonar.scanner.version}</version> + </plugin> + + </plugins> + </pluginManagement> + + <plugins> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + </plugin> + </plugins> + + </build> </project> diff --git a/aai-rest/pom.xml b/aai-rest/pom.xml index dbcb874a..89d3d3c2 100644 --- a/aai-rest/pom.xml +++ b/aai-rest/pom.xml @@ -29,7 +29,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-rest</artifactId> diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java index b11b0333..68ff3e5e 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java @@ -26,7 +26,6 @@ import org.apache.http.client.HttpClient; import org.apache.http.impl.client.HttpClients; import org.onap.aai.aailog.filter.RestClientLoggingInterceptor; import org.springframework.boot.web.client.RestTemplateBuilder; -import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; @@ -40,8 +39,8 @@ public abstract class NoAuthRestClient extends RestClient { @PostConstruct public void init() throws Exception { - restTemplate = new RestTemplate(); - restTemplate.setRequestFactory(this.getHttpRequestFactory()); + restTemplate = + new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build(); restTemplate.setErrorHandler(new RestClientResponseErrorHandler()); RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor(); restTemplate.getInterceptors().add(loggingInterceptor); diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java index 5c359e27..b2534f57 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java @@ -42,8 +42,8 @@ public abstract class OneWaySSLRestClient extends RestClient { @PostConstruct public void init() throws Exception { - restTemplate = new RestTemplate(); - restTemplate.setRequestFactory(this.getHttpRequestFactory()); + restTemplate = + new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build(); restTemplate.setErrorHandler(new RestClientResponseErrorHandler()); RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor(); diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java index f43d21c8..58ee79f1 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java @@ -48,8 +48,9 @@ public abstract class TwoWaySSLRestClient extends RestClient { @PostConstruct public void init() throws Exception { - restTemplate = new RestTemplate(); - restTemplate.setRequestFactory(this.getHttpRequestFactory()); + restTemplate = + new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build(); + restTemplate.setErrorHandler(new RestClientResponseErrorHandler()); RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor(); restTemplate.getInterceptors().add(loggingInterceptor); diff --git a/aai-schema-abstraction/pom.xml b/aai-schema-abstraction/pom.xml index eec7ce28..9c0eacde 100644 --- a/aai-schema-abstraction/pom.xml +++ b/aai-schema-abstraction/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> diff --git a/aai-schema-abstraction/src/test/java/org/onap/aai/schemaif/oxm/OxmSchemaProviderTest.java b/aai-schema-abstraction/src/test/java/org/onap/aai/schemaif/oxm/OxmSchemaProviderTest.java index 6cfb5a7d..6c7364ae 100644 --- a/aai-schema-abstraction/src/test/java/org/onap/aai/schemaif/oxm/OxmSchemaProviderTest.java +++ b/aai-schema-abstraction/src/test/java/org/onap/aai/schemaif/oxm/OxmSchemaProviderTest.java @@ -30,14 +30,14 @@ import java.util.Set; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.onap.aai.schemaif.SchemaProviderException; import org.onap.aai.schemaif.definitions.EdgeSchema; import org.onap.aai.schemaif.definitions.PropertySchema; import org.onap.aai.schemaif.definitions.VertexSchema; import org.onap.aai.schemaif.definitions.types.DataType.Type; -@RunWith(MockitoJUnitRunner.class) +@RunWith(MockitoJUnitRunner.Silent.class) public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { @Test @@ -49,15 +49,15 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { VertexSchema vertSchema = schemaProvider.getVertexSchema("pserver", schemaProvider.getLatestSchemaVersion()); System.out.println(vertSchema.toString()); - EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn", + EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn", "cloud-region", "zone", schemaProvider.getLatestSchemaVersion()); System.out.println(edgeSchema.toString()); - + // Validate vertex schema assertTrue(vertSchema.getName().equals("pserver")); assertTrue(vertSchema.getAnnotationValue("nameProps").equals("pserver-name2")); assertTrue(vertSchema.getAnnotationValue("dependentOn") == null); - + PropertySchema propSchema = vertSchema.getPropertySchema("hostname"); assertTrue(propSchema.getName().equals("hostname")); assertTrue(propSchema.getDefaultValue().equals("")); @@ -66,7 +66,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(propSchema.getDataType().getType().compareTo(Type.STRING) == 0); Object obj = propSchema.validateValue("somestring"); assertTrue(obj instanceof String); - + propSchema = vertSchema.getPropertySchema("in-maint"); assertTrue(propSchema.getName().equals("in-maint")); assertTrue(propSchema.getDefaultValue().equals("false")); @@ -79,8 +79,8 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { obj = propSchema.validateValue("false"); assertTrue(obj instanceof Boolean); assertTrue(propSchema.getDataType().validateValue("badValue") == null); - - + + propSchema = vertSchema.getPropertySchema("aai-node-type"); assertTrue(propSchema.getName().equals("aai-node-type")); assertTrue(propSchema.getDefaultValue().equals("")); @@ -88,7 +88,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(!propSchema.isKey()); assertTrue(propSchema.isReserved()); assertTrue(propSchema.getDataType().getType().compareTo(Type.STRING) == 0); - + propSchema = vertSchema.getPropertySchema("pserver-id"); assertTrue(propSchema.getName().equals("pserver-id")); assertTrue(propSchema.getDefaultValue().equals("")); @@ -96,7 +96,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(!propSchema.isReserved()); assertTrue(propSchema.isKey()); assertTrue(propSchema.getDataType().getType().compareTo(Type.STRING) == 0); - + propSchema = vertSchema.getPropertySchema("number-of-cpus"); assertTrue(propSchema.getName().equals("number-of-cpus")); assertTrue(propSchema.getAnnotationValue("source-of-truth-type").equals("openstack")); @@ -107,7 +107,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(obj instanceof Integer); assertTrue(propSchema.getDataType().validateValue("5.5") == null); assertTrue(propSchema.getDataType().validateValue("xyz") == null); - + // Validate edge schema assertTrue(edgeSchema.getName().equals("org.onap.relationships.inventory.LocatedIn")); assertTrue(edgeSchema.getSource().equals("cloud-region")); @@ -115,7 +115,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(edgeSchema.getMultiplicity().equals(EdgeSchema.Multiplicity.MANY_2_ONE)); assertTrue(edgeSchema.getAnnotationValue("contains-other-v").equals("NONE")); assertTrue(edgeSchema.getPropertySchema("prevent-delete").getDataType().getType().equals(Type.STRING)); - + // Validate 'dependentOn' annotation vertSchema = schemaProvider.getVertexSchema("tenant", schemaProvider.getLatestSchemaVersion()); assertTrue(vertSchema.getAnnotationValue("dependentOn").equals("cloud-region")); @@ -128,19 +128,19 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(false); } } - + @Test public void testAdjacentEdges() throws SchemaProviderException { try { OxmSchemaProvider schemaProvider = new OxmSchemaProvider(); schemaProvider.loadSchema(); - Set<EdgeSchema> edgeSchemaList = + Set<EdgeSchema> edgeSchemaList = schemaProvider.getAdjacentEdgeSchema("snapshot", schemaProvider.getLatestSchemaVersion()); - + // Validate edge schema assertTrue(edgeSchemaList.size() == 2); - + for (EdgeSchema es : edgeSchemaList) { System.out.println(es.toString()); if (es.getName().equals("org.onap.relationships.inventory.BelongsTo")) { @@ -166,15 +166,15 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(false); } } - + @Test public void testValidSourceTargetEdge() throws SchemaProviderException { try { OxmSchemaProvider schemaProvider = new OxmSchemaProvider(); schemaProvider.loadSchema(); - Set<EdgeSchema> edgeSchemaList = - schemaProvider.getEdgeSchemaForSourceTarget("service-instance", "customer", + Set<EdgeSchema> edgeSchemaList = + schemaProvider.getEdgeSchemaForSourceTarget("service-instance", "customer", schemaProvider.getLatestSchemaVersion()); // Validate edge schema @@ -183,14 +183,14 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(edgeSchemaList.iterator().next().getSource().equals("service-instance")); assertTrue(edgeSchemaList.iterator().next().getTarget().equals("customer")); assertTrue(edgeSchemaList.iterator().next().getMultiplicity().equals(EdgeSchema.Multiplicity.MANY_2_MANY)); - - edgeSchemaList = - schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "complex", + + edgeSchemaList = + schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "complex", schemaProvider.getLatestSchemaVersion()); - + // Validate edge schema assertTrue(edgeSchemaList.size() == 2); - + for (EdgeSchema es : edgeSchemaList) { System.out.println(es.toString()); if (es.getName().equals("org.onap.relationships.inventory.FoundIn")) { @@ -207,11 +207,11 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(false); } } - - edgeSchemaList = - schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "bad-node", + + edgeSchemaList = + schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "bad-node", schemaProvider.getLatestSchemaVersion()); - + // Validate edge schema assertTrue(edgeSchemaList.size() == 0); } @@ -223,23 +223,23 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup { assertTrue(false); } } - + @Test public void testInvalidVertexOrEdge() throws SchemaProviderException { try { OxmSchemaProvider schemaProvider = new OxmSchemaProvider(); schemaProvider.loadSchema(); - VertexSchema vertSchema = + VertexSchema vertSchema = schemaProvider.getVertexSchema("bad-node", schemaProvider.getLatestSchemaVersion()); assertTrue(vertSchema == null); - EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn", + EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn", "cloud-region", "bad-node", schemaProvider.getLatestSchemaVersion()); assertTrue(edgeSchema == null); - - Set<EdgeSchema> edgeSchemaList = - schemaProvider.getAdjacentEdgeSchema("org.onap.nodes.bad-node", + + Set<EdgeSchema> edgeSchemaList = + schemaProvider.getAdjacentEdgeSchema("org.onap.nodes.bad-node", schemaProvider.getLatestSchemaVersion()); assertTrue(edgeSchemaList.isEmpty()); } diff --git a/aai-schema-ingest/pom.xml b/aai-schema-ingest/pom.xml index 8c1b72fc..3e21f455 100644 --- a/aai-schema-ingest/pom.xml +++ b/aai-schema-ingest/pom.xml @@ -26,7 +26,7 @@ limitations under the License. <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-schema-ingest</artifactId> diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java index a9cd1f74..8fdce62b 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java @@ -50,10 +50,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {MockProvider.class, EdgesConfiguration.class}) @TestPropertySource( - properties = { - "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties", - "spring.main.allow-bean-definition-overriding=true" - }) + properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties"}) + @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) @SpringBootTest public class EdgeIngestorTest { diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java index dc4e1e46..7035affd 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java @@ -51,10 +51,7 @@ import org.w3c.dom.Document; @RunWith(SpringJUnit4ClassRunner.class) @TestPropertySource( - properties = { - "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties", - "spring.main.allow-bean-definition-overriding=true" - }) + properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties"}) @ContextConfiguration(classes = {MockProvider.class, NodesConfiguration.class}) @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java index 2a5068f2..af94765f 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java @@ -23,14 +23,12 @@ package org.onap.aai.setup; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@Ignore("Support of schema ingest via context configuration with prop file is removed as it won't work with spring boot 2") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:forWiringTests/testUsingPropFileContext.xml"}) public class SchemaLocationsBeanXMLSetterWithPropFileTest { diff --git a/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml b/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml index b4e2c026..1d3e61e4 100644 --- a/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml +++ b/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml @@ -14,6 +14,6 @@ <property name="edgeDirectory" value="${schema.edges.location}" /> </bean> - <context:property-placeholder location="/forWiringTests/schema-ingest-for-xml-test.properties" ignore-unresolvable="true" /> + <context:property-placeholder location="classpath:forWiringTests/schema-ingest-for-xml-test.properties" ignore-unresolvable="true" /> -</beans> +</beans>
\ No newline at end of file diff --git a/aai-utils/pom.xml b/aai-utils/pom.xml index ec16328b..17a15256 100644 --- a/aai-utils/pom.xml +++ b/aai-utils/pom.xml @@ -29,7 +29,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-utils</artifactId> @@ -30,7 +30,7 @@ <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-common</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <packaging>pom</packaging> <name>aai-aai-common</name> <description>Contains all of the common code for resources and traversal repos</description> @@ -261,4 +261,3 @@ </repositories> <!-- End of ONAP Specific Repositories --> </project> -<!-- noop for release --> diff --git a/version.properties b/version.properties index 5fc34cc4..c7bd1896 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ major_version=1 minor_version=6 -patch_version=9 +patch_version=10 base_version=${major_version}.${minor_version}.${patch_version} |