You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/24 16:33:04 UTC
[camel-karaf] 01/02: CAMEL-14776: Move Main out of
camel-test-blueprint to camel-blueprint-main
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-karaf.git
commit e340a63c3916571f837ecf950816dd8a1e15b7ee
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Mar 24 17:02:45 2020 +0100
CAMEL-14776: Move Main out of camel-test-blueprint to camel-blueprint-main
---
components/camel-blueprint-main/pom.xml | 133 +++++++++++++++++++++
.../services/org/apache/camel/other.properties | 7 ++
.../src/generated/resources/blueprint-main.json | 14 +++
.../src/main/docs/blueprint-main.adoc | 7 ++
.../java/org/apache/camel}/blueprint/Main.java | 3 +-
.../org/apache/camel}/blueprint/MainNoPidTest.java | 4 +-
.../apache/camel}/blueprint/MainNoReloadTest.java | 4 +-
.../java/org/apache/camel}/blueprint/MainTest.java | 4 +-
.../org/apache/camel/blueprint/MyCoolBean.java | 52 ++++++++
.../org/apache/camel}/blueprint/MyMainAppTest.java | 4 +-
.../src/test/resources/etc/otherstuff.cfg | 20 ++++
.../src/test/resources/etc/stuff.cfg | 20 ++++
.../src/test/resources/log4j2.properties | 28 +++++
.../org/apache/camel}/blueprint/main-loadfile.xml | 2 +-
.../camel}/blueprint/main-no-pid-loadfile.xml | 2 +-
.../camel}/blueprint/main-no-reload-loadfile.xml | 2 +-
.../camel/blueprint/xpath/XPathHeaderNameTest.xml} | 39 +++---
.../xpathFilterRouteContextWithNamespaceTest.xml} | 28 ++---
.../xpath/xpathFilterWithNamespaceTest.xml} | 22 ++--
components/pom.xml | 1 +
20 files changed, 336 insertions(+), 60 deletions(-)
diff --git a/components/camel-blueprint-main/pom.xml b/components/camel-blueprint-main/pom.xml
new file mode 100644
index 0000000..9bf6849
--- /dev/null
+++ b/components/camel-blueprint-main/pom.xml
@@ -0,0 +1,133 @@
+<?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>
+
+ <parent>
+ <groupId>org.apache.camel.karaf</groupId>
+ <artifactId>components</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-blueprint-main</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Camel Karaf :: Blueprint Main</name>
+ <description>Main support for OSGi Blueprint</description>
+
+ <properties>
+ <firstVersion>3.2.0</firstVersion>
+ <label>java,osgi</label>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-main</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.camel.karaf</groupId>
+ <artifactId>camel-test-blueprint</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.camel.karaf</groupId>
+ <artifactId>camel-blueprint</artifactId>
+ <!-- exclude aries blueprint as we add these dependencies explicit -->
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint.core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- the ordering of the dependencies can matter as we load the dependencies from the classpath
+ with felix-connect, and you may get a weird error if wrong order -->
+ <dependency>
+ <groupId>org.apache.aries.proxy</groupId>
+ <artifactId>org.apache.aries.proxy</artifactId>
+ <version>${aries-blueprint-proxy-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint.cm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries</groupId>
+ <artifactId>org.apache.aries.util</artifactId>
+ <version>${aries-util-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.connect</artifactId>
+ <version>${felix-connect-version}</version>
+ <exclusions>
+ <!-- felix-connect includes osgi.core and osgi.compendium version 5.0.0 -->
+ <exclusion>
+ <groupId>org.osgi</groupId>
+ <artifactId>osgi.core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.osgi</groupId>
+ <artifactId>osgi.cmpn</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-xpath</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/components/camel-blueprint-main/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/components/camel-blueprint-main/src/generated/resources/META-INF/services/org/apache/camel/other.properties
new file mode 100644
index 0000000..d0fcaf1
--- /dev/null
+++ b/components/camel-blueprint-main/src/generated/resources/META-INF/services/org/apache/camel/other.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+name=blueprint-main
+groupId=org.apache.camel.karaf
+artifactId=camel-blueprint-main
+version=3.2.0-SNAPSHOT
+projectName=Camel Karaf :: Blueprint Main
+projectDescription=Main support for OSGi Blueprint
diff --git a/components/camel-blueprint-main/src/generated/resources/blueprint-main.json b/components/camel-blueprint-main/src/generated/resources/blueprint-main.json
new file mode 100644
index 0000000..0bfb60b
--- /dev/null
+++ b/components/camel-blueprint-main/src/generated/resources/blueprint-main.json
@@ -0,0 +1,14 @@
+{
+ "other": {
+ "kind": "other",
+ "name": "blueprint-main",
+ "title": "Blueprint Main",
+ "description": "Main support for OSGi Blueprint",
+ "deprecated": false,
+ "firstVersion": "3.2.0",
+ "label": "java,osgi",
+ "groupId": "org.apache.camel.karaf",
+ "artifactId": "camel-blueprint-main",
+ "version": "3.2.0-SNAPSHOT"
+ }
+}
diff --git a/components/camel-blueprint-main/src/main/docs/blueprint-main.adoc b/components/camel-blueprint-main/src/main/docs/blueprint-main.adoc
new file mode 100644
index 0000000..3e6ee9a
--- /dev/null
+++ b/components/camel-blueprint-main/src/main/docs/blueprint-main.adoc
@@ -0,0 +1,7 @@
+[[BlueprintMain-BlueprintMain]]
+= Blueprint Main
+
+This module is used for running OSGi Blueprint standalone via a main class extended from `camel-main`.
+
+Note this is only recommended for development purposes, as the standalone mode is using a limited simulation
+of an OSGi container using Apache Felix Connector. Some OSGi features are not supported in this mode.
diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/Main.java b/components/camel-blueprint-main/src/main/java/org/apache/camel/blueprint/Main.java
similarity index 98%
rename from components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/Main.java
rename to components/camel-blueprint-main/src/main/java/org/apache/camel/blueprint/Main.java
index db5efa5..4ae86e3 100644
--- a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/Main.java
+++ b/components/camel-blueprint-main/src/main/java/org/apache/camel/blueprint/Main.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.test.blueprint;
+package org.apache.camel.blueprint;
import java.util.LinkedList;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
+import org.apache.camel.test.blueprint.CamelBlueprintHelper;
import org.apache.camel.main.MainCommandLineSupport;
import org.osgi.framework.BundleContext;
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoPidTest.java b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainNoPidTest.java
similarity index 92%
rename from components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoPidTest.java
rename to components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainNoPidTest.java
index a27cc22..d8405bf 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoPidTest.java
+++ b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainNoPidTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.test.blueprint;
+package org.apache.camel.blueprint;
import org.apache.camel.ProducerTemplate;
import org.junit.Test;
@@ -31,7 +31,7 @@ public class MainNoPidTest {
// as we run this test without packing ourselves as bundle, then include ourselves
main.setIncludeSelfAsBundle(true);
// setup the blueprint file here
- main.setDescriptors("org/apache/camel/test/blueprint/main-no-pid-loadfile.xml");
+ main.setDescriptors("org/apache/camel/blueprint/main-no-pid-loadfile.xml");
main.start();
ProducerTemplate template = main.getCamelTemplate();
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoReloadTest.java b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainNoReloadTest.java
similarity index 93%
rename from components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoReloadTest.java
rename to components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainNoReloadTest.java
index 3a37388..f8bb075 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoReloadTest.java
+++ b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainNoReloadTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.test.blueprint;
+package org.apache.camel.blueprint;
import org.apache.camel.ProducerTemplate;
import org.junit.Test;
@@ -31,7 +31,7 @@ public class MainNoReloadTest {
// as we run this test without packing ourselves as bundle, then include ourselves
main.setIncludeSelfAsBundle(true);
// setup the blueprint file here
- main.setDescriptors("org/apache/camel/test/blueprint/main-no-reload-loadfile.xml");
+ main.setDescriptors("org/apache/camel/blueprint/main-no-reload-loadfile.xml");
// set the configAdmin persistent id
main.setConfigAdminPid("stuff");
// set the configAdmin persistent file name
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainTest.java b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainTest.java
similarity index 97%
rename from components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainTest.java
rename to components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainTest.java
index dd0dd24..60d4a53 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainTest.java
+++ b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MainTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.test.blueprint;
+package org.apache.camel.blueprint;
import java.io.File;
import java.io.FileOutputStream;
@@ -41,7 +41,7 @@ public class MainTest {
// as we run this test without packing ourselves as bundle, then include ourselves
main.setIncludeSelfAsBundle(true);
// setup the blueprint file here
- main.setDescriptors("org/apache/camel/test/blueprint/main-loadfile.xml");
+ main.setDescriptors("org/apache/camel/blueprint/main-loadfile.xml");
// set the configAdmin persistent id
main.setConfigAdminPid("stuff");
// set the configAdmin persistent file name
diff --git a/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MyCoolBean.java b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MyCoolBean.java
new file mode 100644
index 0000000..ced7ffa
--- /dev/null
+++ b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MyCoolBean.java
@@ -0,0 +1,52 @@
+/*
+ * 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.blueprint;
+
+/**
+ *
+ */
+public class MyCoolBean {
+
+ private String say;
+ private String echo;
+
+ public String getSay() {
+ return say;
+ }
+
+ public void setSay(String say) {
+ this.say = say;
+ }
+
+ public String getEcho() {
+ return echo;
+ }
+
+ public void setEcho(String echo) {
+ this.echo = echo;
+ }
+
+ public String saySomething(String s) {
+ return say + " " + s;
+ }
+
+ public String echoSomething(String s) {
+ return echo + " " + s + echo + " " + s;
+ }
+
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyMainAppTest.java b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MyMainAppTest.java
similarity index 93%
rename from components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyMainAppTest.java
rename to components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MyMainAppTest.java
index b4a8696..dcb3ba3 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyMainAppTest.java
+++ b/components/camel-blueprint-main/src/test/java/org/apache/camel/blueprint/MyMainAppTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.test.blueprint;
+package org.apache.camel.blueprint;
import org.apache.camel.CamelContext;
import org.junit.Test;
@@ -42,7 +42,7 @@ public class MyMainAppTest {
// as we run this test without packing ourselves as bundle, then include ourselves
main.setIncludeSelfAsBundle(true);
// we support *.xml to find any blueprint xml files
- main.setDescriptors("org/apache/camel/test/blueprint/xpath/*.xml");
+ main.setDescriptors("org/apache/camel/blueprint/xpath/*.xml");
// run for 1 second and then stop automatic
main.setDuration(1);
diff --git a/components/camel-blueprint-main/src/test/resources/etc/otherstuff.cfg b/components/camel-blueprint-main/src/test/resources/etc/otherstuff.cfg
new file mode 100644
index 0000000..cb1d44f
--- /dev/null
+++ b/components/camel-blueprint-main/src/test/resources/etc/otherstuff.cfg
@@ -0,0 +1,20 @@
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
+
+salutation=Adieu
+resonner=tiens!
+arrive=mock:otherResult
diff --git a/components/camel-blueprint-main/src/test/resources/etc/stuff.cfg b/components/camel-blueprint-main/src/test/resources/etc/stuff.cfg
new file mode 100644
index 0000000..a8666aa
--- /dev/null
+++ b/components/camel-blueprint-main/src/test/resources/etc/stuff.cfg
@@ -0,0 +1,20 @@
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
+
+greeting=Bye
+echo=Yay
+destination=mock:result
\ No newline at end of file
diff --git a/components/camel-blueprint-main/src/test/resources/log4j2.properties b/components/camel-blueprint-main/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..1f2795f
--- /dev/null
+++ b/components/camel-blueprint-main/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-test-blueprint.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-loadfile.xml
similarity index 96%
rename from components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml
rename to components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-loadfile.xml
index dbbd4f0..ff10443 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml
+++ b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-loadfile.xml
@@ -28,7 +28,7 @@
<cm:property-placeholder persistent-id="stuff" update-strategy="reload"/>
<!-- a bean that uses a blueprint property placeholder -->
- <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
+ <bean id="myCoolBean" class="org.apache.camel.blueprint.MyCoolBean">
<property name="say" value="${greeting}"/>
</bean>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-pid-loadfile.xml b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-no-pid-loadfile.xml
similarity index 96%
rename from components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-pid-loadfile.xml
rename to components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-no-pid-loadfile.xml
index 2e97c0d..ceb1177 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-pid-loadfile.xml
+++ b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-no-pid-loadfile.xml
@@ -33,7 +33,7 @@
</cm:property-placeholder>
<!-- a bean that uses a blueprint property placeholder -->
- <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
+ <bean id="myCoolBean" class="org.apache.camel.blueprint.MyCoolBean">
<property name="say" value="${greeting}"/>
</bean>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-no-reload-loadfile.xml
similarity index 96%
copy from components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
copy to components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-no-reload-loadfile.xml
index 742ea79..73d0036 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
+++ b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/main-no-reload-loadfile.xml
@@ -28,7 +28,7 @@
<cm:property-placeholder persistent-id="stuff" update-strategy="none"/>
<!-- a bean that uses a blueprint property placeholder -->
- <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
+ <bean id="myCoolBean" class="org.apache.camel.blueprint.MyCoolBean">
<property name="say" value="${greeting}"/>
</bean>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/XPathHeaderNameTest.xml
similarity index 59%
copy from components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
copy to components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/XPathHeaderNameTest.xml
index 742ea79..b3fd20a 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
+++ b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/XPathHeaderNameTest.xml
@@ -18,27 +18,32 @@
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:foo="http://example.com/person"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
- http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
- <!-- blueprint property placeholders which we can configure from outside -->
- <cm:property-placeholder persistent-id="stuff" update-strategy="none"/>
-
- <!-- a bean that uses a blueprint property placeholder -->
- <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
- <property name="say" value="${greeting}"/>
- </bean>
-
- <camelContext xmlns="http://camel.apache.org/schema/blueprint">
- <route>
- <from uri="direct:start"/>
- <bean ref="myCoolBean" method="saySomething"/>
- <to uri="{{destination}}"/>
+ <!-- START SNIPPET: e1 -->
+ <camelContext id="xpathHeaderNameTest" xmlns="http://camel.apache.org/schema/blueprint">
+ <route>
+ <from uri="direct:in"/>
+ <choice>
+ <when>
+ <!-- use headerName attribute to refer to a header -->
+ <xpath headerName="invoiceDetails">/invoice/@orderType = 'premium'</xpath>
+ <to uri="mock:premium"/>
+ </when>
+ <when>
+ <!-- use headerName attribute to refer to a header -->
+ <xpath headerName="invoiceDetails">/invoice/@orderType = 'standard'</xpath>
+ <to uri="mock:standard"/>
+ </when>
+ <otherwise>
+ <to uri="mock:unknown"/>
+ </otherwise>
+ </choice>
</route>
-
</camelContext>
+ <!-- END SNIPPET: e1 -->
-</blueprint>
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/xpathFilterRouteContextWithNamespaceTest.xml
similarity index 64%
copy from components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
copy to components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/xpathFilterRouteContextWithNamespaceTest.xml
index 742ea79..19395a9 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
+++ b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/xpathFilterRouteContextWithNamespaceTest.xml
@@ -18,27 +18,23 @@
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:foo="http://example.com/person"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
- http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
- <!-- blueprint property placeholders which we can configure from outside -->
- <cm:property-placeholder persistent-id="stuff" update-strategy="none"/>
-
- <!-- a bean that uses a blueprint property placeholder -->
- <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
- <property name="say" value="${greeting}"/>
- </bean>
-
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
- <route>
+ <routeContextRef ref="myRoutes"/>
+ </camelContext>
+
+ <routeContext id="myRoutes" xmlns="http://camel.apache.org/schema/blueprint">
+ <route>
<from uri="direct:start"/>
- <bean ref="myCoolBean" method="saySomething"/>
- <to uri="{{destination}}"/>
+ <filter>
+ <xpath logNamespaces="true">/foo:person[@name='James']</xpath>
+ <to uri="mock:result"/>
+ </filter>
</route>
+ </routeContext>
- </camelContext>
-
-</blueprint>
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/xpathFilterWithNamespaceTest.xml
similarity index 64%
rename from components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
rename to components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/xpathFilterWithNamespaceTest.xml
index 742ea79..aa0ba79 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-no-reload-loadfile.xml
+++ b/components/camel-blueprint-main/src/test/resources/org/apache/camel/blueprint/xpath/xpathFilterWithNamespaceTest.xml
@@ -18,27 +18,19 @@
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:foo="http://example.com/person"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
- http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
- <!-- blueprint property placeholders which we can configure from outside -->
- <cm:property-placeholder persistent-id="stuff" update-strategy="none"/>
-
- <!-- a bean that uses a blueprint property placeholder -->
- <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
- <property name="say" value="${greeting}"/>
- </bean>
-
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
- <route>
+ <route>
<from uri="direct:start"/>
- <bean ref="myCoolBean" method="saySomething"/>
- <to uri="{{destination}}"/>
+ <filter>
+ <xpath logNamespaces="true">/foo:person[@name='James']</xpath>
+ <to uri="mock:result"/>
+ </filter>
</route>
-
</camelContext>
-</blueprint>
+</blueprint>
\ No newline at end of file
diff --git a/components/pom.xml b/components/pom.xml
index 901ad02..b809dbb 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -34,6 +34,7 @@
<modules>
<module>camel-blueprint</module>
<module>camel-test-blueprint</module>
+ <module>camel-blueprint-main</module>
<module>camel-cxf-blueprint</module>
<module>camel-cxf-transport-blueprint</module>
<module>camel-kura</module>