Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 60904 invoked from network); 17 Jun 2009 06:20:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jun 2009 06:20:53 -0000 Received: (qmail 22156 invoked by uid 500); 17 Jun 2009 06:21:05 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 22080 invoked by uid 500); 17 Jun 2009 06:21:04 -0000 Mailing-List: contact dev-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 dev@camel.apache.org Received: (qmail 22070 invoked by uid 500); 17 Jun 2009 06:21:04 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 22067 invoked by uid 99); 17 Jun 2009 06:21:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2009 06:21:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2009 06:21:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 55538234C044 for ; Tue, 16 Jun 2009 23:20:35 -0700 (PDT) Message-ID: <668920726.1245219635330.JavaMail.jira@brutus> Date: Tue, 16 Jun 2009 23:20:35 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-1708) Allow for the selection of Routes during package scan using Ant like Path matching In-Reply-To: <2024855179.1245031115773.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-1708: ------------------------------- Priority: Major (was: Minor) Fix Version/s: 2.0.0 > Allow for the selection of Routes during package scan using Ant like Path matching > ---------------------------------------------------------------------------------- > > Key: CAMEL-1708 > URL: https://issues.apache.org/activemq/browse/CAMEL-1708 > Project: Apache Camel > Issue Type: Improvement > Components: camel-spring > Affects Versions: 2.0-M1 > Reporter: Stephen Gargan > Assignee: Claus Ibsen > Fix For: 2.0.0 > > Attachments: core-patch.txt, patch.txt, patch.txt, spring-patch.txt > > > Attached is a patch to allow for Routes to be included and excluded using ant like path patterns. Packages to be scanned are supplied as ususal, but whether the Route classes discovered in these packages are included is now also controlled by sets of include and exclude filters. > This mechanism is defined as a subelement of the CamelContext definition in Spring context as follows. > > > org.apache.camel.spring.config.scan > **/*Excluded* > **/*Included* > > .... > > It leverages Spring's AntPathMatcher to match fully qualified class names against the supplied patterns. The existing definition has been deprecated and will emit a log message suggesting the new mechanism. > This patch also includes code to allow Routes to be selectively excluded via class matching at test time. i.e. > public class RouteExcludingSpringTest extends SpringTestSupport { > @Override > protected AbstractXmlApplicationContext createApplicationContext() { > return new ClassPathXmlApplicationContext(new String[] {"routes-context.xml"}, getRouteExcludingApplicationContext()); > } > .... > @Override > protected Class excludeRoute() { > return MyExcludedRouteBuilder.class; > } > } > I hope you can find this usefull. I'll be happy to make any changes you might suggest. > rgds, > Stephen -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.