Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 27104 invoked from network); 15 Jun 2009 16:22:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jun 2009 16:22:47 -0000 Received: (qmail 72821 invoked by uid 500); 15 Jun 2009 16:22:58 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 72778 invoked by uid 500); 15 Jun 2009 16:22:58 -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 72768 invoked by uid 500); 15 Jun 2009 16:22:58 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 72765 invoked by uid 99); 15 Jun 2009 16:22:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 16:22:58 +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; Mon, 15 Jun 2009 16:22:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 53074234C045 for ; Mon, 15 Jun 2009 09:22:35 -0700 (PDT) Message-ID: <413406350.1245082955334.JavaMail.jira@brutus> Date: Mon, 15 Jun 2009 09:22:35 -0700 (PDT) From: "Stephen Gargan (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 ] Stephen Gargan updated CAMEL-1708: ---------------------------------- Priority: Minor (was: Major) > 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 > Priority: Minor > Attachments: 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.