Work on a new camel-itest-osgi that uses camel-test-karaf for testing.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/857f4b96 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/857f4b96 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/857f4b96 Branch: refs/heads/master Commit: 857f4b96a4530e25962592806b8da4bd56acd212 Parents: 5ccb5ce Author: Claus Ibsen <davscl...@apache.org> Authored: Mon Apr 18 13:08:37 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Mon Apr 18 13:39:42 2016 +0200 ---------------------------------------------------------------------- components/camel-test-karaf/pom.xml | 13 +--- .../camel/test/karaf/AbstractFeatureTest.java | 34 +++++---- .../camel/test/karaf/CamelKarafTestSupport.java | 74 ++++---------------- parent/pom.xml | 2 + .../features/src/main/resources/features.xml | 6 ++ tests/camel-itest-osgi/kill-karaf.sh | 21 ++++++ tests/camel-itest-osgi/pom.xml | 21 +++++- .../org/apache/camel/itest/CamelCoreTest.java | 50 +++++++++++++ .../src/test/resources/log4j.properties | 48 +------------ .../org/apache/camel/itest/CamelCoreTest.xml | 35 +++++++++ 10 files changed, 172 insertions(+), 132 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/components/camel-test-karaf/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-test-karaf/pom.xml b/components/camel-test-karaf/pom.xml index aba4c2b..e86660d 100644 --- a/components/camel-test-karaf/pom.xml +++ b/components/camel-test-karaf/pom.xml @@ -58,7 +58,6 @@ <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> <version>1</version> - <scope>provided</scope> </dependency> <dependency> @@ -101,21 +100,11 @@ <type>pom</type> </dependency> - <!-- test and logging --> + <!-- test --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <scope>test</scope> - </dependency> </dependencies> <build> http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java ---------------------------------------------------------------------- diff --git a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java index 86dd2d0..e510dc5 100644 --- a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java +++ b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java @@ -26,6 +26,7 @@ import java.util.Collection; import java.util.Dictionary; import java.util.EnumSet; import java.util.Enumeration; +import java.util.List; import java.util.Properties; import javax.inject.Inject; @@ -62,6 +63,7 @@ import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.vmOption; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; @@ -215,8 +217,18 @@ public abstract class AbstractFeatureTest { return karafVersion; } - @Configuration - public static Option[] configure() { + public static Option[] configure(String... extra) { + + List<String> camel = new ArrayList<>(); + camel.add("camel"); + camel.add("camel-test-karaf"); + if (extra != null && extra.length > 0) { + for (String e : extra) { + camel.add(e); + } + } + final String[] camelFeatures = camel.toArray(new String[camel.size()]); + switchPlatformEncodingToUTF8(); String karafVersion = getKarafVersion(); LOG.info("*** Apache Karaf version is " + karafVersion + " ***"); @@ -226,15 +238,12 @@ public abstract class AbstractFeatureTest { //org.ops4j.pax.exam.CoreOptions.vmOption("-Xdebug"), //org.ops4j.pax.exam.CoreOptions.vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5008"), - // we need INFO logging otherwise we cannot see what happens - new LogLevelOption(LogLevelOption.LogLevel.INFO), - KarafDistributionOption.karafDistributionConfiguration() .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject()) .karafVersion(karafVersion) .name("Apache Karaf") .useDeployFolder(false).unpackDirectory(new File("target/paxexam/unpack/")), - logLevel(LogLevelOption.LogLevel.WARN), + logLevel(LogLevelOption.LogLevel.INFO), // keep the folder so we can look inside when something fails keepRuntimeFolder(), @@ -243,7 +252,7 @@ public abstract class AbstractFeatureTest { configureConsole().ignoreRemoteShell(), // need to modify the jre.properties to export some com.sun packages that some features rely on - KarafDistributionOption.replaceConfigurationFile("etc/jre.properties", new File("src/test/resources/jre.properties")), +// KarafDistributionOption.replaceConfigurationFile("etc/jre.properties", new File("src/test/resources/jre.properties")), vmOption("-Dfile.encoding=UTF-8"), @@ -251,16 +260,15 @@ public abstract class AbstractFeatureTest { editConfigurationFilePut("etc/custom.properties", "karaf.shutdown.port", "-1"), // Assign unique ports for Karaf - editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", Integer.toString(AvailablePortFinder.getNextAvailable())), - editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", Integer.toString(AvailablePortFinder.getNextAvailable())), - editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", Integer.toString(AvailablePortFinder.getNextAvailable())), +// editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", Integer.toString(AvailablePortFinder.getNextAvailable())), +// editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", Integer.toString(AvailablePortFinder.getNextAvailable())), +// editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", Integer.toString(AvailablePortFinder.getNextAvailable())), - // install junit + // install junit CoreOptions.junitBundles(), // install camel - KarafDistributionOption.features(getCamelKarafFeatureUrl(), "camel"), - mavenBundle().groupId("org.apache.camel").artifactId("camel-test-karaf").versionAsInProject() + features(getCamelKarafFeatureUrl(), camelFeatures), }; return options; http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/CamelKarafTestSupport.java ---------------------------------------------------------------------- diff --git a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/CamelKarafTestSupport.java b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/CamelKarafTestSupport.java index c1fc0bb..ad1ccb5 100644 --- a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/CamelKarafTestSupport.java +++ b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/CamelKarafTestSupport.java @@ -41,22 +41,18 @@ import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import javax.security.auth.Subject; -import org.apache.camel.test.AvailablePortFinder; import org.apache.camel.test.junit4.CamelTestSupport; import org.apache.felix.service.command.CommandProcessor; import org.apache.felix.service.command.CommandSession; import org.apache.karaf.features.Feature; import org.apache.karaf.features.FeaturesService; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.CoreOptions; -import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.ProbeBuilder; import org.ops4j.pax.exam.TestProbeBuilder; -import org.ops4j.pax.exam.karaf.options.KarafDistributionOption; -import org.ops4j.pax.exam.karaf.options.LogLevelOption; -import org.ops4j.pax.exam.options.UrlReference; +import org.ops4j.pax.tinybundles.core.TinyBundle; +import org.ops4j.pax.tinybundles.core.TinyBundles; import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; import org.osgi.framework.Constants; import org.osgi.framework.Filter; import org.osgi.framework.FrameworkUtil; @@ -64,17 +60,6 @@ import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; import org.osgi.util.tracker.ServiceTracker; -import static org.junit.Assert.fail; -import static org.ops4j.pax.exam.CoreOptions.junitBundles; -import static org.ops4j.pax.exam.CoreOptions.maven; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile; - public class CamelKarafTestSupport extends CamelTestSupport { static final Long COMMAND_TIMEOUT = 30000L; @@ -94,6 +79,16 @@ public class CamelKarafTestSupport extends CamelTestSupport { return probe; } + public void installBlueprintAsBundle(String name, URL url) throws BundleException { + TinyBundle bundle = TinyBundles.bundle(); + bundle.add("OSGI-INF/blueprint/blueprint-" + name, url); + bundle.set("Manifest-Version", "2") + .set("Bundle-ManifestVersion", "2") + .set("Bundle-SymbolicName", name) + .set("Bundle-Version", "1.0.0"); + bundleContext.installBundle(name, bundle.build()); + } + public File getConfigFile(String path) { URL res = this.getClass().getResource(path); if (res == null) { @@ -102,49 +97,10 @@ public class CamelKarafTestSupport extends CamelTestSupport { return new File(res.getFile()); } - @Configuration - public Option[] config() { - return new Option[]{ - karafDistributionConfiguration() - .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").versionAsInProject().type("tar.gz")) - .karafVersion(MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf")) - .name("Apache Karaf") - .unpackDirectory(new File("target/karaf")), - - // keep the folder so we can look inside when something fails - keepRuntimeFolder(), - - // Disable the SSH port - configureConsole().ignoreRemoteShell(), - - // Configure Logging - logLevel(LogLevelOption.LogLevel.WARN), - replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg", getConfigFile("/etc/org.ops4j.pax.logging.cfg")), - - // Assign unique ports - editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", Integer.toString(AvailablePortFinder.getNextAvailable())), - editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", Integer.toString(AvailablePortFinder.getNextAvailable())), - editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", Integer.toString(AvailablePortFinder.getNextAvailable())), - - // Install JUnit - junitBundles(), - - // Install base camel features - KarafDistributionOption.features(getCamelKarafFeatureUrl(), "camel", "camel-test"), - - // Install the support bundle - mavenBundle().groupId("org.apache.camel").artifactId("camel-test-karaf").versionAsInProject() - }; - } - - public static UrlReference getCamelKarafFeatureUrl() { - return mavenBundle(). - groupId("org.apache.camel.karaf"). - artifactId("apache-camel"). - versionAsInProject().type("xml/features"); + public static Option[] configure(String... extra) { + return AbstractFeatureTest.configure(extra); } - /** * Executes a shell command and returns output as a String. * Commands have a default timeout of 10 seconds. http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index bc1fc0b..543d1c1 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -72,6 +72,7 @@ <bcel-bundle-version>5.2_4</bcel-bundle-version> <beanio-version>2.1.0</beanio-version> <beanstalkd-client-version>1.4.6</beanstalkd-client-version> + <bndlib-version>3.1.0</bndlib-version> <bsh-version>2.0b5</bsh-version> <boon-version>0.33</boon-version> <bouncycastle-version>1.54</bouncycastle-version> @@ -556,6 +557,7 @@ <tagsoup-bundle-version>1.2.1_1</tagsoup-bundle-version> <tagsoup-version>1.2.1</tagsoup-version> <testng-version>6.8.21</testng-version> + <tinybundles-version>2.1.1</tinybundles-version> <twitter4j-bundle-version>4.0.4_1</twitter4j-bundle-version> <twitter4j-version>4.0.4</twitter4j-version> <undertow-version>1.3.21.Final</undertow-version> http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/platforms/karaf/features/src/main/resources/features.xml ---------------------------------------------------------------------- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index f25c311..9d0b6ed 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -1695,6 +1695,12 @@ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.junit/${junit-bundle-version}</bundle> <bundle>mvn:org.apache.camel/camel-test/${project.version}</bundle> </feature> + <feature name='camel-test-karaf' version='${project.version}' resolver='(obr)' start-level='50'> + <feature version='${project.version}'>camel-test</feature> + <bundle>mvn:biz.aQute.bnd/biz.aQute.bndlib/${bndlib-version}</bundle> + <bundle>mvn:org.ops4j.pax.tinybundles/tinybundles/${tinybundles-version}</bundle> + <bundle>mvn:org.apache.camel/camel-test-karaf/${project.version}</bundle> + </feature> <feature name='camel-test-spring' version='${project.version}' resolver='(obr)' start-level='50'> <feature version='${project.version}'>camel-spring</feature> <feature version='${spring-version-range}'>spring-test</feature> http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/tests/camel-itest-osgi/kill-karaf.sh ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/kill-karaf.sh b/tests/camel-itest-osgi/kill-karaf.sh new file mode 100755 index 0000000..cec2b33 --- /dev/null +++ b/tests/camel-itest-osgi/kill-karaf.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +## --------------------------------------------------------------------------- +## 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. +## --------------------------------------------------------------------------- + +echo "Killing all karaf processes" +jps -l | grep karaf | cut -d ' ' -f 1 | xargs -n1 kill -kill \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/tests/camel-itest-osgi/pom.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/pom.xml b/tests/camel-itest-osgi/pom.xml index 58499cf..2a99d89 100644 --- a/tests/camel-itest-osgi/pom.xml +++ b/tests/camel-itest-osgi/pom.xml @@ -30,7 +30,6 @@ <name>Camel :: Integration Tests :: OSGi</name> <description>Performs OSGi compliance integration tests</description> - <!-- let's list the dependencies in a sorted order --> <dependencies> <dependency> @@ -41,4 +40,24 @@ </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <!-- version 2.19.1 causes pax-exam to fail when testing the 2nd/3rd container when testing all --> + <!-- so we use an older version of surefire which works --> + <version>2.16</version> + <configuration> + <!-- do not re-run these tests --> + <!-- not supported by older version of surefire --> + <!--<rerunFailingTestsCount>0</rerunFailingTestsCount>--> + <systemPropertyVariables> + <karafVersion>${karaf4-version}</karafVersion> + </systemPropertyVariables> + </configuration> + </plugin> + </plugins> + </build> + + </project> http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelCoreTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelCoreTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelCoreTest.java new file mode 100644 index 0000000..45e508f --- /dev/null +++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelCoreTest.java @@ -0,0 +1,50 @@ +/** + * 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 + * <p> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p> + * 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; + +import java.net.URL; + +import org.apache.camel.CamelContext; +import org.apache.camel.test.karaf.CamelKarafTestSupport; +import org.apache.camel.util.ObjectHelper; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +@RunWith(PaxExam.class) +public class CamelCoreTest extends CamelKarafTestSupport { + + @Test + public void testCamelCore() throws Exception { + URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelCoreTest.xml", CamelCoreTest.class.getClassLoader()); + System.out.println(">>>> " + url); + installBlueprintAsBundle("CamelCoreTest", url); + + // wait for Camel to be ready +// CamelContext camel = getOsgiService(CamelContext.class); + +// System.out.println(">>> " + camel); + } + + @Configuration + public Option[] configure() { + return CamelKarafTestSupport.configure(); + } + +} http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/tests/camel-itest-osgi/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/resources/log4j.properties b/tests/camel-itest-osgi/src/test/resources/log4j.properties index 2b05265..b123836 100644 --- a/tests/camel-itest-osgi/src/test/resources/log4j.properties +++ b/tests/camel-itest-osgi/src/test/resources/log4j.properties @@ -1,55 +1,9 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- - -# -# The logging properties used during tests.. -# log4j.rootLogger=INFO, out -# Use the following line to turn on debug output for camel #log4j.logger.org.apache.camel=DEBUG -log4j.logger.org.apache.activemq.spring=WARN - -#log4j.logger.org.ops4j.pax=DEBUG -# is very noisy at INFO level -log4j.logger.org.ops4j.io=WARN - -# sift test -log4j.logger.org.apache.camel.SIFT=DEBUG, sift - # CONSOLE appender not used by default -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n - -# File appender -log4j.appender.out=org.apache.log4j.FileAppender +log4j.appender.out=org.apache.log4j.ConsoleAppender log4j.appender.out.layout=org.apache.log4j.PatternLayout log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n -log4j.appender.out.file=target/camel-itest-osgi-test.log -log4j.appender.out.append=true -# Sift appender -log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender -log4j.appender.sift.key=bundle.name -log4j.appender.sift.default=karaf -log4j.appender.sift.appender=org.apache.log4j.FileAppender -log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout -log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | id=%X{camel.exchangeId} | %X{bundle.name} | %-5.5p | %-32.32C %4L | %m%n -log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log -log4j.appender.sift.appender.append=true http://git-wip-us.apache.org/repos/asf/camel/blob/857f4b96/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelCoreTest.xml ---------------------------------------------------------------------- diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelCoreTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelCoreTest.xml new file mode 100644 index 0000000..fbff918 --- /dev/null +++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelCoreTest.xml @@ -0,0 +1,35 @@ +<?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. +--> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"> + + <camelContext xmlns="http://camel.apache.org/schema/blueprint"> + + <route> + <from uri="direct:start"/> + <transform> + <simple>Hello ${body}</simple> + </transform> + <to uri="mock:result"/> + </route> + + </camelContext> + +</blueprint>