aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2019-10-31 11:36:17 -0500
committerjhh <jorge.hernandez-herrero@att.com>2019-10-31 13:57:31 -0500
commitf7222f85e8c472e0d434d96191930dc989452e87 (patch)
tree0f1b5334c59a3b875d8b32e546b4bf6f392924e3
parent01abf11819c0cd797bc3170fbcce04cffb020b27 (diff)
upgrade to 7.28.0.Final drools libraries
commons-lang does not seem to be packaged anymore (commons-lang3 still does, which is the desired one). There are some @SupressWarning that seem to have no effect that were removed. Some libraries that were explicitly added are transitively used now in the latest version of drools, hence some rework in the dependency and exclude sections. We will need to generate a clm report to verify. Issue-ID: POLICY-1407 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I44e09183caca72f5f33bdec0b8fa88b0b4793055 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
-rw-r--r--feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/extractor/ClassExtractors.java4
-rw-r--r--feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/FilterUtils.java6
-rw-r--r--policy-core/pom.xml73
-rw-r--r--policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java14
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java2
-rw-r--r--pom.xml2
6 files changed, 35 insertions, 66 deletions
diff --git a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/extractor/ClassExtractors.java b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/extractor/ClassExtractors.java
index ab260c57..91fbad18 100644
--- a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/extractor/ClassExtractors.java
+++ b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/extractor/ClassExtractors.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-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.
@@ -25,7 +25,7 @@ import java.lang.reflect.Method;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.onap.policy.drools.utils.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/FilterUtils.java b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/FilterUtils.java
index 069ca656..1616f03e 100644
--- a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/FilterUtils.java
+++ b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/FilterUtils.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-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.
@@ -72,7 +72,7 @@ public class FilterUtils {
* @param items items to be checked
* @return an "and" filter
*/
- public static Map<String, Object> makeAnd(@SuppressWarnings("unchecked") Map<String, Object>... items) {
+ public static Map<String, Object> makeAnd(Map<String, Object>... items) {
Map<String, Object> map = new TreeMap<>();
map.put(JSON_CLASS, CLASS_AND);
map.put(JSON_FILTERS, items);
@@ -86,7 +86,7 @@ public class FilterUtils {
* @param items items to be checked
* @return an "or" filter
*/
- public static Map<String, Object> makeOr(@SuppressWarnings("unchecked") Map<String, Object>... items) {
+ public static Map<String, Object> makeOr(Map<String, Object>... items) {
Map<String, Object> map = new TreeMap<>();
map.put(JSON_CLASS, CLASS_OR);
map.put(JSON_FILTERS, items);
diff --git a/policy-core/pom.xml b/policy-core/pom.xml
index 7497a34c..25b099c0 100644
--- a/policy-core/pom.xml
+++ b/policy-core/pom.xml
@@ -30,129 +30,96 @@
<version>1.6.0-SNAPSHOT</version>
</parent>
- <properties>
- <protobuf.version>3.6.1</protobuf.version>
- </properties>
-
<dependencies>
- <!--
- Issue: 1 of 2
- These 3 dependencies are trying to upgrade security fixes
- identified. If they are removed or manipulated then please
- fix the 2nd change as noted below.
- -->
+
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>3.0.24</version>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
- <version>6.5.0.Final</version>
</dependency>
+
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
- <version>6.5.0.Final</version>
- <!--
- Issue: 2 of 2
- Excluding these 2 dependencies in order to force upgrade security fixes
- identified. As declared above. Any changes here should be reflected above
- and vice versa.
- -->
+ <!--
+ Issue: 2 of 2
+ Excluding these 2 dependencies in order to force upgrade security fixes
+ identified. As declared above. Any changes here should be reflected above
+ and vice versa.
+ -->
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</exclusion>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </exclusion>
</exclusions>
</dependency>
+
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
- <version>6.5.0.Final</version>
</dependency>
+
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-persistence-jpa</artifactId>
- <version>6.5.0.Final</version>
- <exclusions>
- <exclusion>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </exclusion>
- </exclusions>
</dependency>
+
<dependency>
<groupId>org.onap.policy.common</groupId>
<artifactId>capabilities</artifactId>
<version>${policy.common.version}</version>
</dependency>
+
<dependency>
<groupId>org.onap.policy.common</groupId>
<artifactId>utils</artifactId>
<version>${policy.common.version}</version>
</dependency>
+
<dependency>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>policy-utils</artifactId>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<scope>test</scope>
</dependency>
+
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
+
<dependency>
<groupId>org.onap.policy.common</groupId>
<artifactId>utils-test</artifactId>
<version>${policy.common.version}</version>
<scope>test</scope>
</dependency>
+
</dependencies>
+
<build>
<plugins>
<plugin>
diff --git a/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java b/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java
index 23f81499..5500d110 100644
--- a/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java
+++ b/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-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.
@@ -34,7 +34,7 @@ import org.kie.api.builder.KieFileSystem;
import org.kie.api.builder.Message;
import org.kie.api.builder.ReleaseId;
import org.kie.api.builder.model.KieModuleModel;
-import org.kie.scanner.MavenRepository;
+import org.kie.scanner.KieMavenRepository;
/**
* Kie related utilities.
@@ -73,10 +73,11 @@ public class KieUtils {
pomFile.deleteOnExit();
ReleaseId releaseId = kieBuilder.getKieModule().getReleaseId();
- MavenRepository.getMavenRepository()
+ KieMavenRepository
+ .getKieMavenRepository()
.installArtifact(releaseId,
- (InternalKieModule) kieBuilder.getKieModule(),
- pomFile);
+ (InternalKieModule) kieBuilder.getKieModule(),
+ pomFile);
return releaseId;
}
@@ -102,7 +103,8 @@ public class KieUtils {
KieBuilder kieBuilder = kieBuild(kieFileSystem);
ReleaseId releaseId = kieBuilder.getKieModule().getReleaseId();
- MavenRepository.getMavenRepository()
+ KieMavenRepository
+ .getKieMavenRepository()
.installArtifact(releaseId, (InternalKieModule) kieBuilder.getKieModule(), pom);
return releaseId;
}
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
index 757b67fa..6e529c74 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
@@ -40,7 +40,7 @@ import java.util.stream.Stream;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NonNull;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.onap.policy.common.endpoints.event.comm.Topic;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
diff --git a/pom.xml b/pom.xml
index 520abd87..b61cbb8c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.parent</groupId>
<artifactId>integration</artifactId>
- <version>3.0.1</version>
+ <version>3.1.0-SNAPSHOT</version>
<relativePath />
</parent>