Codex unable to access java maven repository

Okay, seems like we need to use correct proxy. Here is a small startup-script that installs dependencies using maven 3.9.9! Same can of course be done using mvnw, this is just simplified (and not yet fully optimised, more a proof of concept):

#!/bin/sh

version=3.9.9
url="https://dlcdn.apache.org/maven/maven-3/${version}/binaries/apache-maven-${version}-bin.tar.gz"
echo $url
wget $url

sleep .4

tarFile="apache-maven-${version}-bin.tar.gz"
echo $tarFile
sudo tar -xvf $tarFile -C /opt/

export PATH=/opt/apache-maven-${version}/bin:$PATH
echo -e "\nPATH=\"/opt/apache-maven-${version}/bin:\$PATH\"" >> ~/.profile

mkdir -p ~/.m2 && cat > ~/.m2/settings.xml <<EOF
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                              https://maven.apache.org/xsd/settings-1.0.0.xsd">
</settings>
EOF

sed -i '/<\/settings>/ i\
  <proxies>\
    <proxy>\
      <id>defaultProxy</id>\
      <active>true</active>\
      <protocol>http</protocol>\
      <host>proxy</host>\
      <port>8080</port>\
    </proxy>\
    <proxy>\
      <id>defaultSecureProxy</id>\
      <active>true</active>\
      <protocol>https</protocol>\
      <host>proxy</host>\
      <port>8080</port>\
    </proxy>\
  </proxies>' ~/.m2/settings.xml
mvn dependency:go-offline -X