[ https://issues.apache.org/jira/browse/MNG-7721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17696979#comment-17696979 ]
Nejc Habjan commented on MNG-7721: ---------------------------------- I personally didn't read into that as being the worst options, I don't know if those limitations described apply to non-programmatic contexts like invoking CLI commands here, but I'm also not super knowledgeable in Java so I definitely can't argue here :) To give some more context - no, we don't necessarily have settings.xml as most of these run in stock java-based docker containers that are created for every build and we just want to give users on our platform(s) the minimum set of reusable instructions to get up and running behind proxies regardless of their setup. Yes, I guess we could change our docs to template the XML into a string variable and then write that to a file inside CI before the build as a workaround. It just does not seem cleaner to me but just my opinion. So IMO having some way of controlling this entirely via environment variables would be nice I think. Or is there another way to pass this in via the CLI? > Maven 3.9 resolver ignores proxy configured via MAVEN_OPTS > ---------------------------------------------------------- > > Key: MNG-7721 > URL: https://issues.apache.org/jira/browse/MNG-7721 > Project: Maven > Issue Type: Bug > Components: Bootstrap & Build > Affects Versions: 3.9.0 > Reporter: Nejc Habjan > Priority: Major > > The new native resolver seems to no longer respect HTTP/S proxy configuration > set as options via `MAVEN_OPTS`. I haven't tried if this also happens when > supplying the options directly via CLI as well, I assume that might be the > case? > Sample GitLab CI script that worked with 3.8.7 but now fails with 3.9: > {code:java} > image: maven:3.9 > build: > variables: > MAVEN_OPTS: >- > -Dhttp.proxyHost=$PROXY_HOST > -Dhttp.proxyPort=$PROXY_PORT > -Dhttps.proxyHost=$PROXY_HOST > -Dhttps.proxyPort=$PROXY_PORT > -Dhttp.nonProxyHosts=$NO_PROXY_HOSTS > script: > - mvn clean install{code} > Likely introduced in [https://github.com/apache/maven/pull/892]. -- This message was sent by Atlassian Jira (v8.20.10#820010)