Search code examples
apachemavenarchiva

Apache Archiva Maven


Not able to download artifacts from central maven repository.

<mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
    <mirror>
        <id>internal</id>
        <name>Proxy Cache - Internal Repository</name>
        <url>http://localhost:8080/archiva/repository/internal</url>
        <mirrorOf>*</mirrorOf>
    </mirror>

  </mirrors>

Solution

  • Please add information, like error log, and what you really need !

    As a beggining, does you archiva repository needs credentials. If true, consider adding them like this :

      <!-- servers
       | This is a list of authentication profiles, keyed by the server-id used within the system.
       | Authentication profiles can be used whenever maven must make a connection to a remote server.
       |-->
      <servers>
            <server>
                <id>internal</id>
                <username>username</username>
                <password>password</password>
            </server>
      </servers>