So, it turns out I needed to set MAVEN_OPTS as well
export MAVEN_OPTS="-Dhttp.proxyHost=util.example.com
-Dhttp.proxyPort=8889 -Dhttps.proxyHost=util.example
.com -Dhttps.proxyPort=8888"
and it now works
Sorry for the disturbance
pjb.
On 2/10/23 09:50, Phillip Brown wrote:
Hi
I am trying to build Hop 2.6, and running into issues with maven and
proxy.
Caveat - I am not a developer per se, more of an infrastructure
person, so I don't use the tools on a regular basis, but I know my way
around
My set up
I have a Virtualbox VM running Oracle Enterprise Linux 9. All my VM's
use 'host only' networking, so I have another VM as a gateway with a
bridge to the host adapter, which runs tinyproxy. This set up works
works for everything, including most of the build process
[apache@apchop01 ~]$ mvn -version
Apache Maven 3.6.3 (Red Hat 3.6.3-15)
Maven home: /usr/share/maven
Java version: 11.0.20, vendor: Red Hat, Inc., runtime:
/usr/lib/jvm/java-11-openjdk-11.0.20.0.8-2.0.1.el9.x86_64
Default locale: en_AU, platform encoding: UTF-8
OS name: "linux", version: "5.15.0-105.125.6.2.2.el9uek.x86_64", arch:
"amd64", family: "unix"
[apache@apchop01 ~]$ cat .m2/settings.xml
<settings>
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>util.example.com</host>
<port>8888</port>
<nonProxyHosts>*.example.com</nonProxyHosts>
</proxy>
</proxies>
</settings>
relevant part of the build output - as you can see it can download
stuff from https://repo1.maven.org just fine until it gets to:
[INFO] -------------------<
org.apache.hop:hop-engine-beam>-------------------
[INFO] Building hop-engine-beam 2.6.0
[4/559]
[INFO] --------------------------------[ jar
]---------------------------------
Downloading from apache.snapshots:
https://repository.apache.org/snapshots/io/grpc/grpc-api/maven-metadata.xml
Downloading from central:
https://repo1.maven.org/maven2/io/grpc/grpc-api/maven-metadata.xml
Downloaded from central:
https://repo1.maven.org/maven2/io/grpc/grpc-api/maven-metadata.xml
(3.4 kB at 2.0 kB/s)
Downloading from central:
https://repo1.maven.org/maven2/io/grpc/grpc-core/maven-metadata.xml
Downloading from apache.snapshots:
https://repository.apache.org/snapshots/io/grpc/grpc-core/maven-metadata.xml
Downloaded from central:
https://repo1.maven.org/maven2/io/grpc/grpc-core/maven-metadata.xml
(5.0 kB at 12 kB/s)
Downloading from central:
https://repo1.maven.org/maven2/io/grpc/grpc-netty-shaded/maven-metadata.xml
Downloading from apache.snapshots:
https://repository.apache.org/snapshots/io/grpc/grpc-netty-shaded/maven-metadata.xml
Downloaded from central:
https://repo1.maven.org/maven2/io/grpc/grpc-netty-shaded/maven-metadata.xml
(4.0 kB at 11 kB/s)
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean(default-clean)@
hop-engine-beam---
[INFO] Deleting /home/apache/source/apache-hop-2.6.0/engine-beam/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce(enforce-maven-version)@
hop-engine-beam---
[INFO]
[INFO] ---
build-helper-maven-plugin:3.0.0:parse-version(set-doc-version-property)@
hop-engine-beam---
[INFO]
[INFO] ---
build-helper-maven-plugin:3.0.0:rootlocation(set-root-dir-property)@
hop-engine-beam---
[INFO]
[INFO] ---
jacoco-maven-plugin:0.8.7:prepare-agent(coverage-initialize)@
hop-engine-beam---
[INFO] argLine set to
-javaagent:/home/apache/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/h
ome/apache/source/apache-hop-2.6.0/engine-beam/target/jacoco.exec,excludes=**/*Dialog*
[INFO]
[INFO] ---
maven-remote-resources-plugin:1.7.0:process(process-resource-bundles)@
hop-engine-beam---
[INFO] Preparing remote bundle org.apache:apache-jar-resource-bundle:1.4
[INFO] Copying 3 resources from 1 bundle.
[INFO] artifact io.grpc:grpc-api: checking for updates from central
[INFO] I/O exception (java.net.SocketException) caught when processing
request to {s}->https://repo1.maven.org:443: Network is unreachable
(connect failed)
[INFO] Retrying request to {s}->https://repo1.maven.org:443
[INFO] I/O exception (java.net.SocketException) caught when processing
request to {s}->https://repo1.maven.org:443: Network is unreachable
(connect failed)
[INFO] Retrying request to {s}->https://repo1.maven.org:443
[INFO] I/O exception (java.net.SocketException) caught when processing
request to {s}->https://repo1.maven.org:443: Network is unreachable
(connect failed)
[INFO] Retrying request to {s}->https://repo1.maven.org:443
[WARNING] repository metadata for: 'artifact io.grpc:grpc-api' could
not be retrieved from repository: central due to an error: transfer
failed for
https://repo1.maven.org/maven2/io/grpc/grpc-api/maven-metadata.xml,
proxy: ProxyInfo{host='util.example.com', userName='null', port=8888,
type='http', nonProxyHosts='null'}
For the life of me I cannot see why it would fail here, so hoping
someone has seen something like this, or can point me in the right
direction. About the only thing that stands out is mvn reports
"nonProxyHosts='null'" when my settings.xml has
"<nonProxyHosts>*.example.com</nonProxyHosts>"
Thanks in anticipation
Phil Brown.