How can I change a user agent in Maven?

How can I change the user agent in Maven? I need to change this to go through the company’s firewall. I am using version 2.2.1 and I noticed an improvement in the release notes for 2.0.10:

[MNG-3652] -. Install user agent for Maven HTTP requests

+3
source share
1 answer

Brett Porter has posted a Maven HTTP Connectivity Blog , which describes how you can do this and some other funky stuff:

<server>
  <id>archiva.localhost</id>
  <configuration>
    <httpHeaders>
      <property>
        <name>User-Agent</name>
        <value>Internal-Build-System/1.0</value>
      </property>
    </httpHeaders>
  </configuration>
</server>
+6
source

Source: https://habr.com/ru/post/1720005/


All Articles