Dan*_*tes 3 user-agent maven-2
如何在Maven中更改用户代理?我需要能够改变它以通过公司防火墙.我使用的是2.2.1版,我注意到2.0.10发行说明有所改进:
[MNG-3652] - 为Maven HTTP请求设置用户代理.
Brett Porter发布了一篇关于配置Maven HTTP Connections的博客,该博客描述了如何做到这一点以及其他一些时髦的事情:
<server>
<id>archiva.localhost</id>
<configuration>
<httpHeaders>
<property>
<name>User-Agent</name>
<value>Internal-Build-System/1.0</value>
</property>
</httpHeaders>
</configuration>
</server>
Run Code Online (Sandbox Code Playgroud)