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.
Your description after "but" was cut off so we're not sure what the problem is . Also I recommend following "Maven the Definitive Guide", the free online PDF (and hard cover book) by Sonatype who are pretty much the creators of Maven