From fb79f7aa356ef2e4507cac5d5a328f789617cd5a Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Thu, 31 Aug 2017 00:09:45 -0500 Subject: Support Utils Libraries for CL Lab Integration There is a companion review in the drools-applications repo. This also includes workarounds to the recent oparent dependency introduction that breaks runtime (with the version-check-maven-plugin). It manifested by loading control loops and failing to load some classes due to different versions (in a lab environment). The issue was that underlying drools libraries use 3.2.5 and oparent has included a had dependency with transitive dependencies for some maven libraries in 3.2.3 and lower version xml parsers. Bottomoline, the classpath at runtime was formed by the union of both, with some libraries being resolved to the oparent one, and others to the drools one. These errors are very obscured to debug. Additional clean up of dependencies versions and order of build was introduced to avoid issues loading dependencies at runtime in a lab environment (non-junit).. Change-Id: If4f4201e08f7e6e1f3619f557434c1b2e23e47a5 Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez --- policy-core/pom.xml | 2 - policy-management/pom.xml | 10 +++++ .../policy/drools/server/restful/RestManager.java | 3 ++ .../onap/policy/drools/system/PolicyEngine.java | 4 +- .../src/main/server/config/system.properties | 12 +++--- pom.xml | 49 +++++++++++++++++++--- 6 files changed, 64 insertions(+), 16 deletions(-) diff --git a/policy-core/pom.xml b/policy-core/pom.xml index 8fdfaa36..076a4bf2 100644 --- a/policy-core/pom.xml +++ b/policy-core/pom.xml @@ -40,13 +40,11 @@ org.kie kie-ci 6.5.0.Final - runtime org.drools drools-core 6.5.0.Final - runtime org.drools diff --git a/policy-management/pom.xml b/policy-management/pom.xml index b01668b0..63914922 100644 --- a/policy-management/pom.xml +++ b/policy-management/pom.xml @@ -256,6 +256,11 @@ eclipselink + + org.eclipse.persistence + org.eclipse.persistence.jpa + + org.mariadb.jdbc mariadb-java-client @@ -270,6 +275,11 @@ org.hibernate.common hibernate-commons-annotations + + + commons-io + commons-io + diff --git a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java index d877f1e9..379ca6a2 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java +++ b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java @@ -2299,6 +2299,7 @@ public class RestManager { @GET @Path("engine/tools/loggers/{logger}") + @Produces(MediaType.TEXT_PLAIN) @ApiOperation( value="logging level of a logger" ) @@ -2326,6 +2327,8 @@ public class RestManager { @PUT @Path("engine/tools/loggers/{logger}/{level}") + @Produces(MediaType.TEXT_PLAIN) + @Consumes(MediaType.TEXT_PLAIN) @ApiOperation( value="sets the logger level", notes="Please use the SLF4J logger levels" diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java index d7e0ecdd..bfda2450 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java @@ -429,11 +429,11 @@ class PolicyEngineManager implements PolicyEngine { defaultConfig.put(PolicyProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + TELEMETRY_SERVER_DEFAULT_NAME + PolicyProperties.PROPERTY_HTTP_SWAGGER_SUFFIX, - true); + "" + Boolean.TRUE); defaultConfig.put(PolicyProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + TELEMETRY_SERVER_DEFAULT_NAME + PolicyProperties.PROPERTY_MANAGED_SUFFIX, - false); + "" + Boolean.FALSE); return defaultConfig; } diff --git a/policy-management/src/main/server/config/system.properties b/policy-management/src/main/server/config/system.properties index 6456ef53..a968b103 100644 --- a/policy-management/src/main/server/config/system.properties +++ b/policy-management/src/main/server/config/system.properties @@ -22,17 +22,17 @@ # jmx -com.sun.management.jmxremote.port = 9991 -com.sun.management.jmxremote.authenticate = false -com.sun.management.jmxremote.ssl = false +com.sun.management.jmxremote.port=9991 +com.sun.management.jmxremote.authenticate=false +com.sun.management.jmxremote.ssl=false # certs javax.net.ssl.keyStore=/opt/app/policy/etc/ssl/policy-keystore -javax.net.ssl.keyStorePassword = ${{KEYSTORE_PASSWD}} +javax.net.ssl.keyStorePassword=${{KEYSTORE_PASSWD}} javax.net.ssl.trustStore=/opt/app/policy/etc/ssl/policy-keystore -javax.net.ssl.trustStorePassword = ${{KEYSTORE_PASSWD}} +javax.net.ssl.trustStorePassword=${{KEYSTORE_PASSWD}} # standard logging -logback.configurationFile=config/logback.xml \ No newline at end of file +logback.configurationFile=config/logback.xml diff --git a/pom.xml b/pom.xml index f3f1460b..43a090ef 100644 --- a/pom.xml +++ b/pom.xml @@ -46,14 +46,16 @@ 2.22.2 1.5.13 2.8.4 - 4.5 + 4.5.2 4.4.4 1.2.3 4.12 - 2.6.4 + 2.7.0 2.1.0 5.2.10.Final 5.0.1.Final + 2.5 + 16.0.1 https://nexus.onap.org /content/sites/site/${project.groupId}/${project.artifactId}/${project.version} @@ -91,14 +93,12 @@ - - com.google.guava guava - 16.0.1 + ${guava.version} javax.ws.rs @@ -175,6 +175,11 @@ eclipselink ${eclipselink.version} + + org.eclipse.persistence + org.eclipse.persistence.jpa + ${eclipselink.version} + org.mariadb.jdbc mariadb-java-client @@ -190,8 +195,29 @@ hibernate-commons-annotations ${hibernate.commons.annotations.version} + + commons-io + commons-io + ${commons.io.version} + + + + + org.onap.oparent + version-check-maven-plugin + 1.0.0-SNAPSHOT + provided + true + + + * + * + + + + @@ -234,7 +260,6 @@ org.apache.maven.plugins maven-site-plugin - 3.6 org.apache.maven.wagon @@ -252,7 +277,19 @@ org.codehaus.mojo sonar-maven-plugin + + + + org.onap.oparent + version-check-maven-plugin + + + version-check + + + + -- cgit 1.2.3-korg