Hi all,
Currently my application was simple core
java and hibernate which was non-compatible with the
maven directory structure. I had to change my project to a maven project.
I had one Java project A which used another Java project B to create a fat jar. Previously I used the eclipse fat jar plugin in which all the dependencies including Java project B where getting included as jar inside the lib folder of Java project A's jar.
Now i have created one parent project and included the Java project A and Java project B as modules inside it. Its building and the jars are created, but Java project B's compiled jar and other dependencies are not inside Java project A's jar now the same way they used to be earlier. So now if i execute my Java project A's jar, it throws error as class files for Java project B and other dependencies are not found in the class path. I want one single jar that's portable and there should be no need to set classpath at client's environment.
I have used the following links with limited success.
http://www.synthesisstudios.com/blog/2006/08/18/using-maven2-to-build-a-single-stand-alone-jar-file/
http://www.javaworld.com/javaworld/jw-12-2005/jw-1205-maven.html
http://www.thekua.com/atwork/2008/10/generating-a-single-fat-jar-artifact-from-maven/
http://gabrito.com/post/building-one-big-fat-jar-file
My Parent POM :
Module A's POM :
ModuleB's pom:
Please guide and help