Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-2633

Unexpected behaviour <repository> settings in POM.xml.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.4
    • None
    • Dependencies
    • None
    • - Win XP
      - JDK 1.5

    Description

      Included a POM file which defines two repositories : a non-existing one and the central M2 repository.

      There is no local settings file ~/.m2/setting.xml and the complete folder ~/.m2/repository/junit is deleted.

      Now if I run 'maven install', I get the following :

      $mvn install
      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building Maven Quick Start Archetype
      [INFO] task-segment: [install]
      [INFO] ----------------------------------------------------------------------------
      Downloading: http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom
      145b downloaded
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:compile]
      [INFO] No sources to compile
      [INFO] [resources:testResources]
      [INFO] Using default encoding to copy filtered resources.
      Downloading: http://blieblie/junit/junit/3.8.1/junit-3.8.1.jar
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.

      Error transferring file
      junit:junit:jar:3.8.1

      from the specified remote repositories:
      central (http://repo1.maven.org/maven2),
      mybidonrepo (http://blieblie)
      Path to dependency:
      1) testgroup:testartifact:jar:1.0-SNAPSHOT
      2) junit:junit:jar:3.8.1

      Caused by I/O exception: Server returned HTTP response code: 503 for URL: http://blieblie/junit/junit/3.8.1/junit-3.8.1.jar

      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 17 seconds
      [INFO] Finished at: Thu Oct 26 18:53:06 CEST 2006
      [INFO] Final Memory: 3M/6M
      [INFO] ------------------------------------------------------------------------

      Questions:
      1. Is it normal that retrieving the artifact (jar) completely fails the build? M2 could still try to connect to
      http://repo1.maven.org/maven2 to retrieve the artifact.
      2. why is the POM file directly retrieved from http://repo1.maven.org/maven2 (no attempt to retrieve it from http://blieblie)?

      Attachments

        1. pom.xml
          0.9 kB
          Davy Toch

        Issue Links

          Activity

            People

              carlos Carlos Sanchez Gonzalez
              dtoch Davy Toch
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: