aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2023-01-26 10:07:32 -0600
committerjhh <jorge.hernandez-herrero@att.com>2023-01-26 10:07:32 -0600
commitdeaad0775a0672cbca27d6afba6a642a53dbc971 (patch)
treef4289c91c90aca5c859e855576ad6747500c069e /policy-core
parentef2a86add9cac393a23e4a0b8980a339760860a3 (diff)
Upgrade drools libs from 7.x to 8.x
Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Issue-ID: POLICY-4498 Change-Id: Ifb0e19107522ac0248f308a1fb804c0c98764e1b
Diffstat (limited to 'policy-core')
-rw-r--r--policy-core/pom.xml12
-rw-r--r--policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java6
2 files changed, 14 insertions, 4 deletions
diff --git a/policy-core/pom.xml b/policy-core/pom.xml
index 9462cd66..3e76199a 100644
--- a/policy-core/pom.xml
+++ b/policy-core/pom.xml
@@ -3,7 +3,7 @@
============LICENSE_START=======================================================
ONAP
================================================================================
- Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2021, 2023 AT&T Intellectual Property. All rights reserved.
Modifications Copyright (C) 2019 Bell Canada.
Modifications Copyright (C) 2020,2022 Nordix Foundation.
================================================================================
@@ -72,11 +72,21 @@
<dependency>
<groupId>org.drools</groupId>
+ <artifactId>drools-engine</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
</dependency>
<dependency>
<groupId>org.drools</groupId>
+ <artifactId>drools-xml-support</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.drools</groupId>
<artifactId>drools-persistence-jpa</artifactId>
<!--
Exclude this because it's incompatible with eclipselink, which already
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 043e2b10..099ce3aa 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-2021 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2021, 2023 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.
@@ -39,7 +39,7 @@ import lombok.NonNull;
import org.apache.commons.io.IOUtils;
import org.drools.compiler.kie.builder.impl.InternalKieModule;
import org.drools.compiler.kproject.models.KieModuleModelImpl;
-import org.drools.core.impl.KnowledgeBaseImpl;
+import org.drools.kiesession.rulebase.SessionsAwareKnowledgeBase;
import org.kie.api.KieBase;
import org.kie.api.KieServices;
import org.kie.api.builder.KieBuilder;
@@ -242,7 +242,7 @@ public final class KieUtils {
if (!stillNeeded.isEmpty()) {
// there are still packages we need to add --
// this code makes use of an internal class and method
- ((KnowledgeBaseImpl) kieBase).addPackages(stillNeeded);
+ ((SessionsAwareKnowledgeBase) kieBase).addPackages(stillNeeded);
}
}
}