Reputation: 31
I wanted to export a project from Eclipse with the Maven plugin with
clean package
The project has several dependencies, one from my workspace, and several fom e.g. Apache. The export took place, the .jar file was created. I added the main file entry to manifest.mf manually. When i tried to run the jar, i got an error message:
no calssDeffoundError: com.apache.org.common.ApplicationCOntxt. ...
Could not find main class hu.bz.test.Main.
How can i export a jar file with the dependencies using Maven?
Upvotes: 2
Views: 8757
Reputation: 1165
Create jar by using maven assembly plugin and its jar-with-dependencies configuration -> http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies
Upvotes: 1