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

Maven pom resolving does not respect a 301 permanent redirect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.2.1
    • None
    • Dependencies
    • None

    Description

      When an attempt is made to depend upon the following dependency:

      com/sun/tools/xjc/maven2/maven-jaxb-plugin/1.1/maven-jaxb-plugin-1.1.pom

      Instead of downloading the pom, a 301 Moved Permanently is saved in it's place. This breaks all maven builds on the particular machine:

      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>
      <title>301 Moved Permanently</title>
      </head><body>
      <h1>Moved Permanently</h1>
      <p>The document has moved <a href="http://download.java.net/maven/1/com.sun.tools.xjc.maven2/poms/maven-jaxb-plugin-1.1.pom">here</a>.</p>
      <hr>
      <address>Apache Server at maven-repository.dev.java.net Port 443</address>
      </body></html>
      

      This looks like a regression since v2.2.0, as another machine running v2.2.0 downloads the pom for the above artifact correctly.

      This is what it looks like when it breaks:

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error building POM (may not be this project's POM).

      Project ID: com.sun.tools.xjc.maven2:maven-jaxb-plugin
      POM Location: /home/chandler/minfrin/.m2/repository/com/sun/tools/xjc/maven2/maven-jaxb-plugin/1.1/maven-jaxb-plugin-1.1.pom

      Reason: Not a v4.0.0 POM. for project com.sun.tools.xjc.maven2:maven-jaxb-plugin at /home/chandler/minfrin/.m2/repository/com/sun/tools/xjc/maven2/maven-jaxb-plugin/1.1/maven-jaxb-plugin-1.1.pom

      Attachments

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              minfrin Graham Leggett
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: