diff options
author | Jim Hahn <jrh3@att.com> | 2018-09-10 10:23:56 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2018-09-10 14:30:28 -0400 |
commit | 6c11303e4a4af3df99754a7c7028284231961fe5 (patch) | |
tree | 064c9ec0c89ceda2a7ec04b73a07d45e424a0797 /policy-core/src/main | |
parent | 3da4ae9c1967442b015ce9740e3d46d32fcd4d26 (diff) |
Switch to drools 7.9.0.Final
Note: This will break policy/drools-applications until the corresponding
change is merged there, too.
Reformatted lengthy line.
Change-Id: I4ae7838dfbc2d537580636eccc545710b5ebc799
Issue-ID: POLICY-1093
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-core/src/main')
-rw-r--r-- | policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java | 15 |
1 files changed, 8 insertions, 7 deletions
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 a3efe433..7d24ef5e 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 @@ -26,15 +26,16 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; +import org.appformer.maven.integration.MavenRepository; import org.drools.compiler.kie.builder.impl.InternalKieModule; import org.drools.compiler.kproject.models.KieModuleModelImpl; +import org.drools.core.util.IoUtils; import org.kie.api.KieServices; import org.kie.api.builder.KieBuilder; 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; /** * Kie related utilities. @@ -73,10 +74,10 @@ public class KieUtils { pomFile.deleteOnExit(); ReleaseId releaseId = kieBuilder.getKieModule().getReleaseId(); - MavenRepository.getMavenRepository() - .installArtifact(releaseId, - (InternalKieModule) kieBuilder.getKieModule(), - pomFile); + MavenRepository.getMavenRepository(). + installArtifact(releaseId, + ((InternalKieModule) kieBuilder.getKieModule()).getBytes(), + IoUtils.readBytes(pomFile)); return releaseId; } @@ -102,8 +103,8 @@ public class KieUtils { KieBuilder kieBuilder = kieBuild(kieFileSystem); ReleaseId releaseId = kieBuilder.getKieModule().getReleaseId(); - MavenRepository.getMavenRepository() - .installArtifact(releaseId, (InternalKieModule) kieBuilder.getKieModule(), pom); + MavenRepository.getMavenRepository().installArtifact(releaseId, + ((InternalKieModule) kieBuilder.getKieModule()).getBytes(), IoUtils.readBytes(pom)); return releaseId; } |