mirror of https://github.com/apache/archiva.git
[MRM-857] set a user agent for proxy HTTP requests
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@673383 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a5636c4509
commit
38298e329e
|
@ -226,6 +226,15 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/filtered-resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<!--
|
||||
<plugin>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
user.agent=Apache Archiva/${project.version}
|
|
@ -11,4 +11,23 @@
|
|||
<constructor-arg ref="cache#url-failures-cache" type="org.codehaus.plexus.cache.Cache"/>
|
||||
</bean>
|
||||
|
||||
<bean name="wagon#http" class="org.apache.maven.wagon.providers.http.LightweightHttpWagon" scope="prototype">
|
||||
<property name="httpHeaders">
|
||||
<map>
|
||||
<entry key="User-Agent" value="${user.agent}" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="wagon#https" class="org.apache.maven.wagon.providers.http.LightweightHttpsWagon" scope="prototype">
|
||||
<property name="httpHeaders">
|
||||
<map>
|
||||
<entry key="User-Agent" value="${user.agent}" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="propertyPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="classpath:application.properties" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
|
Loading…
Reference in New Issue