Hello
I have a
maven WAR file that has a main class in it. I want to run this main class using command line similar to Hudson, which uses Jetty from behind
I have looked through Hudson's POM file and kind of understand how the file structure looks like (once WAR is exploded). I followed Hudson POM to set up my own project and when I export the WAR, this same structure looks fine.
Now the problem I'm having is that the main class need some dependencies (namely Log4J for logging and Jackson for JSON). These dependencies are in the WEB-INF/lib folder which the web app uses. How can I set up the main class to point to the WEB-INF/lib folder to get these dependencies.
The POM <build> section configures what the main class is and its dependencies (shown below).
Given what I have done or configured, when I run it, it gives NoClassDefFoundError, clearly it can't find the lib
How can I solve this?
POM file