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 2017/01/19 11:06:51 UTC

[11/17] camel git commit: CAMEL-10721: camel-connector example

CAMEL-10721: camel-connector example


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

Branch: refs/heads/master
Commit: 1c505407b8629ba25e5c5548c14bf2f43415d683
Parents: 5d20447
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jan 18 16:42:18 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Jan 19 11:00:00 2017 +0100

----------------------------------------------------------------------
 connectors/examples/bar-connector/pom.xml       | 175 +++++++++++++++++++
 .../java/org/foo/connector/BarComponent.java    |  27 +++
 .../services/org/apache/camel/component/bar     |  18 ++
 .../src/main/resources/camel-connector.json     |  20 +++
 connectors/examples/foo-connector/pom.xml       | 175 +++++++++++++++++++
 .../java/org/foo/connector/FooComponent.java    |  27 +++
 .../services/org/apache/camel/component/foo     |  18 ++
 .../src/main/resources/camel-connector.json     |  21 +++
 connectors/examples/pom.xml                     |   3 +
 connectors/examples/wine-connector/pom.xml      | 175 +++++++++++++++++++
 .../java/org/foo/connector/WineComponent.java   |  27 +++
 .../services/org/apache/camel/component/wine    |  18 ++
 .../src/main/resources/camel-connector.json     |  20 +++
 13 files changed, 724 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/bar-connector/pom.xml
----------------------------------------------------------------------
diff --git a/connectors/examples/bar-connector/pom.xml b/connectors/examples/bar-connector/pom.xml
new file mode 100644
index 0000000..7b74f37
--- /dev/null
+++ b/connectors/examples/bar-connector/pom.xml
@@ -0,0 +1,175 @@
+<?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/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>connectors-examples</artifactId>
+    <version>2.19.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+
+  <artifactId>bar-connector</artifactId>
+  <name>Camel :: Connectors :: Examples :: Bar Connector</name>
+  <description>Bar Connector</description>
+  <packaging>jar</packaging>
+
+  <dependencyManagement>
+    <dependencies>
+      <!-- Camel BOM -->
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-parent</artifactId>
+        <version>${project.version}</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+
+    <!-- base component to use for this connector -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- camel-connector -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-connector</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- support camel documentation -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>apt</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- logging -->
+    <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>
+
+    <!-- testing -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin-version}</version>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>${maven-resources-plugin-version}</version>
+        <configuration>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+
+      <!-- generate components meta-data and validate component includes documentation etc -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-package-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>prepare</id>
+            <goals>
+              <goal>prepare-components</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+          <execution>
+            <id>validate</id>
+            <goals>
+              <goal>validate-components</goal>
+            </goals>
+            <phase>prepare-package</phase>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- generate connector -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-connector-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>connector</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- to generate the MANIFEST-FILE of the bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>${maven-bundle-plugin-version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>com.foo.foo</Bundle-SymbolicName>
+            <Export-Service>org.apache.camel.spi.ComponentResolver;component=foo</Export-Service>
+          </instructions>
+        </configuration>
+      </plugin>
+
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/bar-connector/src/main/java/org/foo/connector/BarComponent.java
----------------------------------------------------------------------
diff --git a/connectors/examples/bar-connector/src/main/java/org/foo/connector/BarComponent.java b/connectors/examples/bar-connector/src/main/java/org/foo/connector/BarComponent.java
new file mode 100644
index 0000000..3511227
--- /dev/null
+++ b/connectors/examples/bar-connector/src/main/java/org/foo/connector/BarComponent.java
@@ -0,0 +1,27 @@
+/**
+ * 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.foo.connector;
+
+import org.apache.camel.component.connector.DefaultConnectorComponent;
+
+public class BarComponent extends DefaultConnectorComponent {
+
+	public BarComponent() {
+		super("bar", "org.foo.connector.BarComponent");
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/bar-connector/src/main/resources/META-INF/services/org/apache/camel/component/bar
----------------------------------------------------------------------
diff --git a/connectors/examples/bar-connector/src/main/resources/META-INF/services/org/apache/camel/component/bar b/connectors/examples/bar-connector/src/main/resources/META-INF/services/org/apache/camel/component/bar
new file mode 100644
index 0000000..60143ae
--- /dev/null
+++ b/connectors/examples/bar-connector/src/main/resources/META-INF/services/org/apache/camel/component/bar
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.foo.connector.BarComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/bar-connector/src/main/resources/camel-connector.json
----------------------------------------------------------------------
diff --git a/connectors/examples/bar-connector/src/main/resources/camel-connector.json b/connectors/examples/bar-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..097d0cf
--- /dev/null
+++ b/connectors/examples/bar-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,20 @@
+{
+  "baseScheme" : "beverage",
+  "baseGroupId" : "org.apache.camel",
+  "baseArtifactId" : "beverage-component",
+  "baseVersion" : "2.19.0-SNAPSHOT",
+  "baseJavaType" : "org.beverage.BeverageComponent",
+  "name" : "Bar",
+  "scheme" : "bar",
+  "javaType" : "org.foo.connector.BarComponent",
+  "groupId" : "org.apache.camel",
+  "artifactId" : "wine-connector",
+  "version" : "1.0.0",
+  "description" : "To order two drinks from the bar",
+  "labels" : [ "bar" ],
+  "source" : "To",
+  "endpointOptions" : [ "drink", "amount" ],
+  "endpointValues" : {
+    "amount" : "2"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/foo-connector/pom.xml
----------------------------------------------------------------------
diff --git a/connectors/examples/foo-connector/pom.xml b/connectors/examples/foo-connector/pom.xml
new file mode 100644
index 0000000..dbc0731
--- /dev/null
+++ b/connectors/examples/foo-connector/pom.xml
@@ -0,0 +1,175 @@
+<?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/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>connectors-examples</artifactId>
+    <version>2.19.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+
+  <artifactId>foo-connector</artifactId>
+  <name>Camel :: Connectors :: Examples :: Foo Connector</name>
+  <description>Foo Connector</description>
+  <packaging>jar</packaging>
+
+  <dependencyManagement>
+    <dependencies>
+      <!-- Camel BOM -->
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-parent</artifactId>
+        <version>${project.version}</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+
+    <!-- base component to use for this connector -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- camel-connector -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-connector</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- support camel documentation -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>apt</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- logging -->
+    <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>
+
+    <!-- testing -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin-version}</version>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>${maven-resources-plugin-version}</version>
+        <configuration>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+
+      <!-- generate components meta-data and validate component includes documentation etc -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-package-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>prepare</id>
+            <goals>
+              <goal>prepare-components</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+          <execution>
+            <id>validate</id>
+            <goals>
+              <goal>validate-components</goal>
+            </goals>
+            <phase>prepare-package</phase>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- generate connector -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-connector-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>connector</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- to generate the MANIFEST-FILE of the bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>${maven-bundle-plugin-version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>com.foo.foo</Bundle-SymbolicName>
+            <Export-Service>org.apache.camel.spi.ComponentResolver;component=foo</Export-Service>
+          </instructions>
+        </configuration>
+      </plugin>
+
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/foo-connector/src/main/java/org/foo/connector/FooComponent.java
----------------------------------------------------------------------
diff --git a/connectors/examples/foo-connector/src/main/java/org/foo/connector/FooComponent.java b/connectors/examples/foo-connector/src/main/java/org/foo/connector/FooComponent.java
new file mode 100644
index 0000000..754fdd0
--- /dev/null
+++ b/connectors/examples/foo-connector/src/main/java/org/foo/connector/FooComponent.java
@@ -0,0 +1,27 @@
+/**
+ * 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.foo.connector;
+
+import org.apache.camel.component.connector.DefaultConnectorComponent;
+
+public class FooComponent extends DefaultConnectorComponent {
+
+	public FooComponent() {
+		super("foo", "org.foo.connector.FooComponent");
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/foo-connector/src/main/resources/META-INF/services/org/apache/camel/component/foo
----------------------------------------------------------------------
diff --git a/connectors/examples/foo-connector/src/main/resources/META-INF/services/org/apache/camel/component/foo b/connectors/examples/foo-connector/src/main/resources/META-INF/services/org/apache/camel/component/foo
new file mode 100644
index 0000000..b92962a
--- /dev/null
+++ b/connectors/examples/foo-connector/src/main/resources/META-INF/services/org/apache/camel/component/foo
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.foo.connector.FooComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/foo-connector/src/main/resources/camel-connector.json
----------------------------------------------------------------------
diff --git a/connectors/examples/foo-connector/src/main/resources/camel-connector.json b/connectors/examples/foo-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..52cc2e2
--- /dev/null
+++ b/connectors/examples/foo-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,21 @@
+{
+  "baseScheme" : "timer",
+  "baseGroupId" : "org.apache.camel",
+  "baseArtifactId" : "camel-core",
+  "baseVersion" : "2.19.0-SNAPSHOT",
+  "baseJavaType" : "org.apache.camel.component.timer.TimerComponent",
+  "name" : "Foo",
+  "scheme" : "foo",
+  "javaType" : "org.foo.connector.FooComponent",
+  "groupId" : "org.foo",
+  "artifactId" : "foo-connector",
+  "version" : "1.0.0",
+  "description" : "Something cool",
+  "labels" : [ "foo", "timer" ],
+  "source" : "From",
+  "endpointOptions" : [ "timerName", "period" ],
+  "endpointValues" : {
+    "fixedRate" : "true",
+    "period" : "5000"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/pom.xml
----------------------------------------------------------------------
diff --git a/connectors/examples/pom.xml b/connectors/examples/pom.xml
index 07f93c7..5478431 100644
--- a/connectors/examples/pom.xml
+++ b/connectors/examples/pom.xml
@@ -33,6 +33,9 @@
 
   <modules>
     <module>beverage-component</module>
+    <module>foo-connector</module>
+    <module>bar-connector</module>
+    <module>wine-connector</module>
   </modules>
 
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/wine-connector/pom.xml
----------------------------------------------------------------------
diff --git a/connectors/examples/wine-connector/pom.xml b/connectors/examples/wine-connector/pom.xml
new file mode 100644
index 0000000..e137acb
--- /dev/null
+++ b/connectors/examples/wine-connector/pom.xml
@@ -0,0 +1,175 @@
+<?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/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>connectors-examples</artifactId>
+    <version>2.19.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+
+  <artifactId>wine-connector</artifactId>
+  <name>Camel :: Connectors :: Examples :: Wine Connector</name>
+  <description>Wine Connector</description>
+  <packaging>jar</packaging>
+
+  <dependencyManagement>
+    <dependencies>
+      <!-- Camel BOM -->
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-parent</artifactId>
+        <version>${project.version}</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+
+    <!-- base component to use for this connector -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>beverage-component</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- camel-connector -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-connector</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- support camel documentation -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>apt</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- logging -->
+    <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>
+
+    <!-- testing -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin-version}</version>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>${maven-resources-plugin-version}</version>
+        <configuration>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+
+      <!-- generate components meta-data and validate component includes documentation etc -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-package-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>prepare</id>
+            <goals>
+              <goal>prepare-components</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+          <execution>
+            <id>validate</id>
+            <goals>
+              <goal>validate-components</goal>
+            </goals>
+            <phase>prepare-package</phase>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- generate connector -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-connector-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>connector</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- to generate the MANIFEST-FILE of the bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>${maven-bundle-plugin-version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>com.foo.wine</Bundle-SymbolicName>
+            <Export-Service>org.apache.camel.spi.ComponentResolver;component=wine</Export-Service>
+          </instructions>
+        </configuration>
+      </plugin>
+
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/wine-connector/src/main/java/org/foo/connector/WineComponent.java
----------------------------------------------------------------------
diff --git a/connectors/examples/wine-connector/src/main/java/org/foo/connector/WineComponent.java b/connectors/examples/wine-connector/src/main/java/org/foo/connector/WineComponent.java
new file mode 100644
index 0000000..5118d25
--- /dev/null
+++ b/connectors/examples/wine-connector/src/main/java/org/foo/connector/WineComponent.java
@@ -0,0 +1,27 @@
+/**
+ * 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.foo.connector;
+
+import org.apache.camel.component.connector.DefaultConnectorComponent;
+
+public class WineComponent extends DefaultConnectorComponent {
+
+	public WineComponent() {
+		super("wine", "org.foo.connector.WineComponent");
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/wine-connector/src/main/resources/META-INF/services/org/apache/camel/component/wine
----------------------------------------------------------------------
diff --git a/connectors/examples/wine-connector/src/main/resources/META-INF/services/org/apache/camel/component/wine b/connectors/examples/wine-connector/src/main/resources/META-INF/services/org/apache/camel/component/wine
new file mode 100644
index 0000000..0266ab6
--- /dev/null
+++ b/connectors/examples/wine-connector/src/main/resources/META-INF/services/org/apache/camel/component/wine
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.foo.connector.WineComponent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/1c505407/connectors/examples/wine-connector/src/main/resources/camel-connector.json
----------------------------------------------------------------------
diff --git a/connectors/examples/wine-connector/src/main/resources/camel-connector.json b/connectors/examples/wine-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..a2e8ea8
--- /dev/null
+++ b/connectors/examples/wine-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,20 @@
+{
+  "baseScheme" : "beverage",
+  "baseGroupId" : "org.apache.camel",
+  "baseArtifactId" : "beverage-component",
+  "baseVersion" : "2.19.0-SNAPSHOT",
+  "baseJavaType" : "org.beverage.BeverageComponent",
+  "name" : "Wine",
+  "scheme" : "wine",
+  "javaType" : "org.foo.connector.WineComponent",
+  "groupId" : "org.apache.camel",
+  "artifactId" : "wine-connector",
+  "version" : "1.0.0",
+  "description" : "To order wine from the bar",
+  "labels" : [ "bar" ],
+  "source" : "To",
+  "endpointOptions" : [ "amount" ],
+  "endpointValues" : {
+    "drink" : "Wine"
+  }
+}
\ No newline at end of file