See https://unix.stackexchange.com/questions/30046/logging-outgoing-connections-as-they-happen for answers how to trace network connections by process.
But in case of Maven, most connections are probably to check the status of SNAPSHOT
dependencies.
To fix those, you should set up a Maven proxy (like Nexus) in your network and then tell Maven to resolve all dependencies via said proxy. That should reduce external connectivity to almost 0.
Also mvn -X
(enable debug mode) should help. Write the output to a log file and grep for http:
.