exec:java ClassNotFoundException

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

exec:java ClassNotFoundException

Archibald, James

I'm getting a ClassNotFoundException when using the exec:java plugin.

Here is a description:








I have two maven modules, Module1 contains a spring xml file that imports the spring file from Module2



<!-module1 spring file -->




<import resources=3D"classpath:/META-INF/spring/module2.xml"/>





Module2 contains a bean calls com.foo.Foo



<!-module2 spring file -->




<bean class=3D"com.foo.Foo"/>





Module1 is packaged as a jar file while module2 is packaged as a bundle using the maven-bundle-plugin.



Module2 has an export package as follows:






When I run Module1 using the mvn exec:java plugin I get a class not found on com.foo.Foo. When I removed the ! from the <Export-Package> everything works and I don't get a class not found exception.



Since I'm not running in an OSGi environment I don't see why this would occur. Or am I wrong?






Jamie Archibald


GD Canada




[hidden email]


The information contained in this e-mail message is PRIVATE. It may contain confidential information and may be legally privileged. It is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any dissemination, distribution or reproduction of this communication is strictly prohibited. If the intended recipient(s) cannot be reached or if a transmission problem has occurred, please notify the sender immediately by return e-mail and destroy all copies of this message.
Thank you.