title: How to import all dependencies of a jar?
body: <p>I have two java maven projects - abc in eclipse and xyz in intellij idea. They have some common jar dependencies. </p>
  
  <p>In xyz code, I need to call some code in test directory of abc. So, I converted abc into a jar and imported it inside xyz. The xyz code which calls abc methods compiles fine, but fails because jars needed by abc could not be found. Some of these missing jars are actually present in xyz, but some are not.</p>
  
  <p>How do I make xyz import all the dependencies needed by abc ? Is this an ok way to reuse code ?</p>