问题
I have been trying to set up an Enterprise repository for our company using Archiva. While the installation was quite simple, I am now stuck at issue where the Archiva could not reach out to the Central Repository via our corporate proxy.
I did the following to setup the Proxy (Screen shots below)
- Added a Network Proxy via the Apache UI.
- Updated the ProxyConnector.
- Updated the configuration for Central repository
I still see the Remote Check fails.
Any insights?
I did double check the Proxy configuration and also used the same configuration with nexus SonaType and it works fine there.
I also made sure the NetworkProxy is in the archiva.xml file.
Updated: 06/16/2015
I updated the configuration to use https://repo.maven.apache.org/maven2 and also tried to use https and https for our network proxy.
Another thing I've noticed is that the Proxy Connector settings show "Network proxy : None" even though it is configured. (screen shots below)
回答1:
Apache Archiva 2.2.1 release IMHO has various bugs/issues regarding the UI. Check /conf/archiva.xml if the settings presented by the UI resemble/match the settings in that config file.
I encountered that the Web-Interface does not show any warnings/errors, but still the config is not updated.
Furthermore the UI shows wrong values for correctly configured settings. The popup "Proxy connector settings" is one example. It will always show "Network Proxy: none", even if one is correctly configured. Vote for the bug --> https://issues.apache.org/jira/browse/MRM-1920
回答2:
ensure you configure network proxy protocol to http or https. You must also use https://repo.maven.apache.org/maven2 (note the https)
回答3:
I've had the same problem and installed 2.2.1-SNAPSHOT.
Although the visual bug still seems to be there (clicking the button in Proxy Connectors shows Network proxy: none) the proxy is being used and the repository is working fine.
回答4:
I have managed to have it working by including this XML in the POM:
<distributionManagement>
<repository>
<id>internal</id>
<url>http://localhost:8080/archiva/repository/internal/</url>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>internal</id>
<name>Archiva Managed Internal Repository</name>
<url>http://localhost:8080/archiva/repository/internal</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
来源:https://stackoverflow.com/questions/30807232/apache-archiva-2-2-0-network-proxy-does-not-appear-to-be-working