maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Gies <>
Subject Strange Class Not found Exception in selfmade plugin
Date Wed, 03 Dec 2008 09:13:49 GMT
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 
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:

    <!-- Define the Life Cycle for the ESB modules. -->

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 
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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message