title: How to use a maven 1 repository with maven 2?
body: <p>I am having problem building my project (using maven 2) which references some jars from a maven 1 repository.</p>
  
  <p>The scenario: My company has a private maven 1 repository that has the following info:</p>
  
  <pre><code>&lt;url&gt;http://my-company-maven1-repo/maven-repository&lt;url&gt;
  </code></pre>
  
  <p>It has the layout of:</p>
  
  <pre><code>   maven-repository
                |_repository
                       |_ ....
                       |_ ....
                       |_vectorgraphics
                                |_jars
                                    |_freehep_swing-2.0.3.jar
                                    |_freehep_io-2.0.2.jar
  </code></pre>
  
  <p>What I have tried:
   1. Following the guide here: <a href="http://maven.apache.org/guides/mini/guide-using-m1-repos-with-m2.html" rel="nofollow">relevant maven official docs</a>
      My mvn2 pom.xml:</p>
  
  <pre><code>&lt;repository&gt;
    &lt;snapshots&gt;
      &lt;enabled&gt;true&lt;/enabled&gt;
    &lt;/snapshots&gt;
    &lt;id&gt;my-repo&lt;/id&gt;        &lt;-- I made up a temporary id/name
    &lt;name&gt;my_repo&gt;&lt;/name&gt;
    &lt;url&gt;http://my-company-maven1-repo/maven-repository&lt;url&gt;
    &lt;layout&gt;
  &lt;repository&gt;
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;vectorgraphics&lt;/groupId&gt;
      &lt;artifactId&gt;freehep-swing&lt;/artifactId&gt;
      &lt;version&gt;2.0.3&lt;/version&gt;
      &lt;scope&gt;jar&lt;/scope&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>The result was weird, my company's maven1 repo was completely <em>ignored</em>. Instead, mvn2 attempted to download the jar from "maven2 central":</p>
  
  <pre><code>Downloading http://repo1.maven.org/maven2/vectorgraphics/freehep-swing/2.0.3/freehep-swing-2.0.3.pom 
  </code></pre>
  
  <p>And the resulted freehep-swing-2.0.3.pom (in my local .m2/repository/) has the following errors:</p>
  
  <pre><code>legacy-http\://my-company-maven1-repo/maven-repository/.lastUpdated=1305430120039
  http\://my-company-maven1-repo/maven-repository/.error=Could not transfer artifact vectorgraphics\:freehep-swing\:pom\:2.0.3 from/to my-repo (http\://my-company-maven1-repo/maven-repository)\: No connector available to access repository my-repo (http\://my-company-maven1-repo/maven-repository) of type legacy using the available factories AsyncRepositoryConnectorFactory, WagonRepositoryConnectorFactory
  http\://repo1.maven.org/maven2/.error=
  http\://repo1.maven.org/maven2/.lastUpdated=1305430120281
  </code></pre>
  
  <p>If anyone can point out to me how to fetch that freehep_swing-2.0.3.jar from the maven1 repository (with layout shown above), I would really really appreciate that.</p>
  
  <p>Thanks, </p>
  
  <p>Tung</p>