Welcome! Please see the About page for a little more info on how this works.

0 votes
ago in tools.build by

The autopkgtest of the tools.build package fails with:

Running tests in #{"src/test/clojure"}

Testing clojure.tools.build.tasks.test-basis
Warning: failed to load the S3TransporterFactory class
Jul 01, 2025 8:15:38 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo1.maven.org:443: Network is unreachable
[...]

The autopkgtest script debian/tests/source:

#!/bin/bash

set -ueo pipefail

cp=($(< debian/libtools-build-clojure.classpath))
test "${cp[0]}" = usr/share/java/tools.build.jar
unset cp[0] # drop it

test_cp=(src/main/clojure
         src/test/clojure
         /usr/share/java/test-runner.jar
         /usr/share/java/maven-resolver-named-locks.jar
         /usr/share/java/maven-repository-metadata-3.x.jar
         "${cp[@]}")

test_cp="$(IFS=:; echo "${test_cp[*]}")"

# Derived from ./deps.edn, and avoids a circular dep on clojure-cli
java -XX:-OmitStackTraceInFastThrow -cp "$test_cp" clojure.main \
     -m cognitect.test-runner cognitect.test-runner.api/test \
     --dir src/test/clojure --namespace-regex '.*'

The Ubuntu autopkgtest infrastructure restrict the Internet access and sets http_proxy/https_proxy.

Please support those proxy settings.

Bug-Ubuntu: https://launchpad.net/bugs/2115740

1 Answer

+1 vote
ago by
selected ago by
 
Best answer

A quote from Alex Miller that was used at least once to explain why the support isn't there:

We’re going through the Maven apis for that stuff and that’s just not how it works
[...]
tools.deps supports that via the mirror/proxy settings in settings.xml

So your script could be creating settings.xml with the right content dictated by http_proxy.

ago by
Thanks for the pointer to Maven. I'll have a deeper look at it.
ago by
Putting the proxy information into `settings.xml` worked. I tried different approaches by setting the proxy information in environment variables for Maven, but all those failed.
...