Hi David, breeden wrote:
Hi,
I'm writing a component with a dependency on a 3rd-party JAR. I've installed the JAR in my local repository and added the dependency in the component's POM, and everything builds fine. However, when I add the component to my XWiki install (on the same machine) and try to start it up, I get a NoClassDefFound error.
What is the standard way to write a component with 3rd-party dependencies?
Checkout the Maven Assembly Plugin ( http://maven.apache.org/plugins/maven-assembly-plugin/usage.html ) . They say something about a self-contained jar (jar-with-dependencies). Also, search the web, you might have to configure the maven jar plugin to properly generate the classpath in the manifest file. Hope this helps, Marius
Thanks!
~David