Guide to using Maven 1.x repositories with Maven 2.x

When you are migrating from Maven 1.x to Maven 2.x you will first be trying to convert your build and to make this easier we have provided a way for you to use your existing Maven 1.x repository so that you don't have to convert your repository before trying to migrate your projects. To use a Maven 1.x repository with your Maven 2.x project you need to specify this in your POM as follows:

<project>
  ...
  <repositories>
    <repository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>my-m1-repository</id>
      <name>Maven 1.x Repository</name>
      <url>http://repostory.mycompany.com/maven1</url>
      <layout>legacy</layout>
    </repository>
  </repositories>
  ...
</project>

Enabling the snapshots is important as Maven 2.x makes a distinction between repositories that contain snapshots and those that don't. In Maven 1.x there is no distinction, so setting snapshots to true will give you the Maven 1.x style repository behaviour while using Maven 2.x.