From 55425bc4bace766fb66303f0d81b9681bb6c3af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Livora?= Date: Fri, 27 Jan 2017 21:28:35 +0100 Subject: [PATCH] Clean up and update dependencies (#82) --- activemq-microservice-provider/pom.xml | 3 - .../camel/CamelCdiContextFactory.java | 6 +- camel-microservice-provider/pom.xml | 4 -- cdi-microservice-provider/pom.xml | 16 ----- .../providers/cdi/util/VersionResolver.java | 8 +-- http-invoker-microservice-provider/pom.xml | 4 -- hystrix-microservice-provider/pom.xml | 4 ++ microservices-bom/pom.xml | 72 +++++++++++++------ microservices/pom.xml | 4 ++ .../io/silverware/microservices/Boot.java | 6 +- pom.xml | 5 -- vertx-microservice-provider/pom.xml | 3 - 12 files changed, 69 insertions(+), 66 deletions(-) diff --git a/activemq-microservice-provider/pom.xml b/activemq-microservice-provider/pom.xml index 88e107b..f455cbf 100644 --- a/activemq-microservice-provider/pom.xml +++ b/activemq-microservice-provider/pom.xml @@ -26,18 +26,15 @@ org.apache.activemq artemis-jms-client - 1.2.0 org.apache.activemq artemis-jms-server - 1.2.0 test org.apache.activemq activemq-all - 5.13.2 test diff --git a/camel-cdi-integration/src/main/java/io/silverware/microservices/providers/camel/CamelCdiContextFactory.java b/camel-cdi-integration/src/main/java/io/silverware/microservices/providers/camel/CamelCdiContextFactory.java index 289906e..1793c5b 100644 --- a/camel-cdi-integration/src/main/java/io/silverware/microservices/providers/camel/CamelCdiContextFactory.java +++ b/camel-cdi-integration/src/main/java/io/silverware/microservices/providers/camel/CamelCdiContextFactory.java @@ -2,7 +2,7 @@ * -----------------------------------------------------------------------\ * SilverWare *   - * Copyright (C) 2015 the original author or authors. + * Copyright (C) 2015 - 2017 the original author or authors. *   * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import io.silverware.microservices.util.Utils; import org.apache.camel.CamelContext; -import org.apache.camel.cdi.internal.CamelContextMap; import org.apache.camel.impl.DefaultCamelContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -62,8 +61,7 @@ public CamelContext createCamelContext(final Context context) { if (cdiSilverService.isDeployed()) { log.info("CDI SilverService connected successfully!"); - CamelContextMap camelContextMap = cdiSilverService.findByType(CamelContextMap.class); - return camelContextMap.getCamelContext("camel-1"); + return cdiSilverService.findByType(CamelContext.class); } else { log.warn("CDI deployment took to long, trying to continue."); } diff --git a/camel-microservice-provider/pom.xml b/camel-microservice-provider/pom.xml index 77c8373..7164435 100644 --- a/camel-microservice-provider/pom.xml +++ b/camel-microservice-provider/pom.xml @@ -17,10 +17,6 @@ org.apache.camel camel-core - - com.fasterxml.jackson.core - jackson-databind - diff --git a/cdi-microservice-provider/pom.xml b/cdi-microservice-provider/pom.xml index 841fef0..e4a5217 100644 --- a/cdi-microservice-provider/pom.xml +++ b/cdi-microservice-provider/pom.xml @@ -21,26 +21,10 @@ org.jboss.weld.se weld-se - - javax.ejb - ejb-api - org.javassist javassist - - io.vertx - vertx-core - - - io.vertx - vertx-web - - - commons-beanutils - commons-beanutils - org.jmockit jmockit diff --git a/cdi-microservice-provider/src/main/java/io/silverware/microservices/providers/cdi/util/VersionResolver.java b/cdi-microservice-provider/src/main/java/io/silverware/microservices/providers/cdi/util/VersionResolver.java index d4609d6..812008e 100644 --- a/cdi-microservice-provider/src/main/java/io/silverware/microservices/providers/cdi/util/VersionResolver.java +++ b/cdi-microservice-provider/src/main/java/io/silverware/microservices/providers/cdi/util/VersionResolver.java @@ -1,8 +1,8 @@ /* * -----------------------------------------------------------------------\ * SilverWare - * - * Copyright (C) 2015 - 2016 the original author or authors. + * + * Copyright (C) 2016 - 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,8 +39,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import io.netty.util.internal.StringUtil; - /** * This class is used for resolving of api and implementation versions. * The resolution process takes the first version which is provided for the microservice from following list @@ -176,7 +174,7 @@ String resolveVersionFromInterfacesClasses(final Class clazz, Function versions = Arrays.stream(interfaces) .map(i -> resolveVersionFromAnnotations(Arrays.stream(i.getAnnotations()), lambda)) - .filter(v -> !StringUtil.isNullOrEmpty(v)) + .filter(v -> v != null && !v.isEmpty()) .collect(toList()); if (versions.size() > 1) { throw new IllegalArgumentException(String.format(MORE_MICROSERVICE_VERSIONS_FOUND, clazz.getName())); diff --git a/http-invoker-microservice-provider/pom.xml b/http-invoker-microservice-provider/pom.xml index f2fdfe8..cdb2725 100644 --- a/http-invoker-microservice-provider/pom.xml +++ b/http-invoker-microservice-provider/pom.xml @@ -25,10 +25,6 @@ ${project.version} test - - org.javassist - javassist - com.cedarsoftware json-io diff --git a/hystrix-microservice-provider/pom.xml b/hystrix-microservice-provider/pom.xml index 1086a7f..9d7f585 100644 --- a/hystrix-microservice-provider/pom.xml +++ b/hystrix-microservice-provider/pom.xml @@ -15,6 +15,10 @@ + + io.silverware + microservices + io.silverware cdi-microservice-provider diff --git a/microservices-bom/pom.xml b/microservices-bom/pom.xml index ad00e6b..369a4b3 100644 --- a/microservices-bom/pom.xml +++ b/microservices-bom/pom.xml @@ -1,5 +1,5 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 io.silverware microservices-bom @@ -51,34 +51,36 @@ - 1.5 + 1.6 0.9.10 - 2.5 - 6.9.10 - 2.16.1 - 1.7.13 + 2.7 + 6.10 + 2.18.1 + 1.7.22 2.4.1.Final 3.0 3.3.0.Final - 3.6.6.Final + 3.6.12.Final 1.3.1 - 3.4 - 1.3.2 - 3.20.0-GA - 1.4.4.Final - 1.3.2 - 2.6.4 - 3.2.0 - 4.3.0 - 1.9.2 + 3.5 + 2.0.1 + 3.21.0-GA + 1.4.8.Final + 1.3.5 + 2.7.8 + 3.3.3 + 4.9.6 + 1.9.3 6.5.0.Final - 1.29 + 1.30 3.5.2 - 3.0.19.Final + 3.1.0.Final 2.0.1 1.5.9 - 2.2.22 + 2.6.3 + 5.14.3 + 1.5.1 1.8 @@ -153,6 +155,21 @@ reflections ${version.reflections} + + org.apache.activemq + activemq-all + ${version.activemq} + + + org.apache.activemq + artemis-jms-client + ${version.activemq.artemis} + + + org.apache.activemq + artemis-jms-server + ${version.activemq.artemis} + org.apache.logging.log4j log4j-api @@ -268,7 +285,7 @@ ${version.commons.lang} - net.sourceforge.findbugs + com.google.code.findbugs annotations ${version.findbugs} provided @@ -304,6 +321,11 @@ war ${version.jolokia} + + com.fasterxml.jackson.core + jackson-core + ${version.jackson} + com.fasterxml.jackson.core jackson-databind @@ -329,6 +351,16 @@ vertx-web ${version.vertx} + + io.vertx + vertx-lang-groovy + ${version.vertx} + + + io.vertx + vertx-lang-js + ${version.vertx} + commons-beanutils commons-beanutils diff --git a/microservices/pom.xml b/microservices/pom.xml index 776333b..faa71a2 100644 --- a/microservices/pom.xml +++ b/microservices/pom.xml @@ -21,6 +21,10 @@ com.cedarsoftware json-io + + com.google.code.findbugs + annotations + com.vdurmont semver4j diff --git a/microservices/src/main/java/io/silverware/microservices/Boot.java b/microservices/src/main/java/io/silverware/microservices/Boot.java index 83d4eb0..338a9f3 100644 --- a/microservices/src/main/java/io/silverware/microservices/Boot.java +++ b/microservices/src/main/java/io/silverware/microservices/Boot.java @@ -2,7 +2,7 @@ * -----------------------------------------------------------------------\ * SilverWare *   - * Copyright (C) 2015 the original author or authors. + * Copyright (C) 2015 - 2017 the original author or authors. *   * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,12 +40,14 @@ import java.util.Map; import java.util.Properties; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Main class to boot the Microservices platforms. * * @author Martin Večeřa */ -@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "DM_EXIT", justification = "This class is allowed to terminate the JVM.") +@SuppressFBWarnings(value = "DM_EXIT", justification = "This class is allowed to terminate the JVM.") public final class Boot { private static final Logger log = LogManager.getLogger(Boot.class); diff --git a/pom.xml b/pom.xml index 06c127a..a36e62d 100644 --- a/pom.xml +++ b/pom.xml @@ -124,11 +124,6 @@ testng test - - net.sourceforge.findbugs - annotations - provided - diff --git a/vertx-microservice-provider/pom.xml b/vertx-microservice-provider/pom.xml index 3a8f785..0173240 100644 --- a/vertx-microservice-provider/pom.xml +++ b/vertx-microservice-provider/pom.xml @@ -16,7 +16,6 @@ 1.5 2.4.6 - 3.2.0 @@ -31,12 +30,10 @@ io.vertx vertx-lang-groovy - ${version.vertx.extension} io.vertx vertx-lang-js - ${version.vertx.extension} test