Maven
  1. Maven
  2. MNG-3652

set a user agent for Maven HTTP requests

    Details

      Description

      Apache Maven/2.1-SNAPSHOT

        Issue Links

          Activity

          Brett Porter created issue -
          Brett Porter made changes -
          Field Original Value New Value
          Fix Version/s 2.1-alpha-1 [ 13143 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Brett Porter [ brettporter ]
          Hide
          Brett Porter added a comment -

          ported to the 2.0.x branch

          Show
          Brett Porter added a comment - ported to the 2.0.x branch
          Brett Porter made changes -
          Fix Version/s 2.0.10 [ 14112 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MDOCCK-13 [ MDOCCK-13 ]
          Hide
          John Casey added a comment -

          I revised this for 2.0.10 (needs to be propagated to 2.0.x and 2.1.x branches still), and the revision works with all wagon classes that have a setHttpHeaders method and where the protocol.startsWith( "http" )...it also avoids the need for an improved shade plugin to merge component configurations.

          That was in: https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.10-RC, revId: 678784

          Also, I revised the User-Agent integration test to setup a small ServerSocket and record the HTTP headers that were sent from WagonManager.getArtifact(..) directed at that server socket. I then compare this User-Agent header to information collected by the plugin that triggers the WagonManager call, and written out to the touch file. This information includes maven version (since the System property "maven.version" isn't present when the unit test is run directly using the -Dtest=... surefire parameter), java version, O/S name, and O/S version.

          The User-Agent string itself has also been improved to be more consistent with the values used by other engines. See:

          http://www.user-agents.org/index.shtml?moz

          for examples.

          Show
          John Casey added a comment - I revised this for 2.0.10 (needs to be propagated to 2.0.x and 2.1.x branches still), and the revision works with all wagon classes that have a setHttpHeaders method and where the protocol.startsWith( "http" )...it also avoids the need for an improved shade plugin to merge component configurations. That was in: https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.10-RC , revId: 678784 Also, I revised the User-Agent integration test to setup a small ServerSocket and record the HTTP headers that were sent from WagonManager.getArtifact(..) directed at that server socket. I then compare this User-Agent header to information collected by the plugin that triggers the WagonManager call, and written out to the touch file. This information includes maven version (since the System property "maven.version" isn't present when the unit test is run directly using the -Dtest=... surefire parameter), java version, O/S name, and O/S version. The User-Agent string itself has also been improved to be more consistent with the values used by other engines. See: http://www.user-agents.org/index.shtml?moz for examples.
          Hide
          John Casey added a comment -

          BTW, the updated integration test was committed in revId: 678785

          Show
          John Casey added a comment - BTW, the updated integration test was committed in revId: 678785
          Hide
          John Casey added a comment -

          Adding fix-for for both 2.0.10 and 2.1.0-M1, since 2.1.0-M1 will actually be released first and may not incorporate all of the eventual issue fixes released in 2.0.10.

          Show
          John Casey added a comment - Adding fix-for for both 2.0.10 and 2.1.0-M1, since 2.1.0-M1 will actually be released first and may not incorporate all of the eventual issue fixes released in 2.0.10.
          John Casey made changes -
          Fix Version/s 3.0-alpha-1 [ 13143 ]
          Fix Version/s 2.1.0-M1 [ 14503 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-4211 [ MNG-4211 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Link This issue relates to MDOCCK-13 [ MDOCCK-13 ]
          Mark Thomas made changes -
          Workflow jira [ 12714055 ] Default workflow, editable Closed status [ 12753710 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Link This issue relates to MDOCCK-13 [ MDOCCK-13 ]
          Mark Thomas made changes -
          Workflow jira [ 12950673 ] Default workflow, editable Closed status [ 12986900 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          19s 1 Brett Porter 04/Jul/08 00:32

            People

            • Assignee:
              Brett Porter
              Reporter:
              Brett Porter
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development