Apache Archiva 2.2.0 Network Proxy does not appear to be working

百般思念 提交于 2020-01-03 18:58:49

问题


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)

  1. Added a Network Proxy via the Apache UI.
  2. Updated the ProxyConnector.
  3. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!