Notes
This article was translated by GPT-5.4. The original is here.
When I had Codex Web work on a Java (Gradle) repository, the build failed. I figured out how to fix it, so I am leaving a note here.
Settings
The solution was posted on the OpenAI Developer Community forum.
Open Codex environment settings and select the environment you use for Java repository development. Click "Edit" and paste the following script into "Setup script."
1#!/usr/bin/env bash2set -euxo pipefail # fail hard, fail fast, print everything34# 1. System update & required packages5apt-get update -qq6apt-get install -yqq maven78# 2. Verify the install (good for debugging)9mvn -v1011# 3. Configure Maven to use the Codex proxy12mkdir -p ~/.m213cat > ~/.m2/settings.xml <<'EOF'14<settings>15<proxies>16<proxy>17<id>codexProxy</id>18<active>true</active>19<protocol>http</protocol>20<host>proxy</host>21<port>8080</port>22</proxy>23</proxies>24</settings>25EOF
I removed step 4 from the referenced post. If I left it in, it caused an error instead. With this, I can now do Java development from Codex Web 🎉

