blob: feb1ff18b8a5acd7f433e5f632ea6d035859da27 [file] [log] [blame]
h2. Deploy as a plain Blueprint XML file
ServiceMix ${servicemix.version} supports the deployment of plain Blueprint XML files, automatically creating and starting the Blueprint container from the XML file.
In order to leverage this feature to create and start Camel routes, drop a file with this syntax in the {{$SERVICEMIX_HOME/deploy}} folder:
{pygmentize:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<!-- add Camel routes, interceptors,... here -->
</camelContext>
</blueprint>
{pygmentize}
h3. An example
Just create a new XML file in the deploy folder with the code below to start a route to copy files from one directory to another.
{pygmentize:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="file:input"/>
<log message="Copying ${file:name} to the output directory"/>
<to uri="file:output"/>
</route>
</camelContext>
</blueprint>
{pygmentize}