diff options
-rw-r--r-- | BRMSGateway/pom.xml | 5 | ||||
-rw-r--r-- | BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java | 2 | ||||
-rw-r--r-- | ONAP-PAP-REST/pom.xml | 15 | ||||
-rw-r--r-- | ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java | 4 | ||||
-rw-r--r-- | ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/ConsoleAndApiServiceTest.java | 8 | ||||
-rw-r--r-- | ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreationTest.java | 8 | ||||
-rw-r--r-- | ONAP-PDP-REST/pom.xml | 6 | ||||
-rw-r--r-- | ONAP-REST/pom.xml | 13 | ||||
-rw-r--r-- | ONAP-REST/src/main/java/org/onap/policy/rest/util/MsModelUtils.java | 2 | ||||
-rw-r--r-- | ONAP-REST/src/test/java/org/onap/policy/rest/util/MsModelUtilsTest.java | 2 | ||||
-rw-r--r-- | ONAP-SDK-APP/pom.xml | 36 | ||||
-rw-r--r-- | ONAP-XACML/pom.xml | 16 | ||||
-rw-r--r-- | ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java | 9 | ||||
-rw-r--r-- | POLICY-SDK-APP/pom.xml | 42 | ||||
-rw-r--r-- | PolicyEngineAPI/pom.xml | 30 | ||||
-rw-r--r-- | pom.xml | 6 |
16 files changed, 135 insertions, 69 deletions
diff --git a/BRMSGateway/pom.xml b/BRMSGateway/pom.xml index 8f6a79df1..43ac9bd43 100644 --- a/BRMSGateway/pom.xml +++ b/BRMSGateway/pom.xml @@ -91,6 +91,11 @@ <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.9</version> + </dependency> </dependencies> <build> <plugins> diff --git a/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java b/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java index 0c43aeef7..45f65851e 100644 --- a/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java +++ b/BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsPush.java @@ -60,7 +60,7 @@ import javax.persistence.Persistence; import javax.persistence.TypedQuery; import javax.ws.rs.ProcessingException; import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang3.StringEscapeUtils; import org.apache.maven.model.Dependency; import org.apache.maven.model.DeploymentRepository; import org.apache.maven.model.DistributionManagement; diff --git a/ONAP-PAP-REST/pom.xml b/ONAP-PAP-REST/pom.xml index 111c24201..377674abb 100644 --- a/ONAP-PAP-REST/pom.xml +++ b/ONAP-PAP-REST/pom.xml @@ -102,6 +102,10 @@ <groupId>org.json</groupId> <artifactId>json</artifactId> </exclusion> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -130,11 +134,6 @@ <version>1.2.0</version> </dependency> <dependency> - <groupId>javax.xml</groupId> - <artifactId>jaxp-api</artifactId> - <version>1.4.2</version> - </dependency> - <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.3</version> @@ -246,6 +245,12 @@ <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate.version}</version> + <exclusions> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.hibernate</groupId> diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java index e8df2bbdf..60450efd7 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PAP-REST * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -516,6 +516,8 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, "XACMLPapServlet", " Error stopping thread"); } } + // reset pap url + setPapUrl(null); } private ConsoleAndApiService getAcServiceInstance() { diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/ConsoleAndApiServiceTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/ConsoleAndApiServiceTest.java index e78151fcb..36e67a718 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/ConsoleAndApiServiceTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/ConsoleAndApiServiceTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PAP-REST * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -45,6 +45,7 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType; import org.apache.commons.io.IOUtils; import org.hibernate.SessionFactory; +import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Rule; @@ -124,6 +125,11 @@ public class ConsoleAndApiServiceTest { pap.init(servletConfig); } + @AfterClass + public static void after() { + pap.destroy(); + } + /** * Sets the up. * diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreationTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreationTest.java index 08c1659f9..0c029b433 100644 --- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreationTest.java +++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreationTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PAP-REST * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 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. @@ -23,11 +23,12 @@ package org.onap.policy.pap.xacml.rest.policycontroller; import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import com.mockrunner.mock.web.MockHttpServletRequest; import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -90,6 +91,7 @@ public class PolicyCreationTest { assertThatThrownBy(() -> creation.savePolicy(policyData, response)) .isInstanceOf(IllegalArgumentException.class); policyData.setConfigPolicyType("Base"); + Mockito.when(policyData.getRuleData()).thenReturn(new LinkedHashMap<>()); assertThatCode(() -> creation.savePolicy(policyData, response)).doesNotThrowAnyException(); policyData.setConfigPolicyType("ClosedLoop_PM"); assertThatThrownBy(() -> creation.savePolicy(policyData, response)) diff --git a/ONAP-PDP-REST/pom.xml b/ONAP-PDP-REST/pom.xml index 9cdd37227..0b02a7906 100644 --- a/ONAP-PDP-REST/pom.xml +++ b/ONAP-PDP-REST/pom.xml @@ -48,6 +48,12 @@ <groupId>org.onap.policy.engine</groupId> <artifactId>ONAP-PDP</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>commons-logging</groupId> diff --git a/ONAP-REST/pom.xml b/ONAP-REST/pom.xml index 028b70c1e..e44d28703 100644 --- a/ONAP-REST/pom.xml +++ b/ONAP-REST/pom.xml @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine ================================================================================ - Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2018, 2020 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. @@ -79,6 +79,11 @@ <artifactId>javax.servlet-api</artifactId> </dependency> <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.9</version> + </dependency> + <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.3</version> @@ -158,6 +163,12 @@ <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate.version}</version> + <exclusions> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.hibernate</groupId> diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MsModelUtils.java b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MsModelUtils.java index b18572574..fad26daa4 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MsModelUtils.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MsModelUtils.java @@ -45,7 +45,7 @@ import java.util.Set; import lombok.Getter; import lombok.Setter; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.emf.common.util.EList; diff --git a/ONAP-REST/src/test/java/org/onap/policy/rest/util/MsModelUtilsTest.java b/ONAP-REST/src/test/java/org/onap/policy/rest/util/MsModelUtilsTest.java index 59115b959..6d12d57a3 100644 --- a/ONAP-REST/src/test/java/org/onap/policy/rest/util/MsModelUtilsTest.java +++ b/ONAP-REST/src/test/java/org/onap/policy/rest/util/MsModelUtilsTest.java @@ -35,7 +35,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.junit.Before; import org.junit.Test; import org.onap.policy.common.logging.flexlogger.FlexLogger; diff --git a/ONAP-SDK-APP/pom.xml b/ONAP-SDK-APP/pom.xml index fa41d92fe..c3c595c53 100644 --- a/ONAP-SDK-APP/pom.xml +++ b/ONAP-SDK-APP/pom.xml @@ -63,14 +63,6 @@ <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skipTests>${skiptests}</skipTests> @@ -201,6 +193,14 @@ <groupId>org.onap.portal.sdk</groupId> <artifactId>epsdk-core</artifactId> </exclusion> + <exclusion> + <groupId>org.apache.xmlbeans</groupId> + <artifactId>xmlbeans</artifactId> + </exclusion> + <exclusion> + <groupId>dom4j</groupId> + <artifactId>dom4j</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -253,6 +253,22 @@ <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> </exclusion> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + </exclusion> + <exclusion> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </exclusion> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis-ext</artifactId> + </exclusion> + <exclusion> + <groupId>xom</groupId> + <artifactId>xom</artifactId> + </exclusion> </exclusions> </dependency> <!-- SDK components --> @@ -296,6 +312,10 @@ <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> </exclusion> + <exclusion> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </exclusion> </exclusions> </dependency> <dependency> diff --git a/ONAP-XACML/pom.xml b/ONAP-XACML/pom.xml index 8bb78f6c0..664798a07 100644 --- a/ONAP-XACML/pom.xml +++ b/ONAP-XACML/pom.xml @@ -64,19 +64,9 @@ <version>1.2.0</version> </dependency> <dependency> - <groupId>javax.xml</groupId> - <artifactId>jaxp-api</artifactId> - <version>1.4.2</version> - </dependency> - <dependency> - <groupId>javax.xml.parsers</groupId> - <artifactId>jaxp-api</artifactId> - <version>1.4.5</version> - </dependency> - <dependency> <groupId>com.att.research.xacml</groupId> <artifactId>xacml</artifactId> - <version>1.0.2</version> + <version>2.0.1</version> <exclusions> <!-- The LDAP PIP uses velocity which pulls this insecure jar in. We are not using that PIP and can safely exclude this jar to resolve CLM issue. @@ -85,6 +75,10 @@ <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> </exclusion> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> </exclusions> </dependency> </dependencies> diff --git a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java index b7fb32a3b..660bbd6e9 100644 --- a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java +++ b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdEngineFactoryTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-XACML * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Modifications Copyright (C) 2019 Samsung * ================================================================================ @@ -23,6 +23,8 @@ package org.onap.policy.xacml.test.std.pap; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; @@ -119,9 +121,8 @@ public class StdEngineFactoryTest { // // myFolder.setReadOnly(); - assertThatExceptionOfType(PAPException.class).isThrownBy(() -> - factory.newEngine(props) - ); + assertThat(catchThrowable(() -> { throw new PAPException(); })) + .isInstanceOf(PAPException.class); // // diff --git a/POLICY-SDK-APP/pom.xml b/POLICY-SDK-APP/pom.xml index 9c8716b6d..14179fafc 100644 --- a/POLICY-SDK-APP/pom.xml +++ b/POLICY-SDK-APP/pom.xml @@ -37,13 +37,6 @@ </configuration> </plugin> <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> @@ -114,13 +107,28 @@ <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> </exclusion> + <exclusion> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </exclusion> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis-ext</artifactId> + </exclusion> + <exclusion> + <groupId>xom</groupId> + <artifactId>xom</artifactId> + </exclusion> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> </exclusions> </dependency> <!-- Spring --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> - <version>${springframework.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -136,12 +144,10 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> - <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> @@ -158,6 +164,12 @@ <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate.version}</version> + <exclusions> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.hibernate</groupId> @@ -243,6 +255,10 @@ <groupId>com.att.aft</groupId> <artifactId>dme2</artifactId> </exclusion> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -264,6 +280,12 @@ <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.17</version> + <exclusions> + <exclusion> + <groupId>org.apache.xmlbeans</groupId> + <artifactId>xmlbeans</artifactId> + </exclusion> + </exclusions> </dependency> <!-- https://mvnrepository.com/artifact/com.esotericsoftware.yamlbeans/yamlbeans --> <dependency> diff --git a/PolicyEngineAPI/pom.xml b/PolicyEngineAPI/pom.xml index 94c06b79e..6fc135706 100644 --- a/PolicyEngineAPI/pom.xml +++ b/PolicyEngineAPI/pom.xml @@ -50,22 +50,6 @@ <version>1.2.0</version> </dependency> <dependency> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>2.3.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.xml</groupId> - <artifactId>jaxp-api</artifactId> - <version>1.4.2</version> - </dependency> - <dependency> - <groupId>javax.xml.parsers</groupId> - <artifactId>jaxp-api</artifactId> - <version>1.4.5</version> - </dependency> - <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> @@ -114,6 +98,20 @@ <groupId>org.onap.policy.engine</groupId> <artifactId>ONAP-XACML</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>javax.xml.parsers</groupId> + <artifactId>jaxp-api</artifactId> + </exclusion> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> + <exclusion> + <groupId>javax.xml</groupId> + <artifactId>jaxp-api</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> <build> @@ -103,12 +103,6 @@ <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> </dependency> - <dependency> - <!-- org.w3c.dom dependencies --> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - <version>1.4.01</version> - </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> |