[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:
Brett Porter 2008-07-02 13:04:01 +00:00
parent a5636c4509
commit 38298e329e
3 changed files with 29 additions and 0 deletions

View File

@ -226,6 +226,15 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/filtered-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins> <plugins>
<!-- <!--
<plugin> <plugin>

View File

@ -0,0 +1 @@
user.agent=Apache Archiva/${project.version}

View File

@ -11,4 +11,23 @@
<constructor-arg ref="cache#url-failures-cache" type="org.codehaus.plexus.cache.Cache"/> <constructor-arg ref="cache#url-failures-cache" type="org.codehaus.plexus.cache.Cache"/>
</bean> </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> </beans>