How does this Ant build using the nil plugin work on Launchpad without proxy properties?

I can’t figure out how my Ant build of NetBeans is even working on Launchpad, which uses proxy servers. (I’m doing some tests for @lkishalmi, the person who builds the real NetBeans Snap for Apache.)

It is not using the Ant plugin, which sets up the proxy networking properties for Java automatically, nor is it setting up a proper ANT_OPTS environment variable itself in the override-build scriptlet. Yet it works!

Ant build of NetBeans (working without proxy properties!):

The Maven build of Maven below, on the other hand, fails unless I specifically add the Java proxy networking properties to the MAVEN_OPTS environment variable before running the mvn command. It also uses the nil plugin.

Maven build of Maven (fails without proxy properties):

Any clues to the source of this magic?

Any clues to the source of this magic?

Mystery solved! A NetBeans custom Ant task called ConfigureProxy reads and configures the proxy environment variables http_proxy and https_proxy internally during the NetBeans build. For details, see the following GitHub pull request: