title: Maven: How to import dependency of type pom?
body: <p>I am trying to migrate a java application to maven. There are some dependencies which have been provided as <code>jar</code> files so far. One of these dependencies is <code>jung2</code>, which is available from the maven repository: <a href="https://mvnrepository.com/artifact/net.sf.jung/jung2/2.0.1" rel="nofollow">mvnrepository.com</a></p>
  
  <p>I need all of the provided modules and I do not understand how to declare this dependecy correctly in my <code>pom.xml</code> such that all corresponding <code>jar</code> files are downloaded and the classes are available at compile time. </p>
  
  <p>This is what my <code>pom.xml</code> file looks like right now:</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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;groupId&lt;/groupId&gt;
      &lt;artifactId&gt;myProject&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;!-- https://mvnrepository.com/artifact/net.sf.jung/jung2 --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;net.sf.jung&lt;/groupId&gt;
                  &lt;artifactId&gt;jung2&lt;/artifactId&gt;
                  &lt;version&gt;2.0.1&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt; 
  &lt;/project&gt;
  </code></pre>
  
  <p>I also tried leaving out <code>&lt;scope&gt;import&lt;/scope&gt;</code> and put the dependency into the <code>dependencies</code> section. When executing <code>mvn compile</code> or <code>mvn package</code>, error message occur that the corresponding packages do not exist.</p>
  
  <p>If I additionally add a <code>dependency</code> inside <code>dependencies</code> but outside of <code>dependencyManagement</code>, e.g. </p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;net.sf.jung&lt;/groupId&gt;
      &lt;artifactId&gt;jung2&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I receive an error about missing version. But as far as I understood, this should not be necessary due to  <code>dependencyManagement</code>? If I also add <code>&lt;version&gt;2.0.1&lt;/version&gt;</code>, then I get the following error message:</p>
  
  <p><code>Failure to find net.sf.jung:jung2:jar:2.0.1</code> </p>