camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [13/14] camel git commit: Add camel-slack to kit
Date Mon, 01 Jun 2015 07:10:27 GMT
Add camel-slack to kit


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/eaf4ab99
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/eaf4ab99
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/eaf4ab99

Branch: refs/heads/master
Commit: eaf4ab99aad4f79a19abc517a6f918fad47113d9
Parents: a0003f5
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jun 1 09:11:44 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jun 1 09:11:44 2015 +0200

----------------------------------------------------------------------
 apache-camel/pom.xml                            |  4 +
 .../src/main/descriptors/common-bin.xml         |  1 +
 components/camel-slack/pom.xml                  | 81 ++++++++++----------
 .../resources/OSGI-INF/blueprint/blueprint.xml  | 42 ----------
 .../component/slack/SlackProducerTest.java      |  8 +-
 .../resources/OSGI-INF/blueprint/blueprint.xml  | 42 ++++++++++
 components/pom.xml                              |  1 +
 parent/pom.xml                                  |  6 ++
 8 files changed, 101 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/apache-camel/pom.xml
----------------------------------------------------------------------
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 03cf602..53e6b8c 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -668,6 +668,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
+      <artifactId>camel-slack</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
       <artifactId>camel-smpp</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/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 48ac728..d24d053 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -178,6 +178,7 @@
         <include>org.apache.camel:camel-shiro</include>
         <include>org.apache.camel:camel-sip</include>
         <include>org.apache.camel:camel-sjms</include>
+        <include>org.apache.camel:camel-slack</include>
         <include>org.apache.camel:camel-smpp</include>
         <include>org.apache.camel:camel-snmp</include>
         <include>org.apache.camel:camel-soap</include>

http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/components/camel-slack/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-slack/pom.xml b/components/camel-slack/pom.xml
index dd4292b..16ce46a 100644
--- a/components/camel-slack/pom.xml
+++ b/components/camel-slack/pom.xml
@@ -19,55 +19,56 @@ limitations under the License.
          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>
+  <modelVersion>4.0.0</modelVersion>
 
-    <parent>
-        <artifactId>components</artifactId>
-        <groupId>org.apache.camel</groupId>
-        <version>2.16-SNAPSHOT</version>
-    </parent>
+  <parent>
+    <artifactId>components</artifactId>
+    <groupId>org.apache.camel</groupId>
+    <version>2.16-SNAPSHOT</version>
+  </parent>
 
-    <artifactId>camel-slack</artifactId>
-    <packaging>bundle</packaging>
-    <name>Camel :: Slack</name>
-    <description>Camel Slack Support</description>
+  <artifactId>camel-slack</artifactId>
+  <packaging>bundle</packaging>
+  <name>Camel :: Slack</name>
+  <description>Camel Slack Support</description>
 
-    <properties>
-        <camel.osgi.export.pkg>org.apache.camel.component.slack.*</camel.osgi.export.pkg>
-        <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=slack</camel.osgi.export.service>
-    </properties>
+  <properties>
+    <camel.osgi.export.pkg>org.apache.camel.component.slack.*</camel.osgi.export.pkg>
+    <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=slack</camel.osgi.export.service>
+  </properties>
 
-    <dependencies>
+  <dependencies>
 
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-core</artifactId>
-        </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+    </dependency>
 
-        <dependency>
-            <groupId>com.googlecode.json-simple</groupId>
-            <artifactId>json-simple</artifactId>
-            <version>1.1.1</version>
-        </dependency>
+    <dependency>
+      <groupId>com.googlecode.json-simple</groupId>
+      <artifactId>json-simple</artifactId>
+      <version>${json-simple-version}</version>
+    </dependency>
 
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>${httpclient4-version}</version>
-        </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>${httpclient4-version}</version>
+    </dependency>
 
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-blueprint</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
+    <!-- test dependencies -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test-blueprint</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>
 
-    </dependencies>
+  </dependencies>
 
 
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/components/camel-slack/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/components/camel-slack/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/components/camel-slack/src/main/resources/OSGI-INF/blueprint/blueprint.xml
deleted file mode 100644
index 08a6da5..0000000
--- a/components/camel-slack/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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" default-activation="lazy">
-
-    <bean id="slack" class="org.apache.camel.component.slack.SlackComponent">
-        <property name="webhookUrl" value="https://hooks.slack.com/services/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"/>
-    </bean>
-
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <onException>
-            <exception>java.lang.Exception</exception>
-            <handled>
-                <constant>true</constant>
-            </handled>
-            <to uri="mock:errors"/>
-        </onException>
-        <route>
-            <from uri="direct:test"/>
-            <to uri="slack:#general?iconEmoji=:camel:&amp;username=CamelTest"/>
-        </route>
-        <route>
-            <from uri="direct:error"/>
-            <to uri="slack:#badchannel?iconEmoji=:camel:&amp;username=CamelTest"/>
-        </route>
-    </camelContext>
-
-</blueprint>

http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
index bd3aa98..457418b 100644
--- a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
+++ b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
@@ -28,15 +28,19 @@ public class SlackProducerTest extends CamelBlueprintTestSupport {
 
     @Test
     public void testSlackMessage() throws Exception {
-        getMockEndpoint(("mock:errors")).expectedMessageCount(0);
+        getMockEndpoint("mock:errors").expectedMessageCount(0);
+
         template.sendBody("direct:test", "Hello from Camel!");
+
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testSlackError() throws Exception {
-        getMockEndpoint(("mock:errors")).expectedMessageCount(1);
+        getMockEndpoint("mock:errors").expectedMessageCount(1);
+
         template.sendBody("direct:error", "Error from Camel!");
+
         assertMockEndpointsSatisfied();
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/components/camel-slack/src/test/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/components/camel-slack/src/test/resources/OSGI-INF/blueprint/blueprint.xml b/components/camel-slack/src/test/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000..08a6da5
--- /dev/null
+++ b/components/camel-slack/src/test/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,42 @@
+<?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" default-activation="lazy">
+
+    <bean id="slack" class="org.apache.camel.component.slack.SlackComponent">
+        <property name="webhookUrl" value="https://hooks.slack.com/services/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"/>
+    </bean>
+
+    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+        <onException>
+            <exception>java.lang.Exception</exception>
+            <handled>
+                <constant>true</constant>
+            </handled>
+            <to uri="mock:errors"/>
+        </onException>
+        <route>
+            <from uri="direct:test"/>
+            <to uri="slack:#general?iconEmoji=:camel:&amp;username=CamelTest"/>
+        </route>
+        <route>
+            <from uri="direct:error"/>
+            <to uri="slack:#badchannel?iconEmoji=:camel:&amp;username=CamelTest"/>
+        </route>
+    </camelContext>
+
+</blueprint>

http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index e364395..c6fa5ba 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -199,6 +199,7 @@
     <module>camel-smpp</module>
     <module>camel-snmp</module>
     <module>camel-sjms</module>
+    <module>camel-slack</module>
     <module>camel-soap</module>
     <module>camel-solr</module>
     <module>camel-spark-rest</module>

http://git-wip-us.apache.org/repos/asf/camel/blob/eaf4ab99/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index d50ea24..ea2dd1a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -294,6 +294,7 @@
     <json4s-bundle-version>3.2.8_1</json4s-bundle-version>
     <json-asm-version>1.0.2</json-asm-version>
     <json-path-version>2.0.0</json-path-version>
+    <json-simple-version>1.1.1</json-simple-version>
     <json-smart-version>2.1.1</json-smart-version>
     <jsp-api-2.1-version>1.0.1</jsp-api-2.1-version>
     <jsr311-api-version>1.1.1</jsr311-api-version>
@@ -1375,6 +1376,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-slack</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-soap</artifactId>
         <version>${project.version}</version>
       </dependency>


Mime
View raw message