Repository: camel Updated Branches: refs/heads/master 712378ab3 -> 011e4ec57
http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/pom.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/pom.xml b/tests/camel-itest-spring-boot/pom.xml index 0f28e82..ad4f0bc 100644 --- a/tests/camel-itest-spring-boot/pom.xml +++ b/tests/camel-itest-spring-boot/pom.xml @@ -34,12 +34,6 @@ <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-boot-starter</artifactId> - <exclusions> - <exclusion> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-logging</artifactId> - </exclusion> - </exclusions> </dependency> <!-- Dependency needed to incorporate classes in main jar --> @@ -49,12 +43,6 @@ <version>${spring-boot-version}</version> </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-log4j2</artifactId> - <version>${spring-boot-version}</version> - </dependency> - <!-- Test dependencies needed also at compile/unitTestEnabled time --> <dependency> <groupId>org.jboss.shrinkwrap</groupId> @@ -161,7 +149,95 @@ <forkedProcessTimeoutInSeconds>15000</forkedProcessTimeoutInSeconds> <rerunFailingTestsCount>1</rerunFailingTestsCount> <includes> - <include>**/*Test.java</include> + <!--<include>**/*Test.java</include>--> + + <include>org.apache.camel.itest.springboot.CamelNetty4Test</include> + <include>org.apache.camel.itest.springboot.CamelNettyHttpTest</include> + <include>org.apache.camel.itest.springboot.CamelNettyTest</include> + <include>org.apache.camel.itest.springboot.CamelOgnlTest</include> + <include>org.apache.camel.itest.springboot.CamelOlingo2Test</include> + <include>org.apache.camel.itest.springboot.CamelOpenshiftTest</include> + <include>org.apache.camel.itest.springboot.CamelOptaplannerTest</include> + <include>org.apache.camel.itest.springboot.CamelPahoTest</include> + <include>org.apache.camel.itest.springboot.CamelPdfTest</include> + <include>org.apache.camel.itest.springboot.CamelPgeventTest</include> + <include>org.apache.camel.itest.springboot.CamelPrinterTest</include> + <include>org.apache.camel.itest.springboot.CamelProtobufTest</include> + <include>org.apache.camel.itest.springboot.CamelQuartz2Test</include> + <include>org.apache.camel.itest.springboot.CamelQuartzTest</include> + <include>org.apache.camel.itest.springboot.CamelQuickfixTest</include> + <include>org.apache.camel.itest.springboot.CamelRabbitmqTest</include> + <include>org.apache.camel.itest.springboot.CamelRestletTest</include> + <include>org.apache.camel.itest.springboot.CamelRibbonTest</include> + <include>org.apache.camel.itest.springboot.CamelRmiTest</include> + <include>org.apache.camel.itest.springboot.CamelRouteboxTest</include> + <include>org.apache.camel.itest.springboot.CamelRssTest</include> + <include>org.apache.camel.itest.springboot.CamelRubyTest</include> + <include>org.apache.camel.itest.springboot.CamelRxTest</include> + <include>org.apache.camel.itest.springboot.CamelSalesforceTest</include> + <include>org.apache.camel.itest.springboot.CamelSapNetweaverTest</include> + <include>org.apache.camel.itest.springboot.CamelSaxonTest</include> + <include>org.apache.camel.itest.springboot.CamelScalaTest</include> + <include>org.apache.camel.itest.springboot.CamelSchematronTest</include> + <include>org.apache.camel.itest.springboot.CamelScriptTest</include> + <include>org.apache.camel.itest.springboot.CamelScrTest</include> + <include>org.apache.camel.itest.springboot.CamelServicenowTest</include> + <include>org.apache.camel.itest.springboot.CamelServletlistenerTest</include> + <include>org.apache.camel.itest.springboot.CamelServletTest</include> + <include>org.apache.camel.itest.springboot.CamelShiroTest</include> + <include>org.apache.camel.itest.springboot.CamelSipTest</include> + <include>org.apache.camel.itest.springboot.CamelSjmsTest</include> + <include>org.apache.camel.itest.springboot.CamelSlackTest</include> + <include>org.apache.camel.itest.springboot.CamelSmppTest</include> + <include>org.apache.camel.itest.springboot.CamelSnakeyamlTest</include> + <include>org.apache.camel.itest.springboot.CamelSnmpTest</include> + <include>org.apache.camel.itest.springboot.CamelSoapTest</include> + <include>org.apache.camel.itest.springboot.CamelSolrTest</include> + <include>org.apache.camel.itest.springboot.CamelSparkRestTest</include> + <include>org.apache.camel.itest.springboot.CamelSparkTest</include> + <include>org.apache.camel.itest.springboot.CamelSplunkTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringBatchTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringBootTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringDmTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringIntegrationTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringJavaconfigTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringLdapTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringRedisTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringSecurityTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringTest</include> + <include>org.apache.camel.itest.springboot.CamelSpringWsTest</include> + <include>org.apache.camel.itest.springboot.CamelSqlTest</include> + <include>org.apache.camel.itest.springboot.CamelSshTest</include> + <include>org.apache.camel.itest.springboot.CamelStaxTest</include> + <include>org.apache.camel.itest.springboot.CamelStompTest</include> + <include>org.apache.camel.itest.springboot.CamelStreamTest</include> + <include>org.apache.camel.itest.springboot.CamelStringtemplateTest</include> + <include>org.apache.camel.itest.springboot.CamelSwaggerJavaTest</include> + <include>org.apache.camel.itest.springboot.CamelSyslogTest</include> + <include>org.apache.camel.itest.springboot.CamelTagsoupTest</include> + <include>org.apache.camel.itest.springboot.CamelTarfileTest</include> + <include>org.apache.camel.itest.springboot.CamelTelegramTest</include> + <include>org.apache.camel.itest.springboot.CamelTestngTest</include> + <include>org.apache.camel.itest.springboot.CamelTestTest</include> + <include>org.apache.camel.itest.springboot.CamelTwitterTest</include> + <include>org.apache.camel.itest.springboot.CamelUndertowTest</include> + <include>org.apache.camel.itest.springboot.CamelUnivocityParsersTest</include> + <include>org.apache.camel.itest.springboot.CamelUrlrewriteTest</include> + <include>org.apache.camel.itest.springboot.CamelVelocityTest</include> + <include>org.apache.camel.itest.springboot.CamelVertxTest</include> + <include>org.apache.camel.itest.springboot.CamelWeatherTest</include> + <include>org.apache.camel.itest.springboot.CamelWebsocketTest</include> + <include>org.apache.camel.itest.springboot.CamelXmlbeansTest</include> + <include>org.apache.camel.itest.springboot.CamelXmljsonTest</include> + <include>org.apache.camel.itest.springboot.CamelXmlrpcTest</include> + <include>org.apache.camel.itest.springboot.CamelXmlsecurityTest</include> + <include>org.apache.camel.itest.springboot.CamelXmppTest</include> + <include>org.apache.camel.itest.springboot.CamelXstreamTest</include> + <include>org.apache.camel.itest.springboot.CamelYammerTest</include> + <include>org.apache.camel.itest.springboot.CamelZipfileTest</include> + <include>org.apache.camel.itest.springboot.CamelZipkinTest</include> + <include>org.apache.camel.itest.springboot.CamelZookeeperTest</include> + </includes> <systemProperties> <!-- Test configuration --> @@ -174,7 +250,7 @@ --> <property> <name>itest.springboot.unitTestEnabled</name> - <value>false</value> + <value>true</value> </property> <property> <name>itest.springboot.includeTestDependencies</name> @@ -185,77 +261,6 @@ <value>false</value> </property> - <!-- Test dependencies required by modules --> - <property> - <name>version_bam_org.hibernate:hibernate-entitymanager</name> - <value>5.0.9.Final</value> - </property> - <property> - <name>version_org.apache.geronimo.specs:geronimo-jta_1.1_spec</name> - <value>${geronimo-jta-spec-version}</value> - </property> - - <!-- Other dependencies needed before starters --> - <property> - <name>version_org.apache.camel:camel-core</name> - <value>${project.version}</value> - </property> - <property> - <name>version_org.apache.camel:camel-netty4</name> - <value>${project.version}</value> - </property> - <property> - <name>version_org.springframework.data:spring-data-redis</name> - <value>${spring-data-redis-version}</value> - </property> - <property> - <name>version_org.hibernate:hibernate-validator</name> - <value>${hibernate-validator-version}</value> - </property> - <property> - <name>version_xom:xom</name> - <value>${xom-version}</value> - </property> - <property> - <name>version_org.springframework.boot:spring-boot-starter-web</name> - <value>${spring-boot-version}</value> - </property> - <property> - <name>version_2.10_org.scala-lang:scala-library</name> - <value>${scala-2.10-version}</value> - </property> - <property> - <name>version_org.springframework:spring-webmvc</name> - <value>${spring-version}</value> - </property> - <property> - <name>version_org.apache.lucene:lucene-core</name> - <value>${lucene3-version}</value> - </property> - <property> - <name>version_com.google.inject:guice</name> - <value>${guice3-version}</value> - </property> - <property> - <name>version_com.google.guava:guava</name> - <value>${google-guava-version}</value> - </property> - <property> - <name>version_org.apache.hadoop:hadoop-hdfs</name> - <value>${hadoop2-version}</value> - </property> - <property> - <name>version_io.netty:netty-all</name> - <value>${netty-version}</value> - </property> - <property> - <name>version_org.glassfish.grizzly:grizzly-websockets</name> - <value>${grizzly-websockets-version}</value> - </property> - <property> - <name>version_org.glassfish.grizzly:connection-pool</name> - <value>${grizzly-websockets-version}</value> - </property> </systemProperties> </configuration> </plugin> http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/main/java/org/apache/camel/itest/springboot/ITestApplication.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/main/java/org/apache/camel/itest/springboot/ITestApplication.java b/tests/camel-itest-spring-boot/src/main/java/org/apache/camel/itest/springboot/ITestApplication.java index 584f59b..f85bdb6 100644 --- a/tests/camel-itest-spring-boot/src/main/java/org/apache/camel/itest/springboot/ITestApplication.java +++ b/tests/camel-itest-spring-boot/src/main/java/org/apache/camel/itest/springboot/ITestApplication.java @@ -18,7 +18,11 @@ package org.apache.camel.itest.springboot; import java.net.URL; -import org.apache.logging.log4j.core.config.Configurator; +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.classic.joran.JoranConfigurator; +import ch.qos.logback.core.joran.spi.JoranException; +import ch.qos.logback.core.util.StatusPrinter; + import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -36,6 +40,8 @@ import org.springframework.scheduling.annotation.EnableAsync; public class ITestApplication { public static void main(String[] args) throws Exception { + overrideLoggingConfig(); + SpringApplication.run(ITestApplication.class, args); } @@ -44,4 +50,26 @@ public class ITestApplication { // to tell source-check this is not a utility-class return "spring-boot-main"; } + + private static void overrideLoggingConfig() { + + URL logbackFile = ITestApplication.class.getResource("/spring-logback.xml"); + if (logbackFile != null) { + + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + + try { + JoranConfigurator configurator = new JoranConfigurator(); + configurator.setContext(context); + // Call context.reset() to clear any previous configuration, e.g. default + // configuration. For multi-step configuration, omit calling context.reset(). + context.reset(); + configurator.doConfigure(logbackFile); + } catch (JoranException je) { + // StatusPrinter will handle this + } + StatusPrinter.printInCaseOfErrorsOrWarnings(context); + } + + } } http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java new file mode 100644 index 0000000..6bbef26 --- /dev/null +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/converter/myconverter/StaticDummyFallbackConverter.java @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.converter.myconverter; + +import org.apache.camel.Converter; +import org.apache.camel.Exchange; +import org.apache.camel.FallbackConverter; +import org.apache.camel.spi.TypeConverterRegistry; + +import java.util.TimeZone; + + +/** + * Converter added here to overcome issue CAMEL-10060 in integration tests (Needed because some unit tests create new camel contexts from scratch). + */ +@Converter +public final class StaticDummyFallbackConverter { + + private StaticDummyFallbackConverter() { + } + + @FallbackConverter + public static Object convertTo(Class<?> type, Exchange exchange, Object value, TypeConverterRegistry registry) { + if (TimeZone.class.isAssignableFrom(value.getClass())) { + return "Time talks"; + } + return null; + } + +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBamTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBamTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBamTest.java index 7a31765..ff257c2 100644 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBamTest.java +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBamTest.java @@ -38,8 +38,7 @@ public class CamelBamTest extends AbstractSpringBootTestSupport { .module(inferModuleName(CamelBamTest.class)) .resource("components/bam-persistence.xml", "META-INF/persistence.xml") .resource("components/bam-spring.xml", "META-INF/spring/spring.xml") - .dependency(DependencyResolver.withVersion("version_bam_", "org.hibernate:hibernate-entitymanager")) - .dependency(DependencyResolver.withVersion("org.apache.geronimo.specs:geronimo-jta_1.1_spec")) + .dependency("org.hibernate:hibernate-entitymanager:" + DependencyResolver.resolveSpringBootParentProperty("${hibernate-version}")) .build(); } http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBlueprintTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBlueprintTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBlueprintTest.java deleted file mode 100644 index c50fe47..0000000 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelBlueprintTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.itest.springboot; - -import org.apache.camel.itest.springboot.util.ArquillianPackager; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.junit.Test; -import org.junit.runner.RunWith; - - -@RunWith(Arquillian.class) -public class CamelBlueprintTest extends AbstractSpringBootTestSupport { - - @Deployment - public static Archive<?> createSpringBootPackage() throws Exception { - return ArquillianPackager.springBootPackage(createTestConfig()); - } - - public static ITestConfig createTestConfig() { - return new ITestConfigBuilder() - .module(inferModuleName(CamelBlueprintTest.class)) - .build(); - } - - @Test - public void componentTests() throws Exception { - // no component test - this.runModuleUnitTestsIfEnabled(config); - } - - -} http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCassandraqlTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCassandraqlTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCassandraqlTest.java index 0cde434..2140194 100644 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCassandraqlTest.java +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCassandraqlTest.java @@ -40,7 +40,8 @@ public class CamelCassandraqlTest extends AbstractSpringBootTestSupport { // .dependency(DependencyResolver.withVersion("io.dropwizard.metrics:metrics-core")) // .exclusion("com.codahale.metrics:*") .unitTestExclusionPattern(".*(\\.integration\\..*|IntegrationTest$|CassandraComponentProducerTest$|CassandraComponentBeanRefTest$|CassandraComponentConsumerTest$)") - // excluded tests have been checked manually (they need to run on their own JDK) + //.unitTestInclusionPattern(".*NamedCassandraAggregationRepositoryTest$") + // excluded tests have been checked manually (they need to run on their own JVM) .build(); } http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCdiTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCdiTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCdiTest.java deleted file mode 100644 index 3178583..0000000 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelCdiTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.itest.springboot; - -import org.apache.camel.itest.springboot.util.ArquillianPackager; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.junit.Test; -import org.junit.runner.RunWith; - - -@RunWith(Arquillian.class) -public class CamelCdiTest extends AbstractSpringBootTestSupport { - - @Deployment - public static Archive<?> createSpringBootPackage() throws Exception { - return ArquillianPackager.springBootPackage(createTestConfig()); - } - - public static ITestConfig createTestConfig() { - return new ITestConfigBuilder() - .module(inferModuleName(CamelCdiTest.class)) - .unitTestExclusionPattern(".*Cdi12Test$") - .build(); - } - - @Test - public void componentTests() throws Exception { - // no component test - this.runModuleUnitTestsIfEnabled(config); - } - - -} http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelEjbTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelEjbTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelEjbTest.java deleted file mode 100644 index ec0c414..0000000 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelEjbTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.itest.springboot; - -import org.apache.camel.itest.springboot.util.ArquillianPackager; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.Archive; -import org.junit.Test; -import org.junit.runner.RunWith; - - -@RunWith(Arquillian.class) -public class CamelEjbTest extends AbstractSpringBootTestSupport { - - @Deployment - public static Archive<?> createSpringBootPackage() throws Exception { - return ArquillianPackager.springBootPackage(createTestConfig()); - } - - public static ITestConfig createTestConfig() { - return new ITestConfigBuilder() - .module(inferModuleName(CamelEjbTest.class)) - .build(); - } - - @Test - public void componentTests() throws Exception { - this.runComponentTest(config); - this.runModuleUnitTestsIfEnabled(config); - } - - -} http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java ---------------------------------------------------------------------- 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 f3623c6..67e89a4 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 @@ -61,7 +61,6 @@ import org.jboss.shrinkwrap.impl.base.path.BasicPath; import org.jboss.shrinkwrap.resolver.api.maven.ConfigurableMavenResolverSystem; import org.jboss.shrinkwrap.resolver.api.maven.Maven; import org.jboss.shrinkwrap.resolver.api.maven.MavenResolvedArtifact; -import org.jboss.shrinkwrap.resolver.api.maven.PackagingType; import org.jboss.shrinkwrap.resolver.api.maven.ScopeType; import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinate; import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinates; @@ -107,7 +106,7 @@ public final class ArquillianPackager { } if (config.getUseCustomLog()) { - ark = ark.addAsResource("log4j2-spring.xml", CLASSES_FOLDER + "/log4j2.xml"); + ark = ark.addAsResource("spring-logback.xml", CLASSES_FOLDER + "/spring-logback.xml"); } for (Map.Entry<String, String> res : config.getResources().entrySet()) { @@ -137,6 +136,10 @@ public final class ArquillianPackager { List<MavenDependencyExclusion> commonExclusions = new LinkedList<>(); commonExclusions.add(MavenDependencies.createExclusion("org.slf4j", "slf4j-log4j12")); 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-core")); + commonExclusions.add(MavenDependencies.createExclusion("org.apache.logging.log4j", "log4j-slf4j-impl")); commonExclusions.add(MavenDependencies.createExclusion("log4j", "apache-log4j-extras")); commonExclusions.add(MavenDependencies.createExclusion("org.slf4j", "slf4j-simple")); commonExclusions.add(MavenDependencies.createExclusion("org.slf4j", "slf4j-jdk14")); @@ -167,37 +170,60 @@ public final class ArquillianPackager { if (config.getIncludeProvidedDependencies() || config.getIncludeTestDependencies() || config.getUnitTestEnabled()) { + StringBuilder dependencies = new StringBuilder(); List<ScopeType> scopes = new LinkedList<>(); if (config.getIncludeTestDependencies() || config.getUnitTestEnabled()) { + dependencies.append(DependencyResolver.getDependencies(config.getModuleBasePath() + "/pom.xml", ScopeType.TEST.toString())); scopes.add(ScopeType.TEST); } if (config.getIncludeProvidedDependencies()) { + dependencies.append(DependencyResolver.getDependencies(config.getModuleBasePath() + "/pom.xml", ScopeType.PROVIDED.toString())); scopes.add(ScopeType.PROVIDED); } + File resolverFile = createResolverPom(config, dependencies.toString()); + boolean failIfNoDependencies = false; List<MavenResolvedArtifact> moduleArtifacts; try { moduleArtifacts = Arrays.asList(resolver(config) - .loadPomFromFile(config.getModuleBasePath() + "/pom.xml") - .importDependencies(scopes.toArray(new ScopeType[]{})) + .loadPomFromFile(resolverFile) + .importDependencies(scopes.toArray(new ScopeType[0])) .resolve().withoutTransitivity().asResolvedArtifact()); - } catch(IllegalArgumentException e) { - if(failIfNoDependencies) { + } catch (IllegalArgumentException e) { + if (failIfNoDependencies) { throw e; } - debug("Error while getting dependencies for scopes: " + scopes + ". Message=" + e.getMessage()); + debug("Error while getting dependencies for test or optional scopes. Message=" + e.getMessage()); moduleArtifacts = new LinkedList<>(); } + List<MavenCoordinate> coordinates = new LinkedList<>(); + // fill coordinates for (MavenResolvedArtifact art : moduleArtifacts) { - MavenCoordinate c = art.getCoordinate(); - if (!validTestDependency(config, c)) { + MavenCoordinate coord = art.getCoordinate(); + +// Set<String> nonStarterModules = new HashSet<>(); +// nonStarterModules.add("camel-test"); +// +// // redirect reference from camel modules to camel starters in test scope +// if (art.getScope() == ScopeType.TEST && art.getCoordinate().getGroupId().equals("org.apache.camel") && art.getCoordinate().getArtifactId().startsWith("camel-") && !nonStarterModules +// .contains(art.getCoordinate().getArtifactId())) { +// coord = MavenCoordinates.createCoordinate(art.getCoordinate().getGroupId(), art.getCoordinate().getArtifactId() + "-starter", art.getCoordinate().getVersion(), art.getCoordinate +// ().getPackaging(), art.getCoordinate().getClassifier()); +// } + + if (!validTestDependency(config, coord)) { continue; } + coordinates.add(coord); + } + + for (MavenCoordinate c : coordinates) { + // Re-adding exclusions, as Arquillian resolver ignores them Set<String> pomExclusions = DependencyResolver.getExclusions(config.getModuleBasePath() + "/pom.xml", c.getGroupId(), c.getArtifactId()); MavenDependencyExclusion[] artExclusions; @@ -242,9 +268,8 @@ public final class ArquillianPackager { ark = ark.addPackages(true, "org.apache.camel.itest.springboot"); ark = addSpringbootPackage(ark, "org.apache.camel.itest.springboot"); - // CAMEL-10060 is resolved since 2.18 but probably the package scanner should be adapted to Spring-boot 1.4.0.RELEASE new packaging structure -// ark = addSpringbootPackage(ark, "org.apache.camel.converter.myconverter"); // to overcome CAMEL-10060 -// ark = addSpringbootPackage(ark, "org.apache.camel.osgi.test"); // to overcome CAMEL-10060 + // CAMEL-10060 is resolved since 2.18 but some unit tests use custom (non spring-boot enabled) camel contexts + ark = ark.addPackages(true, "org.apache.camel.converter.myconverter"); ark = ark.addPackages(true, "org.springframework.boot.loader"); @@ -288,7 +313,7 @@ public final class ArquillianPackager { Matcher m = propPattern.matcher(pom); while (m.find()) { String property = m.group(); - String resolved = DependencyResolver.resolveParentProperty(property); + String resolved = DependencyResolver.resolveSpringBootParentProperty(property); resolvedProperties.put(property, resolved); } @@ -306,6 +331,36 @@ public final class ArquillianPackager { return pomFile; } + private static File createResolverPom(ITestConfig config, String dependencies) throws Exception { + + String pom; + try (InputStream pomTemplate = ArquillianPackager.class.getResourceAsStream("/dependency-resolver-pom.xml")) { + pom = IOUtils.toString(pomTemplate); + } + + pom = pom.replace("<!-- DEPENDENCIES -->", dependencies); + + Map<String, String> resolvedProperties = new TreeMap<>(); + Pattern propPattern = Pattern.compile("(\\$\\{[^}]*\\})"); + Matcher m = propPattern.matcher(pom); + while (m.find()) { + String property = m.group(); + String resolved = DependencyResolver.resolveParentProperty(property); + resolvedProperties.put(property, resolved); + } + + for (String property : resolvedProperties.keySet()) { + pom = pom.replace(property, resolvedProperties.get(property)); + } + + File pomFile = new File(config.getModuleBasePath() + "/target/itest-spring-boot-dependency-resolver-pom.xml"); + try (FileWriter fw = new FileWriter(pomFile)) { + IOUtils.write(pom, fw); + } + + return pomFile; + } + private static ConfigurableMavenResolverSystem resolver(ITestConfig config) { return Maven.configureResolver().workOffline(config.getMavenOfflineResolution()); } @@ -347,6 +402,8 @@ public final class ArquillianPackager { Pattern[] patterns = new Pattern[]{ Pattern.compile("^log4j$"), + Pattern.compile("^log4j-slf4j-impl$"), + Pattern.compile("^log4j-core$"), Pattern.compile("^slf4j-log4j12$"), Pattern.compile("^slf4j-simple$"), Pattern.compile("^slf4j-jdk14$"), http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/DependencyResolver.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/DependencyResolver.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/DependencyResolver.java index a5bf635..fa2adef 100644 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/DependencyResolver.java +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/DependencyResolver.java @@ -16,11 +16,17 @@ */ package org.apache.camel.itest.springboot.util; +import java.io.StringWriter; import java.util.Collections; import java.util.HashSet; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpression; @@ -46,6 +52,33 @@ public final class DependencyResolver { } /** + * Retrieves a list of dependencies of the given scope + */ + public static String getDependencies(String pom, String scope) throws Exception { + String expression = "/project/dependencies/dependency[scope='" + scope + "']"; + + DocumentBuilder builder = factory.newDocumentBuilder(); + Document doc = builder.parse(pom); + XPath xpath = xPathfactory.newXPath(); + XPathExpression expr = xpath.compile(expression); + + StringBuilder res = new StringBuilder(); + NodeList nodes = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); + for(int i=0; i<nodes.getLength(); i++) { + Node node = nodes.item(i); + try(StringWriter writer = new StringWriter()) { + Transformer transformer = TransformerFactory.newInstance().newTransformer(); + transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); + transformer.transform(new DOMSource(node), new StreamResult(writer)); + String xml = writer.toString(); + res.append(xml + "\n"); + } + } + + return res.toString(); + } + + /** * Retrieves a list of transitive exclusions included in the pom, given the coordinate of a maven dependency. * Useful to overcome limitations of Arquillian maven resolver. * @@ -133,7 +166,20 @@ public final class DependencyResolver { return groupArtifact + ":" + version; } - public static String resolveParentProperty(String property) throws Exception { + public static String resolveParentProperty(String property) { + property = resolveSpringBootParentProperty(property); + if (property != null && !isResolved(property)) { + property = resolveCamelParentProperty(property); + } + + return property; + } + + public static String resolveSpringBootParentProperty(String property) { + return resolveProperty("../../parent-spring-boot/pom.xml", property, 0); + } + + public static String resolveCamelParentProperty(String property) { return resolveProperty("../../parent/pom.xml", property, 0); } @@ -146,34 +192,38 @@ public final class DependencyResolver { property = resolveProperty("../pom.xml", property, 0); } if (property != null && !isResolved(property)) { - property = resolveProperty("../../parent/pom.xml", property, 0); + property = resolveProperty("../../parent-spring-boot/pom.xml", property, 0); } return property; } - private static String resolveProperty(String pom, String property, int depth) throws Exception { - property = property.trim(); - if (!property.startsWith("${") || !property.endsWith("}")) { - throw new IllegalArgumentException("Wrong property reference: " + property); - } + private static String resolveProperty(String pom, String property, int depth) { + try { + property = property.trim(); + if (!property.startsWith("${") || !property.endsWith("}")) { + throw new IllegalArgumentException("Wrong property reference: " + property); + } - String res; - if (property.equals("${project.version}")) { - res = getParentVersion(pom); - } else { - String p = property.substring(2); - p = p.substring(0, p.length() - 1); - res = getPropertyFromPom(pom, p); - if (res == null) { - return property; + String res; + if (property.equals("${project.version}")) { + res = getParentVersion(pom); + } else { + String p = property.substring(2); + p = p.substring(0, p.length() - 1); + res = getPropertyFromPom(pom, p); + if (res == null) { + return property; + } } - } - if (res != null && !isResolved(res) && depth < 5) { - res = resolveProperty(pom, res, depth + 1); + if (res != null && !isResolved(res) && depth < 5) { + res = resolveProperty(pom, res, depth + 1); + } + return res; + } catch (Exception e) { + throw new RuntimeException(e); } - return res; } private static String getSurefirePropertyFromPom(String pom, String property) throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/JarExporter.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/JarExporter.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/JarExporter.java index 2defa9e..16bcc90 100644 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/JarExporter.java +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/JarExporter.java @@ -32,7 +32,7 @@ public class JarExporter { public void exportJar() throws Exception { Archive<?> archive = ArquillianPackager.springBootPackage(new ITestConfigBuilder() - .module("camel-ahc-ws") + .module("camel-hbase") .build()); new ZipExporterImpl(archive).exportTo(new File("target/export.zip"), true); http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LibraryVersionMismatchChecker.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LibraryVersionMismatchChecker.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LibraryVersionMismatchChecker.java index 7f97fd1..2827410 100644 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LibraryVersionMismatchChecker.java +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LibraryVersionMismatchChecker.java @@ -106,7 +106,7 @@ public class LibraryVersionMismatchChecker { Matcher m = propPattern.matcher(pom); while (m.find()) { String property = m.group(); - String resolved = DependencyResolver.resolveParentProperty(property); + String resolved = DependencyResolver.resolveSpringBootParentProperty(property); resolvedProperties.put(property, resolved); } http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/resources/application-pom.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/resources/application-pom.xml b/tests/camel-itest-spring-boot/src/test/resources/application-pom.xml index 9a61748..8fbb685 100644 --- a/tests/camel-itest-spring-boot/src/test/resources/application-pom.xml +++ b/tests/camel-itest-spring-boot/src/test/resources/application-pom.xml @@ -29,19 +29,11 @@ <dependencyManagement> <dependencies> - <dependency> - <!-- First the dependency management from Spring Boot --> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-dependencies</artifactId> - <version>${spring-boot-version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> <dependency> <!-- Then use camel dependency management --> <groupId>org.apache.camel</groupId> - <artifactId>camel-parent</artifactId> + <artifactId>camel-parent-spring-boot</artifactId> <version>${project.version}</version> <type>pom</type> <scope>import</scope> @@ -55,7 +47,6 @@ <dependency> <groupId>org.apache.camel</groupId> <artifactId>#{module}-starter</artifactId> - <version>${project.version}</version> </dependency> <!-- Required by the integration tests to run --> http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/resources/dependency-resolver-pom.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/resources/dependency-resolver-pom.xml b/tests/camel-itest-spring-boot/src/test/resources/dependency-resolver-pom.xml new file mode 100644 index 0000000..d8d94ab --- /dev/null +++ b/tests/camel-itest-spring-boot/src/test/resources/dependency-resolver-pom.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" 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"> + + <modelVersion>4.0.0</modelVersion> + + <groupId>com.company</groupId> + <artifactId>spring-boot-dependency-resolver</artifactId> + <version>1.0</version> + + <name>Spring-Boot Dependency Resolver</name> + <description>This POM is used to resolve test and optional dependencies required in integration tests</description> + + <dependencyManagement> + <dependencies> + + <dependency> + <!-- Then use camel dependency management --> + <groupId>org.apache.camel</groupId> + <artifactId>camel-parent-spring-boot</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <!-- Added as fallback for test and optional dependencies --> + <groupId>org.apache.camel</groupId> + <artifactId>camel-parent</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + </dependencies> + </dependencyManagement> + + <dependencies> + + <!-- DEPENDENCIES --> + + </dependencies> + +</project> http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/resources/log4j2-spring.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/resources/log4j2-spring.xml b/tests/camel-itest-spring-boot/src/test/resources/log4j2-spring.xml deleted file mode 100644 index fa9da00..0000000 --- a/tests/camel-itest-spring-boot/src/test/resources/log4j2-spring.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Configuration status="WARN"> - <Appenders> - <Console name="Console" target="SYSTEM_OUT"> - <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> - </Console> - <File name="File" append="false" fileName="target/camel-itest-spring-boot.log"> - <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> - </File> - </Appenders> - <Loggers> - <Root level="info"> - <AppenderRef ref="Console"/> - </Root> - </Loggers> -</Configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tests/camel-itest-spring-boot/src/test/resources/spring-logback.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/resources/spring-logback.xml b/tests/camel-itest-spring-boot/src/test/resources/spring-logback.xml new file mode 100644 index 0000000..41af398 --- /dev/null +++ b/tests/camel-itest-spring-boot/src/test/resources/spring-logback.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<configuration> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <layout class="ch.qos.logback.classic.PatternLayout"> + <Pattern> + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + </Pattern> + </layout> + </appender> + + <logger name="org.apache.camel.component" level="debug" + additivity="false"> + <appender-ref ref="STDOUT"/> + </logger> + + <root level="info"> + <appender-ref ref="STDOUT"/> + </root> + +</configuration> http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java ---------------------------------------------------------------------- diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java index c829b3f..e154bb9 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootStarterMojo.java @@ -77,8 +77,11 @@ import org.apache.maven.shared.dependency.tree.traversal.CollectingDependencyNod public class SpringBootStarterMojo extends AbstractMojo { - private static final String[] IGNORE_MODULES = {/* OSGi -> */ "camel-core-osgi", "camel-eventadmin", "camel-paxlogging", /* deprecated (and not working perfectly) -> */"camel-swagger", - "camel-mina", /* others (not managed) -> */ "camel-zipkin"}; + private static final String[] IGNORE_MODULES = { + /* OSGi -> */ "camel-blueprint", "camel-core-osgi", "camel-eventadmin", "camel-paxlogging", + /* Java EE -> */ "camel-cdi", "camel-ejb", + /* deprecated (and not working perfectly) -> */ "camel-swagger", "camel-mina", + /* others (not managed) -> */ "camel-zipkin"}; private static final boolean IGNORE_TEST_MODULES = true; @@ -269,6 +272,7 @@ public class SpringBootStarterMojo extends AbstractMojo { loggingImpl.add("ch.qos.logback:logback-classic"); loggingImpl.add("org.apache.logging.log4j:log4j"); + loggingImpl.add("org.apache.logging.log4j:log4j-core"); loggingImpl.add("org.apache.logging.log4j:log4j-slf4j-impl"); loggingImpl.add("org.slf4j:slf4j-jcl"); http://git-wip-us.apache.org/repos/asf/camel/blob/5ca0fda0/tooling/maven/camel-package-maven-plugin/src/main/resources/spring-boot-fix-dependencies.properties ---------------------------------------------------------------------- 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 5d742f9..6eaa9b2 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 @@ -22,26 +22,30 @@ # 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 - # Caffeine in in camel-core but it is not being exported transitively # Adding the dependency here until we understand why # Cassandra (and others) fail without this dependency camel-core=com.github.ben-manes.caffeine:caffeine -camel-guava-eventbus=com.google.guava:guava -camel-jetty9=org.hibernate:hibernate-validator:${hibernate-validator-version} -camel-jms=org.apache.geronimo.specs:geronimo-jms_1.1_spec -camel-jpa=org.apache.geronimo.specs:geronimo-jpa_2.0_spec -camel-kubernetes=org.hibernate:hibernate-validator:${hibernate-validator-version} -camel-netty4=org.hibernate:hibernate-validator:${hibernate-validator-version} -camel-netty4-http=org.hibernate:hibernate-validator:${hibernate-validator-version} -camel-sjms=org.apache.geronimo.specs:geronimo-jms_1.1_spec -camel-spark-rest=org.hibernate:hibernate-validator:${hibernate-validator-version} +camel-github=org.eclipse.mylyn.github:org.eclipse.egit.github.core:${egit-github-core-version} +camel-guava-eventbus=com.google.guava:guava:${google-guava-version} +camel-jetty9=org.hibernate:hibernate-validator +camel-jms=org.apache.geronimo.specs:geronimo-jms_1.1_spec:${geronimo-jms-spec-version} +camel-jpa=org.apache.geronimo.specs:geronimo-jpa_2.0_spec:${geronimo-jpa2-spec-version} +camel-kubernetes=org.hibernate:hibernate-validator +camel-netty4=org.hibernate:hibernate-validator +camel-netty4-http=org.hibernate:hibernate-validator +camel-sjms=org.apache.geronimo.specs:geronimo-jms_1.1_spec:${geronimo-jms-spec-version} +camel-spark-rest=org.hibernate:hibernate-validator camel-spring-boot=org.apache.camel:camel-core-starter camel-spring-ws=org.springframework.boot:spring-boot-starter-web:${spring-boot-version} -camel-restlet=org.hibernate:hibernate-validator:${hibernate-validator-version} -camel-swagger-java=org.hibernate:hibernate-validator:${hibernate-validator-version} -camel-undertow=org.hibernate:hibernate-validator:${hibernate-validator-version} +camel-restlet=org.hibernate:hibernate-validator +camel-swagger-java=org.hibernate:hibernate-validator +camel-undertow=org.hibernate:hibernate-validator + # Needs JPA 2.1 -exclude_camel-bam=org.apache.geronimo.specs:geronimo-jpa_2.0_spec \ No newline at end of file +exclude_camel-bam=org.apache.geronimo.specs:geronimo-jpa_2.0_spec + +# Existed for Netty 3 +exclude_camel-hbase=io.netty:netty
