title: How to package dependency JARs as part of project JAR using maven
body: <p>I have 2 maven projects</p>
  
  <p>1) My Utils Project - imports datecalc-common as a dependency, contains my custom utility classes. Note that it doesn't have a main class.</p>
  
  <p>2) My Main Project - imports 'My Utils Project' as a dependency.</p>
  
  <p><a href="https://i.stack.imgur.com/59Jdp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/59Jdp.png" alt="enter image description here"></a>
  'My Main Project' shows the error 'Cannot find class HolidayCalculator'.</p>
  
  <p>My Utils Project-pom.xml is given below. </p>
  
  <p><strong><em>How do I modify it so that the dependency jars are included as part of 'My Utils Project'.jar ?</em></strong></p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;properties&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;      
      &lt;/properties&gt;   
      &lt;groupId&gt;com.mycompany.mycommoncode&lt;/groupId&gt;
      &lt;artifactId&gt;myutilsjar&lt;/artifactId&gt;
      &lt;version&gt;0.0.12-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;myutilsjar&lt;/name&gt;
      &lt;description&gt;Common Date Utils used by my classes&lt;/description&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.8.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;5.0.8.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
          &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
      &lt;version&gt;5.0.8.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
    &lt;dependency&gt;
                      &lt;groupId&gt;net.objectlab.kit&lt;/groupId&gt;
                      &lt;artifactId&gt;datecalc-common&lt;/artifactId&gt;
                      &lt;version&gt;1.4.0&lt;/version&gt;
                      &lt;/dependency&gt;
                      &lt;dependency&gt;
                      &lt;groupId&gt;net.objectlab.kit&lt;/groupId&gt;
                      &lt;artifactId&gt;datecalc-jdk8&lt;/artifactId&gt;
                      &lt;version&gt;1.4.0&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.uuid&lt;/groupId&gt;
              &lt;artifactId&gt;java-uuid-generator&lt;/artifactId&gt;
              &lt;version&gt;3.1.4&lt;/version&gt;
           &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;javax.validation&lt;/groupId&gt;
      &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
      &lt;version&gt;2.0.1.Final&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
      &lt;distributionManagement&gt;
          &lt;snapshotRepository&gt;
          &lt;id&gt;snapshots&lt;/id&gt;
          &lt;url&gt;my maven url&lt;/url&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;       
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>NOTE: I DO NOT want to use 'shade' plugin. Is there any other way of doing this?</strong></p>