The following code sample is from what I understand the most basic "Hello World" Apache-Camel example. However, I am having difficulties with it.
When I run this project nothing happens; the files remain in the original location and my IDE does not return an exception. I would like to move all .txt files from one directory to another. The directories mentioned do exist on my machine as well. (C:/camels/inner)(C:/testing)
I feel there is a foolish mistake someplace in this code, any help would be appreciated.
package CamelProject;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args ) throws Exception
{
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder()
{
public void configure() throws Exception
{
from("file:C:\\testing?delete=true&include=.*.txt").to("file:C:\\camels\\inner");
}
});
context.start();
Thread.sleep(10000);
context.stop();
}
}