-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors running MavenCLI #365
Comments
It seems like it cannot access to the We are able to verify by executing the following command at the host machine. docker run -it --rm maven:3.9.1-eclipse-temurin-11 \
bash -c \
'wget https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.3.0/maven-resources-plugin-3.3.0.pom \
-O /tmp/pom.xml \
&& ls -la /tmp/pom.xml' Moreover, If I'm not wrong, you're using # Pre-Build Step
- wget https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.3.0/maven-resources-plugin-3.3.0.pom -O /tmp/pom.xml
- ls -la /tmp/pom.xml Furthermore If the internet connection requires the <settings>
.
.
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.example.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
</proxy>
</proxies>
.
.
</settings> Regarding to the following, Apart from modifying the |
I disagree, something else is very wrong here:
This means that Maven cannot "speak" HTTP at all, as there are NO connectors for HTTP. Maven 3.9.x by default includes two connectors for HTTP (old resolver-transport-wagon and new resolver-transport-http). This looks more like broken/incomplete deployment, or something else that made Maven not have connectors available. |
Here is the list jar files inside the lib directory. I'm not sure if this may be any clue or not. docker run -it --rm maven:3.9.1-eclipse-temurin-11 bash
# Inside the bash for this container
mvn -v
# Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
# Maven home: /usr/share/maven
# Java version: 11.0.18, vendor: Eclipse Adoptium, runtime: /opt/java/openjdk
# Default locale: en_US, platform encoding: UTF-8
# OS name: "linux", version: "3.10.0-1062.el7.x86_64", arch: "amd64", family: "unix"
ls -la /usr/share/maven/lib | grep transport
# -rw-r--r--. 1 root root 16230 Mar 15 09:39 maven-resolver-transport-file-1.9.7.jar
# -rw-r--r--. 1 root root 50468 Mar 15 09:39 maven-resolver-transport-http-1.9.7.jar
# -rw-r--r--. 1 root root 32439 Mar 15 09:39 maven-resolver-transport-wagon-1.9.7.jar
ls -la /usr/share/maven/lib | grep wagon
# -rw-r--r--. 1 root root 32439 Mar 15 09:39 maven-resolver-transport-wagon-1.9.7.jar
# -rw-r--r--. 1 root root 11350 Mar 15 09:39 wagon-file-3.5.3.jar
# -rw-r--r--. 1 root root 9405 Mar 15 09:39 wagon-http-3.5.3.jar
# -rw-r--r--. 1 root root 40832 Mar 15 09:39 wagon-http-shared-3.5.3.jar
# -rw-r--r--. 1 root root 55101 Mar 15 09:39 wagon-provider-api-3.5.3.jar |
I guess that image is ok, but am more interested in reporter's (same as @charleech) output, as nobody else reported such a problem, while 3.9.1 image is out for quite while. Inability of maven to download anything (due lack of connectors) would most probably trigger a swarm of issues.... 😄 |
Do you have an example project where it is broken? There are tests in this repo and they are passing |
Added the connectivity check to my pipeline and seems to have worked fine:
I could try to make the project available if needed or a version of it. |
Any updates? |
|
Project is private. Nothing I can share. I could try to create a version to share |
It looks like there will be something wrong with the Regarding my previous comment (#365 (comment)) in my environment it prints as As far as I understand, if the Maven is not able to locate the |
This is the YAML file I'm using for this in case it helps:
|
Running MavenCLI throws this error on maven:3.9.1-eclipse-temurin-11:
The text was updated successfully, but these errors were encountered: