Sure, but Max cannot do that.
Will be done in 1.9.6: https://issues.apache.org/jira/browse/MRESOLVER-327

T

On Fri, Feb 24, 2023 at 8:39 AM Konrad Windszus <konra...@gmx.de> wrote:

> Why not changing Native to call
> https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html#useSystemProperties()
> by default (if nothing conflicting is explicitly configured)?
> That way it would be more compatible with the Wagon impl.
>
> > Am 24.02.2023 um 08:31 schrieb Tamás Cservenák <ta...@cservenak.net>:
> >
> > Howdy,
> >
> > Maven 3.9.0 changes default transport from Wagon to Native HTTP. Native
> > would respect proxy IF set in settings.xml, that as you explain, does not
> > fit your use case.
> >
> > For now, with 3.9.0 you can fallback to Wagon using this
> > "-Dmaven.resolver.transport=wagon"
> >
> > HTH
> > Tamas
> >
> >> On Fri, Feb 24, 2023 at 8:16 AM Max Allan <maxa+ma...@surevine.com>
> wrote:
> >>
> >> Hi,
> >>
> >> I've got 2 separate maven builds configured like :
> >>
> >> mvn clean install -Dhttps.proxyHost=$HTTPS_PROXY_HOST
> >> -Dhttps.proxyPort=$HTTPS_PROXY_PORT -Dhttp.proxyHost=$HTTP_PROXY_HOST
> >> -Dhttp.proxyPort=$HTTP_PROXY_PORT
> >>
> >> That works fine on maven 3.8.7 but does not seem to even be trying to
> >> connect to the proxy on 3.9.0.
> >>
> >> The job fails with a load of errors like :
> >>
> >> [FATAL] Non-resolvable parent POM for
> com.obfuscated:ldap:1.0.0-SNAPSHOT:
> >> Could not transfer artifact
> >> org.springframework.boot:spring-boot-starter-parent:pom:3.0.2 from/to
> >> gitlab-maven (https://gitlab.domain/api/v4/groups/123/-/packages/maven
> ):
> >> Connect to gitlab.domain:443 [gitlab.domain/192.1.2.61] failed: Connect
> >> timed out and 'parent.relativePath' points at wrong local POM @ line 6,
> >> column 11
> >> (URLs and paths obfuscated)
> >>
> >> I cannot easily set the values in a settings.xml or elsewhere because
> the
> >> proxy host is always different for each build and the proxy settings are
> >> only needed in CICD, so adding them to settings would break local
> developer
> >> builds.
> >>
> >> If I move to a machine that has access to my GitLab without a proxy,
> then
> >> the job works in 3.9.0. Even though there is no proxy and it should be
> >> trying to use it. (so it should fail).
> >>
> >> Is there a new requirement for specifying proxies in 3.9.0 or is it
> broken?
> >>
> >> Max
> >>
>

Reply via email to