This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit e3640f45145d5d857e000a5f9f5ed9ef97a36417 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Mar 19 14:19:08 2018 +0100 CAMEL-11430: Migrate to Spring Boot 2 - work in progress --- .../springboot/HazelcastComponentAutoConfiguration.java | 2 +- .../components-starter/camel-kubernetes-starter/pom.xml | 4 ---- .../components-starter/camel-swagger-java-starter/pom.xml | 4 ---- .../camel-spring-boot-dependencies-generator/pom.xml | 13 ++++++++++--- .../spring-boot-dm/camel-spring-boot-dependencies/pom.xml | 5 ----- platforms/spring-boot/spring-boot-dm/pom.xml | 2 +- .../camel/itest/springboot/util/ArquillianPackager.java | 14 +++++++++----- .../main/resources/spring-boot-fix-dependencies.properties | 6 +----- 8 files changed, 22 insertions(+), 28 deletions(-) diff --git a/platforms/spring-boot/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java index f779771..d6de019 100644 --- a/platforms/spring-boot/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java @@ -21,6 +21,7 @@ import java.util.Map; import javax.annotation.Generated; import org.apache.camel.CamelContext; import org.apache.camel.component.hazelcast.HazelcastComponent; +import org.apache.camel.spring.boot.util.RelaxedPropertyResolver; import org.apache.camel.util.IntrospectionSupport; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionMessage; @@ -29,7 +30,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.SpringBootCondition; -import org.springframework.boot.bind.RelaxedPropertyResolver; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ConditionContext; diff --git a/platforms/spring-boot/components-starter/camel-kubernetes-starter/pom.xml b/platforms/spring-boot/components-starter/camel-kubernetes-starter/pom.xml index b87daa3..8fef119 100644 --- a/platforms/spring-boot/components-starter/camel-kubernetes-starter/pom.xml +++ b/platforms/spring-boot/components-starter/camel-kubernetes-starter/pom.xml @@ -48,10 +48,6 @@ <groupId>org.apache.camel</groupId> <artifactId>camel-spring-boot-starter</artifactId> </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-validator</artifactId> - </dependency> <!--END OF GENERATED CODE--> </dependencies> </project> diff --git a/platforms/spring-boot/components-starter/camel-swagger-java-starter/pom.xml b/platforms/spring-boot/components-starter/camel-swagger-java-starter/pom.xml index 559f295..5e679e9 100644 --- a/platforms/spring-boot/components-starter/camel-swagger-java-starter/pom.xml +++ b/platforms/spring-boot/components-starter/camel-swagger-java-starter/pom.xml @@ -48,10 +48,6 @@ <groupId>org.apache.camel</groupId> <artifactId>camel-spring-boot-starter</artifactId> </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-validator</artifactId> - </dependency> <!--END OF GENERATED CODE--> </dependencies> </project> diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies-generator/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies-generator/pom.xml index b14085e..045f17a 100644 --- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies-generator/pom.xml +++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies-generator/pom.xml @@ -106,7 +106,7 @@ <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot-version}</version> </bom> - <!-- Other BOMs used by SB are transitively imported now --> + <!-- Other BOMs imported by SB are now checked transitively --> </boms> </checkConflicts> <dependencies> @@ -126,6 +126,7 @@ <exclude>org.apache.httpcomponents:httpclient-cache</exclude> <exclude>org.apache.httpcomponents:httpclient-osgi</exclude> <exclude>org.apache.httpcomponents:httpcore</exclude> + <exclude>org.apache.httpcomponents:httpcore-nio</exclude> <exclude>org.apache.httpcomponents:httpmime</exclude> <exclude>org.apache.derby:derby</exclude> <exclude>org.apache.logging.log4j:*</exclude> @@ -135,7 +136,11 @@ <exclude>org.hsqldb:*</exclude> <exclude>org.mockito:*</exclude> - <exclude>org.slf4j:*</exclude> + <exclude>org.slf4j:jul-to-slf4j</exclude> + <exclude>org.slf4j:log4j-over-slf4j</exclude> + <exclude>org.slf4j:slf4j-api</exclude> + <exclude>org.slf4j:slf4j-log4j12</exclude> + <exclude>org.slf4j:slf4j-simple</exclude> <exclude>org.springframework*:*</exclude> @@ -164,7 +169,9 @@ <exclude>org.scala-lang:*</exclude> <exclude>org.apache.lucene:*</exclude> - + <!-- Jetty --> + <exclude>org.eclipse.jetty:jetty-rewrite</exclude> + <exclude>org.eclipse.jetty:jetty-util-ajax</exclude> <!-- Unrelated --> <exclude>org.apache.servicemix.bundles:*</exclude> diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml index 488da0d..c7b39f4 100644 --- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml +++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml @@ -3225,11 +3225,6 @@ <version>1.1.1</version> </dependency> <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore-nio</artifactId> - <version>4.4.9</version> - </dependency> - <dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka-clients</artifactId> <version>1.0.1</version> diff --git a/platforms/spring-boot/spring-boot-dm/pom.xml b/platforms/spring-boot/spring-boot-dm/pom.xml index 9763728..6141dbd 100644 --- a/platforms/spring-boot/spring-boot-dm/pom.xml +++ b/platforms/spring-boot/spring-boot-dm/pom.xml @@ -41,7 +41,7 @@ <properties> <!-- Spring-Boot target version --> - <spring-boot-version>1.5.11.RELEASE</spring-boot-version> + <spring-boot-version>2.0.0.RELEASE</spring-boot-version> <!-- The following dependencies should be aligned with the ones in standard camel parent --> <!-- Needed by BOM generator--> diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java index 5119c86..5895357 100644 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java @@ -152,7 +152,6 @@ public final class ArquillianPackager { commonExclusions.add(MavenDependencies.createExclusion("log4j", "log4j")); commonExclusions.add(MavenDependencies.createExclusion("log4j", "log4j-slf4j-impl")); commonExclusions.add(MavenDependencies.createExclusion("org.apache.logging.log4j", "log4j")); - commonExclusions.add(MavenDependencies.createExclusion("org.apache.logging.log4j", "log4j-jcl")); commonExclusions.add(MavenDependencies.createExclusion("org.apache.logging.log4j", "log4j-core")); commonExclusions.add(MavenDependencies.createExclusion("org.apache.logging.log4j", "log4j-slf4j-impl")); commonExclusions.add(MavenDependencies.createExclusion("log4j", "apache-log4j-extras")); @@ -301,6 +300,8 @@ public final class ArquillianPackager { ignore.add("com.github.jnr"); ignore.add("com.sun.xml.bind:jaxb-xjc"); ignore.add("commons-beanutils:commons-beanutils"); + ignore.add("io.dropwizard.metrics:metrics-json"); // PR to spring-boot + ignore.add("io.dropwizard.metrics:metrics-jvm"); // PR to spring-boot ignore.add("io.fabric8:kubernetes-"); ignore.add("io.netty:netty:jar"); // an old version ignore.add("io.netty:netty-tcnative-boringssl-static"); @@ -317,17 +318,24 @@ public final class ArquillianPackager { ignore.add("org.apache.logging.log4j:log4j-jcl"); ignore.add("org.apache.maven"); ignore.add("org.apache.parquet"); + ignore.add("org.apache.solr:solr-solrj"); // PR to spring-boot ignore.add("org.apache.velocity"); ignore.add("org.apache.qpid:qpid-jms-client"); ignore.add("org.opensaml"); ignore.add("org.ow2.asm"); // No problem ignore.add("org.codehaus.plexus"); + ignore.add("org.eclipse.jetty.websocket:websocket-api"); // PR to spring-boot + ignore.add("org.infinispan"); ignore.add("org.jboss.arquillian.container"); + ignore.add("org.jboss.logging"); + ignore.add("org.jboss.marshalling"); ignore.add("org.jboss:"); ignore.add("org.hibernate:hibernate-validator"); // does not match with hibernate-core ignore.add("org.mortbay.jetty:servlet-api-2.5"); ignore.add("org.scala-lang:scala-compiler"); + ignore.add("org.slf4j:slf4j-ext"); // PR to spring-boot ignore.add("org.easytesting"); + ignore.add("net.java.dev.jna:jna-platform"); // PR to spring-boot ignore.add("net.openhft"); ignore.add("org.scala-lang.modules:scala-java8-compat_2.11"); ignore.add("net.sourceforge.htmlunit:htmlunit-core-js"); // v 2.21 does not exist @@ -551,10 +559,6 @@ public final class ArquillianPackager { private static String enforceExclusions(ITestConfig config, String dependencyXml, List<MavenDependencyExclusion> exclusions) { - if (dependencyXml.contains("<groupId>org.springframework.boot</groupId>") && dependencyXml.contains("<artifactId>spring-boot-starter")) { - return dependencyXml; - } - if (!dependencyXml.contains("<exclusions>")) { dependencyXml = dependencyXml.replace("</dependency>", "<exclusions></exclusions></dependency>"); } diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/spring-boot-fix-dependencies.properties b/tooling/maven/camel-package-maven-plugin/src/main/resources/spring-boot-fix-dependencies.properties index b1ad02f..fe4498d 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/resources/spring-boot-fix-dependencies.properties +++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/spring-boot-fix-dependencies.properties @@ -14,10 +14,10 @@ ## See the License for the specific language governing permissions and ## limitations under the License. ## --------------------------------------------------------------------------- + # This file contains additional dependencies needed by camel modules in a spring-boot deployment # Use comma-separated values to include multiple dependencies - # Global dependencies included in all modules (except the ones in the list) global=org.apache.camel:camel-core-starter,org.apache.camel:camel-spring-boot-starter @@ -42,7 +42,6 @@ camel-jcr=org.apache.lucene:lucene-core:${lucene3-version} camel-jira=com.atlassian.jira:jira-rest-java-client camel-jms=org.apache.geronimo.specs:geronimo-jms_1.1_spec camel-jpa=org.apache.geronimo.specs:geronimo-jpa_2.1_spec -camel-kubernetes=org.hibernate:hibernate-validator camel-scala=org.scala-lang:scala-library:${scala-version},org.scala-lang.modules:scala-xml_2.11:${scalaxml-version} @@ -56,8 +55,5 @@ camel-salesforce=org.eclipse.jetty:jetty-client,org.eclipse.jetty:jetty-util,org camel-servletlistener=javax.servlet:javax.servlet-api -camel-swagger-java=org.hibernate:hibernate-validator - - # Existed for Netty 3 exclude_camel-hbase=io.netty:netty -- To stop receiving notification emails like this one, please contact davscl...@apache.org.