Apache Archiva 2.2.0 Network Proxy does not appear to be working

1.7k views Asked by At

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. enter image description here

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)

enter image description here

enter image description here

4

There are 4 answers

2
Olivier Lamy On

ensure you configure network proxy protocol to http or https. You must also use https://repo.maven.apache.org/maven2 (note the https)

2
ochavoya On

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>
2
JSamir On

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.

0
Gernot On

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