title: Maven - Transitive dependencies are not resolved for artifact deployed on Artifactory
body: <p>I have two projects - A and B, where A is dependent on B. I package B as jar and deploy it on a maven server (artifactory), and then include that jar as a normal dependency on project A in pom file. jar file of B shows up in the Maven Dependencies of project A, but dependencies of project B are not shown in dependency hierarchy. It is causing class not found exception for dependencies of B. </p>
  
  <p>However, my project A and B and in same eclipse workspace. When I open project B, project A starts referencing the project B from the workspace instead of remote repository and everything works well.</p>
  
  <p>This question - <a href="https://stackoverflow.com/questions/2915255/maven-transitive-dependencies">Maven. Transitive dependencies</a> was closest to my problem, but dependencies of my project B are NOT optional.</p>
  
  <p>Whats going wrong here?</p>
  
  <p><strong>POM for project B</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.myapp&lt;/groupId&gt; 
    &lt;artifactId&gt;utils&lt;/artifactId&gt;
    &lt;version&gt;1.0.0-RELEASE&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;utils&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
  
  &lt;!-- Following doesn't get added to project A --&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>POM for project A</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.myapp&lt;/groupId&gt;
    &lt;artifactId&gt;core-app&lt;/artifactId&gt;
    &lt;version&gt;1.0.0-RELEASE&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;core-app&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.myapp&lt;/groupId&gt;
        &lt;artifactId&gt;utils&lt;/artifactId&gt;
        &lt;version&gt;1.0.0-RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I am using maven quickstart archetype. Project structure of my projects is (which I package as jar):</p>
  
  <pre><code>project-name
    src/main/java
    src/test/java
    pom.xml
  </code></pre>