Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 22545 invoked from network); 3 Dec 2008 09:14:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2008 09:14:35 -0000 Received: (qmail 41504 invoked by uid 500); 3 Dec 2008 09:14:38 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 41440 invoked by uid 500); 3 Dec 2008 09:14:38 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 41429 invoked by uid 99); 3 Dec 2008 09:14:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 01:14:38 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [81.169.137.254] (HELO h57067.soa-knowledge.net) (81.169.137.254) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 09:13:08 +0000 Received: from localhost (localhost [127.0.0.1]) by h57067.soa-knowledge.net (Postfix) with ESMTP id 177D9880252; Wed, 3 Dec 2008 10:13:54 +0100 (CET) Received: from h57067.soa-knowledge.net ([127.0.0.1]) by localhost (h57067 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05390-02; Wed, 3 Dec 2008 10:13:52 +0100 (CET) Received: from [127.0.0.1] (unknown [88.133.4.110]) by h57067.soa-knowledge.net (Postfix) with ESMTP id 518EE8801C3; Wed, 3 Dec 2008 10:13:52 +0100 (CET) Message-ID: <49364DCD.3090908@soa-knowledge.net> Date: Wed, 03 Dec 2008 10:13:49 +0100 From: Andreas Gies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Maven Users List CC: sfritz@progress.com Subject: Strange Class Not found Exception in selfmade plugin Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at soa-knowledge.net X-Virus-Checked: Checked by ClamAV on apache.org Hello Maven Gurus, I have developed a number of plugins that build a deployment package for our ESB. Now I am currently developing a series of plugins that shall execute in the pre-integration-test, integration-test and post-integration-test lifecycle phases. The plan is to set up a server runtime and start it up in pre-integration-test, run the test cases in integration-test and shut down the server runtime again in post-integration-test. We have decided to set up a fresh runtime for each integration test as we want to test the deployment behaviour as well. To my question: The plugin that I want to execute in the pre-integration-test comes with a classNotFoundException for a class that is definitely in the dependencies of my plugin. I have registered my plugin for the lifecycle execution in the components.xml as follows: org.apache.maven.lifecycle.mapping.LifecycleMapping esb org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping com.sonicsw.maven.plugins:ESBPlugin:1.0-SNAPSHOT:esb-export org.apache.maven.plugins:maven-resources-plugin:testResources org.apache.maven.plugins:maven-compiler-plugin:testCompile org.apache.maven.plugins:maven-surefire-plugin:test com.sonicsw.maven.plugins:ESBPlugin:1.0-SNAPSHOT:esb-package com.sonicsw.maven.plugins:ESBPlugin:1.0-SNAPSHOT:prepare-it org.apache.maven.plugins:maven-surefire-plugin:test org.apache.maven.plugins:maven-install-plugin:install org.apache.maven.plugins:maven-deploy-plugin:deploy When I execute mvn integration-test the plugin is executed as expected. As mentioned, when bein executed as a maven plugin the plugin fails with a class not found exception.. I have examined the depenency tree of my plugin and can clearly see, that the jar file containing the class is in there. When I try to execute the plugin standalone (without the lifecycle) the same error occurs. Also, when I run a JUnit test case against the plugin from within Eclipse (using the m2eclipse classpath container resolved via the dependencies), the plugin code executes just fine. Therefore I assume, that I am running into a classloading issue within maven itself. I have searched the documentation and JIRA for similar issues, but was unable to find something. Any pointers into existing issues, documenation or hints how I could narrow down the issue further are greatly appreciated. Thanks in advance Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org