We are setting up server for maven builds. Our corporate servers are behind the firewall and do not allow internet access. For maven build I asked my IT team to allow access to repo1.maven.org. IT team allow access based on the IP address and Port. Recently I noticed that ip address of repo1.maven.org keeps on changing. Few days back it was 93.184.215.223 but today it has changed to 68.232.45.223. We have been not able to download the dependencies due to dynamic change in the IP address. I can not ask my IT team to keep on changing ip address in the firewall. Is there a pool of IP addresses reserved for maven central repository from which they are picked? What should I do?
I am sure this question is more for the Maven Central guys, but I wonder if you can really rely on a pool of IPs even if it exists. I am sure that the infrastructure will be very dynamic as it serves the libraries to the whole world!
I found this IP range for Maven Central when searching for the same. This may change very quickly without any notice, or could even be already outdated.
You could also try a mirror of central which maybe served through a single IP and use it. Again no guarantees that the IP will never change.
Alternatively, you could setup a Maven Repository proxy locally and host it in some sort of a DMZ. Your network guys can either allow all machines from DMZ, or this specific machine (using IP) to access everything outgoing HTTP, which will in-turn allow it to access Maven Central. All your developers will use internal repository as a mirror. This approach will also save your network bandwidth as over time, there will be lesser requests going out to central because of libraries being cached locally.
I recon (3) is the more correct solution although I know its not straight forward.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With