You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2017/02/06 09:49:47 UTC
[1/3] camel git commit: CAMEL-10612: added platform compatibility
tests and features
Repository: camel
Updated Branches:
refs/heads/master 8307841d2 -> aa629b280
CAMEL-10612: added platform compatibility tests and features
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aa629b28
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aa629b28
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aa629b28
Branch: refs/heads/master
Commit: aa629b280b3401823844b492a77beefc8f170644
Parents: 91926c2
Author: Nicola Ferraro <ni...@gmail.com>
Authored: Mon Feb 6 10:49:20 2017 +0100
Committer: Nicola Ferraro <ni...@gmail.com>
Committed: Mon Feb 6 10:49:28 2017 +0100
----------------------------------------------------------------------
components/camel-reactive-streams/pom.xml | 5 +-
parent/pom.xml | 1 +
.../features/src/main/resources/features.xml | 4 ++
.../itest/karaf/CamelReactiveStreamsTest.java | 36 ++++++++++++++
.../springboot/CamelReactiveStreamsTest.java | 50 ++++++++++++++++++++
.../itest/springboot/util/LocationUtils.java | 2 +-
6 files changed, 95 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/components/camel-reactive-streams/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/pom.xml b/components/camel-reactive-streams/pom.xml
index 3a69a48..3d29bbc 100644
--- a/components/camel-reactive-streams/pom.xml
+++ b/components/camel-reactive-streams/pom.xml
@@ -32,6 +32,7 @@
<properties>
<camel.osgi.export.pkg>org.apache.camel.component.reactive.streams.*</camel.osgi.export.pkg>
+ <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=reactive-streams</camel.osgi.export.service>
</properties>
<dependencies>
@@ -44,14 +45,14 @@
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
- <version>1.0.0</version>
+ <version>${reactive-streams-version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams-tck</artifactId>
- <version>1.0.0</version>
+ <version>${reactive-streams-version}</version>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index c21abeb..f68623d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -505,6 +505,7 @@
<quartz2-version>2.2.3</quartz2-version>
<quickfixj-version>1.6.3</quickfixj-version>
<rabbitmq-amqp-client-version>4.0.2</rabbitmq-amqp-client-version>
+ <reactive-streams-version>1.0.0</reactive-streams-version>
<reactor-version>3.0.4.RELEASE</reactor-version>
<reflections-bundle-version>0.9.10_3</reflections-bundle-version>
<regexp-bundle-version>1.4_1</regexp-bundle-version>
http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/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 20d52f5..c9ec945 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -1469,6 +1469,10 @@
<bundle dependency='true'>mvn:commons-pool/commons-pool/${commons-pool-version}</bundle>
<bundle>mvn:org.apache.camel/camel-rabbitmq/${project.version}</bundle>
</feature>
+ <feature name='camel-reactive-streams' version='${project.version}' resolver='(obr)' start-level='50'>
+ <feature version='${project.version}'>camel-core</feature>
+ <bundle dependency='true'>mvn:org.reactivestreams/reactive-streams/${reactive-streams-version}</bundle>
+ </feature>
<feature name='camel-restlet' version='${project.version}' resolver='(obr)' start-level='50'>
<feature version='${project.version}'>camel-core</feature>
<bundle dependency='true'>mvn:commons-codec/commons-codec/${commons-codec-version}</bundle>
http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java
new file mode 100644
index 0000000..ad395f2
--- /dev/null
+++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java
@@ -0,0 +1,36 @@
+/**
+ * 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.karaf;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+@Ignore("Not installing")
+public class CamelReactiveStreamsTest extends BaseKarafTest {
+
+ public static final String COMPONENT = extractName(CamelReactiveStreamsTest.class);
+
+ @Test
+ public void test() throws Exception {
+ testComponent(COMPONENT);
+ }
+
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.java
new file mode 100644
index 0000000..05c9f6c
--- /dev/null
+++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.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
+ *
+ * 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.apache.camel.itest.springboot.util.DependencyResolver;
+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 CamelReactiveStreamsTest extends AbstractSpringBootTestSupport {
+
+ @Deployment
+ public static Archive<?> createSpringBootPackage() throws Exception {
+ return ArquillianPackager.springBootPackage(createTestConfig());
+ }
+
+ public static ITestConfig createTestConfig() {
+ return new ITestConfigBuilder()
+ .module(inferModuleName(CamelReactiveStreamsTest.class))
+ .unitTestExclusionPattern(".*(\\.tck\\..*)")
+ .build();
+ }
+
+ @Test
+ public void componentTests() throws Exception {
+ this.runComponentTest(config);
+ this.runModuleUnitTestsIfEnabled(config);
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java
index ad23eec..0d564df 100644
--- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java
+++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java
@@ -32,7 +32,7 @@ public final class LocationUtils {
try {
File root = new File(".").getCanonicalFile();
while (root != null) {
- File[] names = root.listFiles(pathname -> pathname.getName().equals("components-starter"));
+ File[] names = root.listFiles(pathname -> pathname.getName().equals("camel-core"));
if (names != null && names.length == 1) {
break;
}
[2/3] camel git commit: CAMEL-10612: added reactive-streams to BOM
Posted by nf...@apache.org.
CAMEL-10612: added reactive-streams to BOM
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/91926c2b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/91926c2b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/91926c2b
Branch: refs/heads/master
Commit: 91926c2bd4ad212f0e30cd430d2006a5fd9ea560
Parents: 44766f5
Author: Nicola Ferraro <ni...@gmail.com>
Authored: Mon Feb 6 09:48:48 2017 +0100
Committer: Nicola Ferraro <ni...@gmail.com>
Committed: Mon Feb 6 10:49:28 2017 +0100
----------------------------------------------------------------------
apache-camel/src/main/descriptors/common-bin.xml | 2 ++
.../src/main/docs/reactive-streams-component.adoc | 2 +-
examples/camel-example-reactive-streams/pom.xml | 1 -
parent/pom.xml | 10 ++++++++++
.../spring-boot-dm/camel-spring-boot-dependencies/pom.xml | 10 ++++++++++
5 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/91926c2b/apache-camel/src/main/descriptors/common-bin.xml
----------------------------------------------------------------------
diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml
index 2691281..9e0857b 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -191,6 +191,7 @@
<include>org.apache.camel:camel-quartz2</include>
<include>org.apache.camel:camel-quickfix</include>
<include>org.apache.camel:camel-rabbitmq</include>
+ <include>org.apache.camel:camel-reactive-streams</include>
<include>org.apache.camel:camel-restlet</include>
<include>org.apache.camel:camel-ribbon</include>
<include>org.apache.camel:camel-rmi</include>
@@ -457,6 +458,7 @@
<include>org.apache.camel:camel-quartz2-starter</include>
<include>org.apache.camel:camel-quickfix-starter</include>
<include>org.apache.camel:camel-rabbitmq-starter</include>
+ <include>org.apache.camel:camel-reactive-streams-starter</include>
<include>org.apache.camel:camel-restlet-starter</include>
<include>org.apache.camel:camel-ribbon-starter</include>
<include>org.apache.camel:camel-rmi-starter</include>
http://git-wip-us.apache.org/repos/asf/camel/blob/91926c2b/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc b/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
index b351017..6a034f2 100644
--- a/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
+++ b/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
@@ -15,7 +15,7 @@ outgoing streams within Camel routes, and a direct client API that allows using
Camel uses an internal implementation of the reactive streams
_Publisher_ and _Subscriber_, so it's not tied to any specific framework.
-The following reactive frameworks have been used in the integration tests: https://github.com/ReactiveX/RxJava[RxJava2], https://github.com/reactor/reactor-core[reactor-core].
+The following reactive frameworks have been used in the integration tests: https://github.com/reactor/reactor-core[Reactor Core 3], https://github.com/ReactiveX/RxJava[RxJava 2].
Maven users will need to add the following dependency to their `pom.xml`
for this component:
http://git-wip-us.apache.org/repos/asf/camel/blob/91926c2b/examples/camel-example-reactive-streams/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-reactive-streams/pom.xml b/examples/camel-example-reactive-streams/pom.xml
index 10c1a23..de9e4a7 100644
--- a/examples/camel-example-reactive-streams/pom.xml
+++ b/examples/camel-example-reactive-streams/pom.xml
@@ -45,7 +45,6 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-reactive-streams-starter</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
http://git-wip-us.apache.org/repos/asf/camel/blob/91926c2b/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 53baa2c..c21abeb 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1614,6 +1614,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-reactive-streams</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-restlet</artifactId>
<version>${project.version}</version>
</dependency>
@@ -2866,6 +2871,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-reactive-streams-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-restlet-starter</artifactId>
<version>${project.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/91926c2b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
index d065f9a..be64097 100644
--- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
+++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
@@ -1934,6 +1934,16 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-reactive-streams</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-reactive-streams-starter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-restlet</artifactId>
<version>${project.version}</version>
</dependency>
[3/3] camel git commit: CAMEL-10612: better doc (spring-boot)
Posted by nf...@apache.org.
CAMEL-10612: better doc (spring-boot)
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/44766f56
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/44766f56
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/44766f56
Branch: refs/heads/master
Commit: 44766f565bfc18bc07e89e5584b76d6711aebcab
Parents: 8307841
Author: Nicola Ferraro <ni...@gmail.com>
Authored: Mon Feb 6 01:18:30 2017 +0100
Committer: Nicola Ferraro <ni...@gmail.com>
Committed: Mon Feb 6 10:49:28 2017 +0100
----------------------------------------------------------------------
.../src/main/docs/reactive-streams-component.adoc | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/44766f56/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc b/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
index f720992..b351017 100644
--- a/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
+++ b/components/camel-reactive-streams/src/main/docs/reactive-streams-component.adoc
@@ -375,6 +375,24 @@ The number of concurrent consumers (threads) can also be set as endpoint option
When using 1 consumer (the default), the order of items in the source stream is maintained.
When this value is increased, items will be processed concurrently by multiple threads (so not preserving the order).
+
+### Camel Reactive Streams Starter
+
+A starter module is available to spring-boot users. When using the starter,
+the `CamelReactiveStreamsService` can be directly injected into Spring components.
+
+To use the starter, add the following to your spring boot pom.xml file:
+
+[source,xml]
+------------------------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-reactive-streams-starter</artifactId>
+ <version>${camel.version}</version> <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------
+
+
### See Also
* link:configuring-camel.html[Configuring Camel]