[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642607#comment-17642607 ] Hudson commented on MNG-7614: - Build succeeded in Jenkins: Maven » Maven TLP » maven » PR-890 #3 See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/PR-890/3/ > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Assignee: Tamas Cservenak >Priority: Major > Fix For: 3.9.0 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642593#comment-17642593 ] Hudson commented on MNG-7614: - Build succeeded in Jenkins: Maven » Maven TLP » maven » maven-3.9.x #94 See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/maven-3.9.x/94/ > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Assignee: Tamas Cservenak >Priority: Major > Fix For: 3.9.0 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642569#comment-17642569 ] ASF GitHub Bot commented on MNG-7614: - cstamas merged PR #895: URL: https://github.com/apache/maven/pull/895 > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Assignee: Tamas Cservenak >Priority: Major > Fix For: 3.9.0 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642514#comment-17642514 ] ASF GitHub Bot commented on MNG-7614: - cstamas commented on code in PR #895: URL: https://github.com/apache/maven/pull/895#discussion_r1038151549 ## maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java: ## @@ -209,6 +211,76 @@ public DefaultRepositorySystemSession newRepositorySession(MavenExecutionRequest XmlPlexusConfiguration config = new XmlPlexusConfiguration(dom); configProps.put("aether.connector.wagon.config." + server.getId(), config); + +// Translate to proper resolver configuration properties as well (as Plexus XML above is Wagon specific +// only) +// but support only configuration/httpConfiguration/all, not the per-method nonsense +// https://maven.apache.org/guides/mini/guide-http-settings.html +Map headers = null; +Integer connectTimeout = null; +Integer requestTimeout = null; + +PlexusConfiguration httpHeaders = config.getChild("httpHeaders", false); +if (httpHeaders != null) { +PlexusConfiguration[] properties = httpHeaders.getChildren("property"); +if (properties != null && properties.length > 0) { +headers = new HashMap<>(); +for (PlexusConfiguration property : properties) { +headers.put( +property.getChild("name").getValue(), +property.getChild("value").getValue()); +} +} +} + +PlexusConfiguration connectTimeoutXml = config.getChild("connectTimeout", false); +if (connectTimeoutXml != null) { +connectTimeout = Integer.parseInt(connectTimeoutXml.getValue()); +} else { +// fallback configuration name +PlexusConfiguration httpConfiguration = config.getChild("httpConfiguration", false); +if (httpConfiguration != null) { Review Comment: that would mean am potentially mutating the config object (that is already passed to Wagon as Plexus config) > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Assignee: Tamas Cservenak >Priority: Major > Fix For: 3.9.0 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642513#comment-17642513 ] ASF GitHub Bot commented on MNG-7614: - cstamas commented on code in PR #895: URL: https://github.com/apache/maven/pull/895#discussion_r1038151549 ## maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java: ## @@ -209,6 +211,76 @@ public DefaultRepositorySystemSession newRepositorySession(MavenExecutionRequest XmlPlexusConfiguration config = new XmlPlexusConfiguration(dom); configProps.put("aether.connector.wagon.config." + server.getId(), config); + +// Translate to proper resolver configuration properties as well (as Plexus XML above is Wagon specific +// only) +// but support only configuration/httpConfiguration/all, not the per-method nonsense +// https://maven.apache.org/guides/mini/guide-http-settings.html +Map headers = null; +Integer connectTimeout = null; +Integer requestTimeout = null; + +PlexusConfiguration httpHeaders = config.getChild("httpHeaders", false); +if (httpHeaders != null) { +PlexusConfiguration[] properties = httpHeaders.getChildren("property"); +if (properties != null && properties.length > 0) { +headers = new HashMap<>(); +for (PlexusConfiguration property : properties) { +headers.put( +property.getChild("name").getValue(), +property.getChild("value").getValue()); +} +} +} + +PlexusConfiguration connectTimeoutXml = config.getChild("connectTimeout", false); +if (connectTimeoutXml != null) { +connectTimeout = Integer.parseInt(connectTimeoutXml.getValue()); +} else { +// fallback configuration name +PlexusConfiguration httpConfiguration = config.getChild("httpConfiguration", false); +if (httpConfiguration != null) { Review Comment: that would mean am potentially mutating the XML (that is already passed to Wagon as Plexus config) > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Assignee: Tamas Cservenak >Priority: Major > Fix For: 3.9.0 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642509#comment-17642509 ] ASF GitHub Bot commented on MNG-7614: - kwin commented on code in PR #895: URL: https://github.com/apache/maven/pull/895#discussion_r1038147559 ## maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java: ## @@ -209,6 +211,76 @@ public DefaultRepositorySystemSession newRepositorySession(MavenExecutionRequest XmlPlexusConfiguration config = new XmlPlexusConfiguration(dom); configProps.put("aether.connector.wagon.config." + server.getId(), config); + +// Translate to proper resolver configuration properties as well (as Plexus XML above is Wagon specific +// only) +// but support only configuration/httpConfiguration/all, not the per-method nonsense +// https://maven.apache.org/guides/mini/guide-http-settings.html +Map headers = null; +Integer connectTimeout = null; +Integer requestTimeout = null; + +PlexusConfiguration httpHeaders = config.getChild("httpHeaders", false); +if (httpHeaders != null) { +PlexusConfiguration[] properties = httpHeaders.getChildren("property"); +if (properties != null && properties.length > 0) { +headers = new HashMap<>(); +for (PlexusConfiguration property : properties) { +headers.put( +property.getChild("name").getValue(), +property.getChild("value").getValue()); +} +} +} + +PlexusConfiguration connectTimeoutXml = config.getChild("connectTimeout", false); +if (connectTimeoutXml != null) { +connectTimeout = Integer.parseInt(connectTimeoutXml.getValue()); +} else { +// fallback configuration name +PlexusConfiguration httpConfiguration = config.getChild("httpConfiguration", false); +if (httpConfiguration != null) { Review Comment: maybe instead of the nested if, just `config.getChild("httpConfiguration", true).getChild("all", true).getChild("connectionTimeout", false)` > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Assignee: Tamas Cservenak >Priority: Major > Fix For: 3.9.0 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642507#comment-17642507 ] ASF GitHub Bot commented on MNG-7614: - kwin commented on code in PR #895: URL: https://github.com/apache/maven/pull/895#discussion_r1038145135 ## maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java: ## @@ -209,6 +211,76 @@ public DefaultRepositorySystemSession newRepositorySession(MavenExecutionRequest XmlPlexusConfiguration config = new XmlPlexusConfiguration(dom); configProps.put("aether.connector.wagon.config." + server.getId(), config); + +// Translate to proper resolver configuration properties as well (as Plexus XML above is Wagon specific +// only) +// but support only configuration/httpConfiguration/all, not the per-method nonsense Review Comment: `not the per-method nonsense` :-) maybe just mention that only method `all` is supported. > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Assignee: Tamas Cservenak >Priority: Major > Fix For: 3.9.0 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7614) Maven should translate transport configuration fully to resolver transports.
[ https://issues.apache.org/jira/browse/MNG-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17642437#comment-17642437 ] ASF GitHub Bot commented on MNG-7614: - cstamas opened a new pull request, #895: URL: https://github.com/apache/maven/pull/895 Now that Maven 3.9.x contains other transports than Wagon, the Plexus XML is not just to be "stuffed", but translation should happen to proper resolver configuration to make them available to all transports. --- https://issues.apache.org/jira/browse/MNG-7614 > Maven should translate transport configuration fully to resolver transports. > > > Key: MNG-7614 > URL: https://issues.apache.org/jira/browse/MNG-7614 > Project: Maven > Issue Type: Improvement >Reporter: Tamas Cservenak >Priority: Major > Fix For: 3.9.0, 4.0.0, 4.0.0-alpha-3 > > > Maven should properly translate transport configuration, instead to assume > Wagon. > Master (Maven 4) got this fixed as part of MNG-7608, but for Maven 3.9.x this > needs to be backported, as it got native transporter as part of MNG-7454 but > confguration translation still needed. -- This message was sent by Atlassian Jira (v8.20.10#820010)