title: MavenError: Failed to execute goal on project: Could not resolve dependencies In Maven Multimodule project
body: <p>I am trying to create a maven multi-module project. the project is created successfully but when I am trying to use one module as a dependency of another module, it throws an exception. When I create a module using eclipse, I was selecting packaging as a jar, but when the module is created, the packaging tag was not mention in child pom.xml and I manually insert the packaging tag as a jar. 
  following is my parent <code>pom.xml</code>: </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;groupId&gt;com.netsol&lt;/groupId&gt;
  &lt;artifactId&gt;empirecl&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  -------------------------
  &lt;modules&gt;
      &lt;module&gt;empirecl-web&lt;/module&gt;
      &lt;module&gt;empirecl-dao&lt;/module&gt;
      &lt;module&gt;empirecl-service&lt;/module&gt;
      &lt;module&gt;empirecl-api&lt;/module&gt;
  &lt;/modules&gt;
  </code></pre>
  
  <p>Dao Child Module: </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;parent&gt;
      &lt;groupId&gt;com.netsol&lt;/groupId&gt;
      &lt;artifactId&gt;empirecl&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;
  &lt;/parent&gt;
  &lt;artifactId&gt;empirecl-dao&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;empirecl-dao&lt;/name&gt;
  ------------------------
  </code></pre>
  
  <p>Service Child Module: </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;parent&gt;
      &lt;groupId&gt;com.netsol&lt;/groupId&gt;
      &lt;artifactId&gt;empirecl&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;
  &lt;/parent&gt;
  &lt;artifactId&gt;empirecl-service&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;empirecl-service&lt;/name&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.netsol&lt;/groupId&gt;
          &lt;artifactId&gt;empirecl-dao&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;type&gt;jar&lt;/type&gt;
      &lt;/dependency&gt;
  ------------------------------------------
  </code></pre>
  
  <p>The Dao module maven clean and install successfully, but when i trying to use service module, it will generate an following exception: </p>
  
  <pre><code>[ERROR] Failed to execute goal on project empirecl-service: Could not resolve dependencies for project com.netsol:empirecl-service:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.netsol:empirecl-dao:jar:0.0.1-SNAPSHOT: Failed to read artifact descriptor for com.netsol:empirecl-dao:jar:0.0.1-SNAPSHOT: Could not find artifact com.netsol:empirecl:pom:0.0.1-SNAPSHOT -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project empirecl-service: Could not resolve dependencies for project com.netsol:empirecl-service:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.netsol:empirecl-dao:jar:0.0.1-SNAPSHOT
  </code></pre>
  
  <p>I am trying the find to solution from web, but still the solution is not found. In eclipse when i open the <code>Dependency Hierarchy</code> of service module, it shown the DAO module as a folder not jar. below is the screen shot of <code>Dependency Hierarchy</code> of service module. </p>
  
  <p><img src="https://i.stack.imgur.com/hd7mD.png" alt="enter image description here"></p>