[
https://issues.apache.org/activemq/browse/CAMEL-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Anstey updated CAMEL-769:
----------------------------------
Attachment: dumpRoutesToXml.patch
This patch adds the ability to export all route definitions as an XML file. To
use it, you can simply provide the '-Dcamel.routesOutputFile=foo.xml' parameter
to the camel-maven-plugin run mojo. For example, running 'mvn camel:run
-Dcamel.routesOutputFile=`pwd`/theroutes.xml' in the camel docs example will
create the file theroutes.xml as:
{code:language=xml}
<?xml version="1.0" encoding="UTF-8"?>
<routes xmlns="http://activemq.apache.org/camel/schema/spring">
<route group="org.apache.camel.example.docs.ContentBasedRouteRoute">
<from uri="seda:cbr.input"/>
<interceptor>
<choice id="choice1">
<when>
<expressionType/>
<to uri="seda:cbr.output.a"/>
</when>
<otherwise>
<to uri="seda:cbr.output.b"/>
</otherwise>
</choice>
</interceptor>
</route>
<route group="org.apache.camel.example.docs.PipelineRoute">
<from uri="seda:pipeline.in"/>
<interceptor>
<to id="to1" uri="seda:pipeline.out1"/>
<to id="to2" uri="seda:pipeline.out2"/>
<to id="to3" uri="seda:pipeline.out3"/>
</interceptor>
</route>
<route group="org.apache.camel.example.docs.MulticastRoute">
<from uri="seda:multicast.in"/>
<interceptor>
<multicast id="multicast1">
<to uri="seda:multicast.out1"/>
<to uri="seda:multicast.out2"/>
<to uri="seda:multicast.out3"/>
</multicast>
</interceptor>
</route>
<route>
<from uri="seda:other.a"/>
<interceptor>
<to id="to4" uri="seda:other.b"/>
<to id="to5" uri="seda:other.c"/>
</interceptor>
</route>
</routes>
{code}
> Spring Camel Main should provide option to export all the RouteDefinitions as
> XML to a file
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-769
> URL: https://issues.apache.org/activemq/browse/CAMEL-769
> Project: Apache Camel
> Issue Type: Improvement
> Reporter: James Strachan
> Fix For: 1.5.0
>
> Attachments: dumpRoutesToXml.patch
>
>
> e.g.
> {code}
> java org.apache.camel.spring.Main -out foo.xml
> {code}
> Then once the CamelContext is created it grabs the getRouteDefintions() and
> writes them to an XML file
> {code}
> <routes xmlns="...">
> <route/> ...
> </routes>
> {code}
> This will then make it easy for tooling to visualise the routes
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.