You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/08/16 18:26:31 UTC

svn commit: r566763 - in /activemq/camel/trunk/components/camel-spring: pom.xml src/test/resources/META-INF/spring/camel-context.xml

Author: jstrachan
Date: Thu Aug 16 09:26:27 2007
New Revision: 566763

URL: http://svn.apache.org/viewvc?view=rev&rev=566763
Log:
added some example routes for the camel:doc plugin to generate pictures of

Modified:
    activemq/camel/trunk/components/camel-spring/pom.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml

Modified: activemq/camel/trunk/components/camel-spring/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/pom.xml?view=diff&rev=566763&r1=566762&r2=566763
==============================================================================
--- activemq/camel/trunk/components/camel-spring/pom.xml (original)
+++ activemq/camel/trunk/components/camel-spring/pom.xml Thu Aug 16 09:26:27 2007
@@ -154,6 +154,7 @@
               <tasks>
                 <echo>Deleting unwanted resources from the test-jar</echo>
                 <delete file="${project.build.directory}/test-classes/log4j.properties" verbose="true"/>
+                <delete file="${project.build.directory}/test-classes/META-INF/spring/*" verbose="true"/>
               </tasks>
             </configuration>
             <goals>
@@ -260,4 +261,15 @@
       </plugin>
     </plugins>
   </build>
+
+
+  <reporting>
+    <plugins>
+      <!-- lets generate nice PNG / SVG diagrams from our example routes -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
 </project>

Modified: activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml?view=diff&rev=566763&r1=566762&r2=566763
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/resources/META-INF/spring/camel-context.xml Thu Aug 16 09:26:27 2007
@@ -29,8 +29,37 @@
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
 
-  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring"
-                packages="org.apache.camel.builder.RouteBuilder">
+  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+    <route>
+      <from uri="direct:a.start"/>
+      <choice>
+        <when>
+          <xpath>$foo = 'bar'</xpath>
+          <to uri="mock:x"/>
+        </when>
+        <when>
+          <xpath>$foo = 'cheese'</xpath>
+          <to uri="mock:y"/>
+        </when>
+        <otherwise>
+          <to uri="mock:z"/>
+        </otherwise>
+      </choice>
+    </route>
+    <route>
+      <from uri="direct:b.start"/>
+      <filter>
+        <xpath>/person[@name='James']</xpath>
+        <to uri="mock:b.end"/>
+      </filter>
+    </route>
+    <route>
+      <from uri="direct:c.start"/>
+      <resequencer>
+        <simple>body</simple>
+        <to uri="mock:c.end"/>
+      </resequencer>
+    </route>
   </camelContext>
 
 </beans>