Repo1.maven.org's IP address continues to change

We are setting up a server to build maven. Our corporate servers are located behind the firewall and do not allow Internet access. To create maven, I asked my IT team to allow access to repo1.maven.org. The IT team allows access based on IP address and port. I recently noticed that the ip address of repo1.maven.org continues to change. A few days ago it was 93.184.215.223, but today it has changed to 68.232.45.223. We were unable to download dependencies due to dynamic IP address changes. I cannot ask my IT team to continue to change the IP address in the firewall. Is there a pool of IP addresses reserved for the maven central repository from which they are selected? What should I do?

+4
source share
2 answers

I am sure this question is more suitable for Maven Central guys, but I am wondering if you can really rely on the IP address pool even if it exists. I am sure that the infrastructure will be very dynamic, as it serves libraries for the whole world!

  • I found this IP range for Maven Central while searching for the same. This can change very quickly without any notice or even be out of date.

  • You can also try the mirror center, which can be used through a single IP address and use it. Again, there is no guarantee that the IP address will never change.

  • Alternatively, you can configure the local Maven repository and place it in some kind of DMZ. Your network guys can either allow all machines from the DMZ or this particular machine (using IP) to access all outgoing HTTP, which in turn will allow him to access Maven Central. All your developers will use the internal repository as a mirror . This approach will also save your network bandwidth, as over time there will be fewer requests sent to the central part due to localization of local libraries.

I recon (3) is a better solution, although I do not know it directly.

+2
source

It seems that at present, it is best to use the repository manager instead of setting up a mirror.

https://maven.apache.org/repository-management.html

The link above has a list of compatible tools:

Apache Archiva (open source)

CloudRepo (commercial)

JFrog Artifactory Open Source (open source)

JFrog Artifactory Pro (commercial)

Sonatype Nexus OSS (open source)

Sonatype Nexus Pro (commercial)

0
source

Source: https://habr.com/ru/post/1484332/


All Articles