Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 94580 invoked from network); 17 Sep 2008 12:01:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Sep 2008 12:01:58 -0000 Received: (qmail 94656 invoked by uid 500); 17 Sep 2008 12:01:55 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 94639 invoked by uid 500); 17 Sep 2008 12:01:55 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 94617 invoked by uid 99); 17 Sep 2008 12:01:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2008 05:01:55 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of martin.lists@imap.cc designates 66.111.4.25 as permitted sender) Received: from [66.111.4.25] (HELO out1.smtp.messagingengine.com) (66.111.4.25) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2008 12:00:56 +0000 Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 5856B163A88 for ; Wed, 17 Sep 2008 07:58:19 -0400 (EDT) Received: from web7.messagingengine.com ([10.202.2.216]) by compute2.internal (MEProxy); Wed, 17 Sep 2008 07:58:19 -0400 Received: by web7.messagingengine.com (Postfix, from userid 99) id 384B021F23; Wed, 17 Sep 2008 07:58:19 -0400 (EDT) Message-Id: <1221652699.10588.1274447731@webmail.messagingengine.com> X-Sasl-Enc: +ump/QBUYB1wDkxTQbPhZXN+awSt33SFRHgvKJ4jKPyC 1221652699 From: "Martin Gilday" To: camel-user@activemq.apache.org Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface Subject: Camel Maven Plugin looking in test-classes Date: Wed, 17 Sep 2008 12:58:19 +0100 X-Virus-Checked: Checked by ClamAV on apache.org Hi Camel riders, We follow what I think is a fairly standard pattern where we name our test classes the same as the class under test with the suffix UnitTest or IntTest. We place this in the same package name, but under src/test/java instead of src/main/java. I have a route scanner defined as so: example.routes When I start up mvn camel:run I can see the following log lines: DEBUG org.apache.camel.util.ResolverUtil - Loading from directory: C:\workspace\projectname\target\classes\example\routes DEBUG org.apache.camel.util.ResolverUtil - Loading from directory: C:\workspace\projectname\target\test-classes\example\routes This causes a problem as it attempts to load a class in test-classes which has a super class of AbstractJUnit4SpringContextTests which in the Maven POM is defined with test depdendency scope. Therefore you get a java.lang.NoClassDefFoundError. Why is Camel scanning test classes for routes? Is there a way to prevent this other than changing the test package name? Thanks, Martin.