[JIRA] (JENKINS-60861) Default configuration to Maven Central without HTTPS no longer work

6 views
Skip to first unread message

pierre.foures@gmail.com (JIRA)

unread,
Jan 24, 2020, 12:33:02 PM1/24/20
to jenkinsc...@googlegroups.com
Pierre Fourés created an issue
 
Jenkins / Bug JENKINS-60861
Default configuration to Maven Central without HTTPS no longer work
Issue Type: Bug Bug
Assignee: Unassigned
Components: repository-connector-plugin
Created: 2020-01-24 17:32
Environment: Jenkins 2.204.1 with repository-connector-plugin 1.2.6
Priority: Blocker Blocker
Reporter: Pierre Fourés

Following to Sonatype disabling [1] the HTTP access to Maven Central on January 15th 2020, the plugin doesn't work anymore (if using the default configuration) as requests to http://repo1.maven.org/maven2/ now returns 501 HTTPS Required [2]. More info from Sonatype can be found here [3].

A code upgrade is required to now use https://repo1.maven.org/maven2/ as the default configuration.

In the meantime, the current workaround consists to manually edit the link (and add the "s" to "http") in Jenkins Configuration (/jenkins/configure). Also, for systems installed programmatically, one easy workaround consists to drop in the Jenkins install folder (/var/lib/jenkins on Debian systems) the file org.jvnet.hudson.plugins.repositoryconnector.RepositoryConfiguration.xml. The template for this file can be created while manually editing the link on a scratch instance.

A more elaborated workaround might consist to programmatically configure the plugin. While doing so, one might also take the opportunity to use their repository proxy (nexus, artifactory). Here comes the code snippet I used to configure the plugin (with the standard Maven Central).

import org.jvnet.hudson.plugins.repositoryconnector.Repository
import org.jvnet.hudson.plugins.repositoryconnector.RepositoryConfiguration
import jenkins.model.GlobalConfiguration

def repos = GlobalConfiguration.all().get(RepositoryConfiguration.class).repositoryMap
repos.clear()
repos.put("central", new Repository("central", "default", "https://repo1.maven.org/maven2", null, null, false))

[1] https://twitter.com/sonatype_ops/status/1217494086090985472
[2] https://support.sonatype.com/hc/en-us/articles/360041287334
[3] https://blog.sonatype.com/central-repository-moving-to-https
.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

pierre.foures@gmail.com (JIRA)

unread,
Jan 24, 2020, 12:34:02 PM1/24/20
to jenkinsc...@googlegroups.com
Pierre Fourés updated an issue
Change By: Pierre Fourés
Following to Sonatype disabling [1] the HTTP access to Maven Central on January 15th 2020, the plugin doesn't work anymore (if using the default configuration) as requests to [http://repo1.maven.org/maven2/] now returns 501 HTTPS Required [2]. More info from Sonatype can be found here [3].

A code upgrade is required to now use [https://repo1.maven.org/maven2/] as the default configuration.

In the meantime, the current workaround consists to manually edit the link (and add the "s" to "http") in Jenkins Configuration (/jenkins/configure). Also, for systems installed programmatically, one easy workaround consists to drop in the Jenkins install folder (/var/lib/jenkins on Debian systems) the file org.jvnet.hudson.plugins.repositoryconnector.RepositoryConfiguration.xml. The template for this file can be created while manually editing the link on a scratch instance.

A more elaborated workaround might consist to programmatically configure the plugin. While doing so, one might also take the opportunity to use their repository proxy (nexus, artifactory). Here comes the code snippet I used to configure the plugin (with the standard Maven Central).
{quote}import org.jvnet.hudson.plugins.repositoryconnector.Repository

import org.jvnet.hudson.plugins.repositoryconnector.RepositoryConfiguration
import jenkins.model.GlobalConfiguration

def repos = GlobalConfiguration.all().get(RepositoryConfiguration.class).repositoryMap
repos.clear()
repos.put("central", new Repository("central", "default", "https://repo1.maven.org/maven2", null, null, false))
{quote}
.

 

pierre.foures@gmail.com (JIRA)

unread,
Jan 24, 2020, 12:46:04 PM1/24/20
to jenkinsc...@googlegroups.com

pierre.foures@gmail.com (JIRA)

unread,
Jan 24, 2020, 4:05:02 PM1/24/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages