Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-16359

mvn-install fails if no repo mirror is defined in settings.xml

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Duplicate
    • Fix Version/s: 4.0-rc1, 4.0
    • Component/s: Build
    • Labels:
      None
    • Platform:
      All
    • Impacts:
      None

      Description

      Running ant mvn-install on Docker (image maven:3-openjdk-11) fails because maven-ant-tasks tries to download some jars from Maven Central through HTTP instead of HTTPS. HTTP access to Central is not allowed anymore since the beginning of the year.

      If you have an https mirror defined in your Maven settings.xml, you won't notice that problem though.

      mvn-install:
      [artifact:mvn] Downloading: org/apache/maven/apache-maven/3.0.3/apache-maven-3.0.3.pom from repository central at http://repo1.maven.org/maven2
      [artifact:mvn] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.0.3/apache-maven-3.0.3.pom
      [artifact:mvn] [WARNING] Unable to get resource 'org.apache.maven:apache-maven:pom:3.0.3' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.0.3/apache-maven-3.0.3.pom
      [artifact:mvn] Downloading: org/apache/maven/apache-maven/3.0.3/apache-maven-3.0.3.pom from repository central at http://repo1.maven.org/maven2
      [artifact:mvn] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.0.3/apache-maven-3.0.3.pom
      [artifact:mvn] [WARNING] Unable to get resource 'org.apache.maven:apache-maven:pom:3.0.3' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.0.3/apache-maven-3.0.3.pom
           [null] An error has occurred while processing the Maven artifact tasks.
           [null]  Diagnosis:
           [null] 
           [null] Unable to resolve artifact: Missing:
           [null] ----------
           [null] 1) org.apache.maven:apache-maven:pom:3.0.3
           [null]   Path to dependency: 
           [null]   	1) org.apache.maven:super-pom:pom:2.0
           [null]   	2) org.apache.maven:apache-maven:pom:3.0.3
           [null] 
           [null] ----------
           [null] 1 required artifact is missing.
           [null] 
           [null] for artifact: 
           [null]   org.apache.maven:super-pom:pom:2.0
           [null] 
           [null] from the specified remote repositories:
           [null]   central (http://repo1.maven.org/maven2)
           [null] 
           [null] 
      
      BUILD FAILED
      /workspace/cassandra/build.xml:2365: The following error occurred while executing this line:
      /workspace/cassandra/build.xml:490: Unable to resolve artifact: Missing:
      ----------
      1) org.apache.maven:apache-maven:pom:3.0.3
        Path to dependency: 
        	1) org.apache.maven:super-pom:pom:2.0
        	2) org.apache.maven:apache-maven:pom:3.0.3
      
      ----------
      1 required artifact is missing.
      
      for artifact: 
        org.apache.maven:super-pom:pom:2.0
      
      from the specified remote repositories:
        central (http://repo1.maven.org/maven2)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gianluca Gianluca Righetto
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: