From d6d12919128adc0aaca30d1ca8139e72ae025776 Mon Sep 17 00:00:00 2001 From: vempo Date: Mon, 9 Jul 2018 14:27:57 +0300 Subject: Upgraded servlet-api version to 3.0.1 Change-Id: I50b258e8843d85384e89e4ceb16d687d247dbe11 Issue-ID: SDC-1472 Signed-off-by: vempo --- .../action-library-rest-services/pom.xml | 16 +-- .../notifications-fe/pom.xml | 1 + .../onboarding-rest-war/pom.xml | 5 +- .../openecomp-sdc-common-rest/pom.xml | 1 + .../openecomp-zusammen-core/pom.xml | 15 --- .../impl/CassandraConnectionInitializer.java | 136 ++++++++++----------- .../openecomp-item-permissions-core/pom.xml | 2 +- .../openecomp-sdc-logging-api/pom.xml | 2 +- openecomp-be/tools/zusammen-tools/pom.xml | 37 +++--- 9 files changed, 91 insertions(+), 124 deletions(-) (limited to 'openecomp-be') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml index 45707ded40..9ce5f45d7d 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml @@ -72,16 +72,6 @@ javax.ws.rs-api ${ws.rs.version} - - - - - javax.inject javax.inject @@ -114,6 +104,12 @@ ${jersey.multipart.version} provided + + javax.servlet + javax.servlet-api + ${servlet-api.version} + provided + diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/pom.xml index ccf95f2075..12c68237dc 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-fe/pom.xml @@ -29,6 +29,7 @@ javax.servlet servlet-api ${javax.servlet.version} + provided diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml index 1c9029b19f..310b5b5fbb 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml @@ -92,8 +92,9 @@ javax.servlet - servlet-api - ${javax.servlet.version} + javax.servlet-api + ${servlet-api.version} + provided diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml index 2bc7d67cb8..305e307fda 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml @@ -54,6 +54,7 @@ javax.servlet servlet-api ${javax.servlet.version} + provided diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml index 50574a0900..01233644a0 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml @@ -39,16 +39,6 @@ zusammen-collaboration-cassandra-plugin ${zusammen-collaboration-store.version} runtime - com.amdocs.zusammen.plugin @@ -72,11 +62,6 @@ openecomp-facade-core ${project.version} - - javax.servlet - javax.servlet-api - 3.1.0 - org.openecomp.sdc.core openecomp-nosqldb-core diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/CassandraConnectionInitializer.java b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/CassandraConnectionInitializer.java index 8eeeb1e27b..7944999a70 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/CassandraConnectionInitializer.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/CassandraConnectionInitializer.java @@ -16,85 +16,75 @@ package org.openecomp.core.zusammen.impl; +import java.util.function.Supplier; import org.apache.commons.lang3.StringUtils; - import org.openecomp.core.nosqldb.util.CassandraUtils; -import java.util.function.Supplier; - -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; - -public class CassandraConnectionInitializer implements ServletContextListener { - - private static final String CASSANDRA_PREFIX = "cassandra."; - private static final String DATA_CENTER_PROPERTY_NAME = CASSANDRA_PREFIX + "datacenter"; - private static final String CONSISTENCY_LEVEL_PROPERTY_NAME = - CASSANDRA_PREFIX + "consistency.level"; - private static final String NODES_PROPERTY_NAME = CASSANDRA_PREFIX + "nodes"; - private static final String AUTHENTICATE_PROPERTY_NAME = CASSANDRA_PREFIX + "authenticate"; - private static final String SSL_PROPERTY_NAME = CASSANDRA_PREFIX + "ssl"; - private static final String TRUSTSTORE_PROPERTY_NAME = CASSANDRA_PREFIX + "truststore"; - private static final String TRUSTSTORE_PASSWORD_PROPERTY_NAME = - CASSANDRA_PREFIX + "truststore.password"; - private static final String USER_PROPERTY_NAME = CASSANDRA_PREFIX + "user"; - private static final String PASSWORD_PROPERTY_NAME = CASSANDRA_PREFIX + "password"; - private static final String KEYSPACE_PROPERTY_NAME = CASSANDRA_PREFIX + "keyspace"; - private static final String ZUSAMMEN = "zusammen"; - - @Override - public void contextInitialized(ServletContextEvent servletContextEvent) { - setCassandraConnectionPropertiesToSystem(); - } - - public static void setCassandraConnectionPropertiesToSystem() { - DeferredInitializer.init(); - } - - @Override - public void contextDestroyed(ServletContextEvent servletContextEvent) { - // no-op, required by the interface - } - - private static class DeferredInitializer { - - static { - setSystemProperty(NODES_PROPERTY_NAME, () -> - StringUtils.join(CassandraUtils.getAddresses(), ',')); - setBooleanSystemProperty(AUTHENTICATE_PROPERTY_NAME, CassandraUtils::isAuthenticate); - setBooleanSystemProperty(SSL_PROPERTY_NAME, CassandraUtils::isSsl); - setSystemProperty(TRUSTSTORE_PROPERTY_NAME, CassandraUtils::getTruststore); - setSystemProperty(TRUSTSTORE_PASSWORD_PROPERTY_NAME, CassandraUtils::getTruststorePassword); - setSystemProperty(USER_PROPERTY_NAME, CassandraUtils::getUser); - setSystemProperty(PASSWORD_PROPERTY_NAME, CassandraUtils::getPassword); - setSystemProperty(KEYSPACE_PROPERTY_NAME, () -> ZUSAMMEN); - setNullableSystemProperty(DATA_CENTER_PROPERTY_NAME, CassandraUtils::getLocalDataCenter); - setNullableSystemProperty(CONSISTENCY_LEVEL_PROPERTY_NAME, - CassandraUtils::getConsistencyLevel); - } - - private static void setSystemProperty(String name, Supplier valueSupplier) { - - if (System.getProperty(name) == null) { - System.setProperty(name, valueSupplier.get()); - } +public class CassandraConnectionInitializer { + + private static final String CASSANDRA_PREFIX = "cassandra."; + private static final String DATA_CENTER_PROPERTY_NAME = CASSANDRA_PREFIX + "datacenter"; + private static final String CONSISTENCY_LEVEL_PROPERTY_NAME = + CASSANDRA_PREFIX + "consistency.level"; + private static final String NODES_PROPERTY_NAME = CASSANDRA_PREFIX + "nodes"; + private static final String AUTHENTICATE_PROPERTY_NAME = CASSANDRA_PREFIX + "authenticate"; + private static final String SSL_PROPERTY_NAME = CASSANDRA_PREFIX + "ssl"; + private static final String TRUSTSTORE_PROPERTY_NAME = CASSANDRA_PREFIX + "truststore"; + private static final String TRUSTSTORE_PASSWORD_PROPERTY_NAME = + CASSANDRA_PREFIX + "truststore.password"; + private static final String USER_PROPERTY_NAME = CASSANDRA_PREFIX + "user"; + private static final String PASSWORD_PROPERTY_NAME = CASSANDRA_PREFIX + "password"; + private static final String KEYSPACE_PROPERTY_NAME = CASSANDRA_PREFIX + "keyspace"; + private static final String ZUSAMMEN = "zusammen"; + + private CassandraConnectionInitializer() { + // static utility class, prevent instantiation } - private static void setBooleanSystemProperty(String name, Supplier valueSupplier) { - setSystemProperty(name, () -> Boolean.toString(valueSupplier.get())); + public static void setCassandraConnectionPropertiesToSystem() { + DeferredInitializer.init(); } - private static void setNullableSystemProperty(String name, Supplier valueSupplier) { - - if ((System.getProperty(name) == null) && (valueSupplier.get() != null)) { - System.setProperty(name, valueSupplier.get()); - } - } - - private DeferredInitializer() { } - - public static void init() { - // just to ensure static initialization + private static class DeferredInitializer { + + static { + setSystemProperty(NODES_PROPERTY_NAME, () -> + StringUtils.join(CassandraUtils.getAddresses(), ',')); + setBooleanSystemProperty(AUTHENTICATE_PROPERTY_NAME, CassandraUtils::isAuthenticate); + setBooleanSystemProperty(SSL_PROPERTY_NAME, CassandraUtils::isSsl); + setSystemProperty(TRUSTSTORE_PROPERTY_NAME, CassandraUtils::getTruststore); + setSystemProperty(TRUSTSTORE_PASSWORD_PROPERTY_NAME, CassandraUtils::getTruststorePassword); + setSystemProperty(USER_PROPERTY_NAME, CassandraUtils::getUser); + setSystemProperty(PASSWORD_PROPERTY_NAME, CassandraUtils::getPassword); + setSystemProperty(KEYSPACE_PROPERTY_NAME, () -> ZUSAMMEN); + setNullableSystemProperty(DATA_CENTER_PROPERTY_NAME, CassandraUtils::getLocalDataCenter); + setNullableSystemProperty(CONSISTENCY_LEVEL_PROPERTY_NAME, + CassandraUtils::getConsistencyLevel); + } + + private DeferredInitializer() { } + + @SuppressWarnings("EmptyMethod") + static void init() { + // no-op, just to ensure static initialization + } + + private static void setSystemProperty(String name, Supplier valueSupplier) { + + if (System.getProperty(name) == null) { + System.setProperty(name, valueSupplier.get()); + } + } + + private static void setBooleanSystemProperty(String name, Supplier valueSupplier) { + setSystemProperty(name, () -> Boolean.toString(valueSupplier.get())); + } + + private static void setNullableSystemProperty(String name, Supplier valueSupplier) { + + if ((System.getProperty(name) == null) && (valueSupplier.get() != null)) { + System.setProperty(name, valueSupplier.get()); + } + } } - } } diff --git a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/pom.xml b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/pom.xml index 3b6027e36d..751b3a9be0 100644 --- a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/pom.xml +++ b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-core/pom.xml @@ -18,7 +18,7 @@ javax.servlet - servlet-api + javax.servlet-api ${servlet-api.version} provided diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml index 1a269ff6b5..29efa616ab 100644 --- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml @@ -22,7 +22,7 @@ javax.servlet - servlet-api + javax.servlet-api ${servlet-api.version} provided diff --git a/openecomp-be/tools/zusammen-tools/pom.xml b/openecomp-be/tools/zusammen-tools/pom.xml index 432248853f..9e11c53806 100644 --- a/openecomp-be/tools/zusammen-tools/pom.xml +++ b/openecomp-be/tools/zusammen-tools/pom.xml @@ -1,18 +1,25 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - + openecomp-zusammen-tools + org.openecomp.sdc.core.tools + openecomp-zusammen-tools + 1.3.0-SNAPSHOT + + + org.openecomp.sdc + openecomp-sdc-lib + ../../lib + 1.3.0-SNAPSHOT + + 2.4.7 2.7.7 - - - - openecomp-zusammen-tools org.openecomp.sdc @@ -47,7 +54,7 @@ com.amdocs.zusammen.plugin zusammen-state-store-cassandra-plugin - ${zusammen-state-store.version} + ${zusammen-state-store.version} org.hibernate @@ -76,20 +83,6 @@ test - openecomp-zusammen-tools - org.openecomp.sdc.core.tools - 1.3.0-SNAPSHOT - - org.openecomp.sdc - openecomp-sdc-lib - ../../lib - 1.3.0-SNAPSHOT - - -- cgit 1.2.3-korg