Skip to content

[CORE] replace http with https. Replace http://central.maven.org with https:repo1.maven.org#5033

Closed
sebastien-rosset wants to merge 2 commits intoOpenAPITools:masterfrom
CiscoM31:maven-https
Closed

[CORE] replace http with https. Replace http://central.maven.org with https:repo1.maven.org#5033
sebastien-rosset wants to merge 2 commits intoOpenAPITools:masterfrom
CiscoM31:maven-https

Conversation

@sebastien-rosset
Copy link
Contributor

@sebastien-rosset sebastien-rosset commented Jan 18, 2020

Trying to eliminate the use of http as much as possible.
Some of these changes are documentation only and do not affect the build but we should use https nonetheless.
There are multiple use of http://central.maven.org, but that site returns error 403 with a message stating to use http://repo1.maven.org. I've replaced these.

There are some http URL that don't exist anymore. I'm not sure what to do about it, and it's not clear they are used anyway.

I did a cursory search to find use of http://:

grep -r 'http://'  . | grep -v xmlns |grep -v schemaLocation   | wc

Right now it yields over 6000 results. Unfortunately we can't do a simple search and replace.

Slightly better way to find references to http://

grep -r 'http://'  . | grep -v xmlns |grep -v schemaLocation  | sed -rn 's/.*(http:\/\/[^ )"]+).*/\1/p' | sort | uniq

It yields 779 results.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

Copy link
Member

@jimschubert jimschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM there's an additional issue but I'll fix it with yours in #5033

If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):

JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. We need to update this file in a separate PR to to replace the doc version via script.

@jimschubert
Copy link
Member

I'm going to close this in favor of #5034. I copied the wring PR number in my LGTM comment. ❌

Additional issue is mavenCentral() for gradle prior to 4.8.1 doesn't default to https, so we have to force the HTPS URL by explicitly defining the repository. It passed on my above PR, but I missed regenerating some of the samples.

jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request Jan 19, 2020
This continues on work in OpenAPITools#5033 and OpenAPITools#5034 which convert all http usage
to https to unblock CircleCI builds.

In OpenAPITools#5034, mavenCentral() DSL was updated to explicitly target the https
maven repo because Gradle didn't force TLS 1.2 until v4.8.1 and many of
our examples use earlier versions of Gradle.  The Kotlin meta generator
was missed because it is a .kts build file rather than build.gradle, and
the mustache filename doesn't have kts in it; the file was updated as if
it was build.gradle (groovy syntax).
jimschubert added a commit that referenced this pull request Jan 19, 2020
This continues on work in #5033 and #5034 which convert all http usage
to https to unblock CircleCI builds.

In #5034, mavenCentral() DSL was updated to explicitly target the https
maven repo because Gradle didn't force TLS 1.2 until v4.8.1 and many of
our examples use earlier versions of Gradle.  The Kotlin meta generator
was missed because it is a .kts build file rather than build.gradle, and
the mustache filename doesn't have kts in it; the file was updated as if
it was build.gradle (groovy syntax).
@sebastien-rosset sebastien-rosset deleted the maven-https branch May 23, 2020 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants