ANT path matcher

The Camel community is pushing in new requests. Lately Ramon Buckland from down under requested the need for ANT path styles. I couldn't agree more that this is truly a nice solution to express paths.

As Camel already leverage Spring in several of our components and other parts of Camel I wanted to create a solution using Spring only, to avoid bringing in a new dependency on ANT. As Spring already have nice AntPathMatcher support for it's resources I could quite easily add it to Camel as well.

So In Camel 2.0 you can use AntPathMatcherFileFilter as a java.io.FileFilter as the filter for which files to include when consuming files using the Camel File component.

As this is a Spring'ish solution it requires camel-spring.jar. You configure it using plain Spring bean, as a Spring Bean using properties for setting includes and exclude ANT paths.

I have provided a sample in the Camel File documentation - in the section "Filtering using ANT path matcher".

Yeah even during the holidays the Camel community and roadmap is moving - it's never standing still.

No comments: