How to configure multiple repositories in Maven rightly

Viewed 17

I need to add fast-md5 to dependencies which lays at https://repo.spring.io/plugins-release/, so I configure settings.xml like

  <profiles>
    <profile>
      <id>main</id>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>centralx</id>
          <name>Central Repository</name>
          <url>https://repo.maven.apache.org/maven2</url>
        </repository>
        <repository>
          <id>spring</id>
          <url>https://repo.spring.io/plugins-release/</url>
        </repository>
      </repositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>main</activeProfile>
  </activeProfiles>

But now all dependencies are missing. The error message is

Missing artifact commons-io:commons-io:jar:2.5

So How to configure multiple repositories?

0 Answers
Related