Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A4519E2B for ; Wed, 14 Dec 2011 22:08:00 +0000 (UTC) Received: (qmail 74926 invoked by uid 500); 14 Dec 2011 22:08:00 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 74903 invoked by uid 500); 14 Dec 2011 22:08:00 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 74896 invoked by uid 99); 14 Dec 2011 22:08:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 22:08:00 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 22:07:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 04F8D113F29 for ; Wed, 14 Dec 2011 22:07:31 +0000 (UTC) Date: Wed, 14 Dec 2011 22:07:31 +0000 (UTC) From: "Daniel Gredler (Updated) (JIRA)" To: issues@camel.apache.org Message-ID: <810311436.13010.1323900451021.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1138372592.12981.1323900092147.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAMEL-4779) Make Ant path matching in file / FTP component easier to use MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Gredler updated CAMEL-4779: ---------------------------------- Attachment: ant-path-filter.patch > Make Ant path matching in file / FTP component easier to use > ------------------------------------------------------------ > > Key: CAMEL-4779 > URL: https://issues.apache.org/jira/browse/CAMEL-4779 > Project: Camel > Issue Type: Improvement > Components: camel-core, camel-spring > Affects Versions: 2.8.3 > Reporter: Daniel Gredler > Priority: Minor > Attachments: ant-path-filter.patch > > > The existing codebase has an implicit optional dependency from camel-core to camel-spring; camel-core contains the class AntPathMatcherGenericFileFilter, which internally uses camel-spring's SpringAntPathMatcherFileFilter class via runtime classpath checks and reflection. The reason that SpringAntPathMatcherFileFilter is in camel-spring is that it uses Spring's AntPathMatcher class internally. Interestingly, there is already an AntPathMatcher class with an API very similar to Spring's class in the camel-core-xml module. > This patch moves camel-core-xml's AntPathMatcher into camel-core, removes the classpath and reflection magic in camel-core's AntPathMatcherGenericFileFilter class, and adds a new class to camel-core named GenericFileFilterConverter, which automagically converts strings to ant path file filters. The patch also adds some unit tests. > The end result is that Camel users can now use ant path matching with the file and FTP components without having to add a dependency on camel-spring, and Camel users can specify the ant path expression to use directly in the component querystring, rather than having to go through the work of registering an additional file filter instance in the registry (although this is only true when the user only needs to specify a single include path, which is a very common use case). For example: > from("file://target/blah?recursive=true&filter=**/*.txt") > .to(...); > Instead of: > from("file://target/blah?recursive=true&filter=#myTxtFilter") > .to(...); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira