camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: Make it easier for the end users to run the camel-example-mybatis example using the Karaf feature (which would only need 2 lines of commands to type instead of 7). Also in long-term the maintance of hard-coded third-party dependency versions
Date Fri, 17 Jan 2014 17:57:07 GMT
Updated Branches:
  refs/heads/master 871b55aa1 -> edf19d530


Make it easier for the end users to run the camel-example-mybatis example using the Karaf
feature (which would only need 2 lines of commands to type instead of 7). Also in long-term
the maintance of hard-coded third-party dependency versions (e.g. inside README.txt) would
become a nightmare.

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

Branch: refs/heads/master
Commit: edf19d530cedbcc38fe4ee17c31c3610386c9c5d
Parents: 871b55a
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Fri Jan 17 18:57:02 2014 +0100
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Fri Jan 17 18:57:02 2014 +0100

----------------------------------------------------------------------
 examples/camel-example-mybatis/README.txt       | 21 ++--------
 examples/camel-example-mybatis/pom.xml          | 41 ++++++++++++--------
 .../src/main/resources/features.xml             |  5 +--
 3 files changed, 30 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/edf19d53/examples/camel-example-mybatis/README.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-mybatis/README.txt b/examples/camel-example-mybatis/README.txt
index a19f378..e7dd342 100644
--- a/examples/camel-example-mybatis/README.txt
+++ b/examples/camel-example-mybatis/README.txt
@@ -15,24 +15,11 @@ You will need to install this example first to your local maven repository
with:
 
 This example requires running in Apache Karaf / ServiceMix
 
-To install Apache Camel in Karaf you type in the shell (we use version 2.12.0):
+You can install this example from the shell using this example's "features.xml"
+for easy provisioning.
 
-  features:chooseurl camel 2.12.0
-  features:install camel
-
-First you need to install the following features in Karaf/ServiceMix with:
-
-  features:install camel-mybatis
-
-Then you need to install JDBC connection pool and the Derby Database:
-
-  osgi:install -s mvn:commons-pool/commons-pool/1.6
-  osgi:install -s mvn:commons-dbcp/commons-dbcp/1.4
-  osgi:install -s mvn:org.apache.derby/derby/10.10.1.1
-
-Then you can install the Camel example:
-
-  osgi:install -s mvn:org.apache.camel/camel-example-mybatis/2.12.0
+  features:addUrl mvn:org.apache.camel/camel-example-mybatis/${version}/xml/features
+  features:install camel-example-mybatis
 
 And you can see the application running by tailing the logs
 

http://git-wip-us.apache.org/repos/asf/camel/blob/edf19d53/examples/camel-example-mybatis/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-mybatis/pom.xml b/examples/camel-example-mybatis/pom.xml
index 9f0a35f..4139638 100644
--- a/examples/camel-example-mybatis/pom.xml
+++ b/examples/camel-example-mybatis/pom.xml
@@ -30,6 +30,10 @@
   <name>Camel :: Example :: MyBatis</name>
   <description>An example for showing Camel using MyBatis SQL mapper component</description>
 
+  <properties>
+    <camel.osgi.export.pkg>org.apache.camel.example.mybatis.*</camel.osgi.export.pkg>
+  </properties>
+
   <dependencies>
 
     <!-- Camel -->
@@ -55,26 +59,29 @@
   </dependencies>
 
   <build>
-
     <plugins>
-
-      <!-- to generate the MANIFEST-FILE of the bundle -->
       <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>target/META-INF</manifestLocation>
-          <instructions>
-            <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
-            <Export-Package>org.apache.camel.example.mybatis</Export-Package>
-            <Import-Package>
-              *
-            </Import-Package>
-          </instructions>
-        </configuration>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-artifacts</id>
+            <phase>package</phase>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>target/classes/features.xml</file>
+                  <type>xml</type>
+                  <classifier>features</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
-
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/camel/blob/edf19d53/examples/camel-example-mybatis/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-mybatis/src/main/resources/features.xml b/examples/camel-example-mybatis/src/main/resources/features.xml
index d07bbc3..4479968 100644
--- a/examples/camel-example-mybatis/src/main/resources/features.xml
+++ b/examples/camel-example-mybatis/src/main/resources/features.xml
@@ -16,14 +16,13 @@
     limitations under the License.
 -->
 <features>
+
     <repository>mvn:org.apache.camel.karaf/apache-camel/${project.version}/xml/features</repository>
 
     <feature name="camel-example-mybatis" version="${project.version}">
-        <feature version="${project.version}">camel</feature>
+        <feature version="${project.version}">camel-blueprint</feature>
         <feature version="${project.version}">camel-mybatis</feature>
         <bundle>mvn:org.apache.derby/derby/${derby-version}</bundle>
-        <bundle>mvn:commons-pool/commons-pool/${commons-pool-version}</bundle>
-        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/${commons-dbcp-bundle-version}</bundle>
         <bundle>mvn:org.apache.camel/camel-example-mybatis/${project.version}</bundle>
     </feature>
 


Mime
View raw message