Author: ningjiang
Date: Tue Nov 10 14:21:21 2009
New Revision: 834475

URL: http://svn.apache.org/viewvc?rev=834475&view=rev
Log:
CAMEL-2155 Fixed the issues of running camel-example-jms-file in ServiceMix

Modified:
    camel/trunk/examples/camel-example-jms-file/README.txt
    camel/trunk/examples/camel-example-jms-file/pom.xml
    
camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/JmsToFileClient.java

Modified: camel/trunk/examples/camel-example-jms-file/README.txt
URL: 
http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-jms-file/README.txt?rev=834475&r1=834474&r2=834475&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-jms-file/README.txt (original)
+++ camel/trunk/examples/camel-example-jms-file/README.txt Tue Nov 10 14:21:21 
2009
@@ -15,7 +15,12 @@
   mvn compile
   
 The example should run if you type
-  mvn exec:java
+  mvn exec:java -PExample
+  
+To run the example inside ServiceMix 4
+  First install this example bundle, make sure the jms-file route service is 
started,
+  then start the client to send the JMS message to camel route service 
+  mvn exec:java -PClient
 
 To run the example with Ant
   a. You need to have Apache ActiveMQ installed. It can be downloaded from 

Modified: camel/trunk/examples/camel-example-jms-file/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-jms-file/pom.xml?rev=834475&r1=834474&r2=834475&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-jms-file/pom.xml (original)
+++ camel/trunk/examples/camel-example-jms-file/pom.xml Tue Nov 10 14:21:21 2009
@@ -34,6 +34,7 @@
 
   <properties>
     
<camel.osgi.export.pkg>org.apache.camel.example.jmstofile.*</camel.osgi.export.pkg>
+    
<camel.osgi.import.pkg>org.apache.activemq.xbean,org.apache.activemq.broker,org.apache.activemq.pool,*</camel.osgi.import.pkg>
   </properties>
 
   <dependencies>
@@ -75,6 +76,23 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  
+  <profiles>
+       <profile>
+               <id>Example</id>
+               <properties>
+                       <!-- Starting the camel-cxf example of routing the SOAP 
over http message to SOAP over JMS Server -->
+                       
<target.main.class>org.apache.camel.example.jmstofile.CamelJmsToFileExample</target.main.class>
+               </properties>
+     </profile>
+     <profile>
+               <id>Client</id>
+               <properties>
+                       <!-- Starting the camel-cxf example of routing the SOAP 
over http message to SOAP over JMS Server -->
+                       
<target.main.class>org.apache.camel.example.jmstofile.JmsToFileClient</target.main.class>
+               </properties>
+       </profile>
+  </profiles>
 
   <build>
     <plugins>
@@ -84,7 +102,7 @@
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
         <configuration>
-          
<mainClass>org.apache.camel.example.jmstofile.CamelJmsToFileExample</mainClass>
+          <mainClass>${target.main.class}</mainClass>
           <includePluginDependencies>false</includePluginDependencies>
         </configuration>
       </plugin>

Modified: 
camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/JmsToFileClient.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/JmsToFileClient.java?rev=834475&r1=834474&r2=834475&view=diff
==============================================================================
--- 
camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/JmsToFileClient.java
 (original)
+++ 
camel/trunk/examples/camel-example-jms-file/src/main/java/org/apache/camel/example/jmstofile/JmsToFileClient.java
 Tue Nov 10 14:21:21 2009
@@ -31,7 +31,7 @@
         //Helper class
     }
     
-    public static void mail(String[] args) throws Exception {
+    public static void main(String args[]) throws Exception {
         
         CamelContext context = new DefaultCamelContext();
        


Reply via email to