PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first. -
Filed the PR against the correct branch: master
,. Default:3.4.x
,4.0.x
master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
TravisCI proxies separate external requests with different orginating IP addresses, while Sonatype associates artifacts for auto-generated repositories by IP address. This leads to many gradle deploys from CI resulting in "split" staging repositories with no way to combine in Sonatype Nexus.
This introduces a workflow which should resolve this issue on the next revision release. Specifically, nexus-publish-plugin is included to create singular staging repositories from TravisCI and gradle-nexus-staging-plugin is included to auto-release and promote this repository.
NOTE:
We need to publish via publishPluginMavenPublicationToNexusRepository
,
because publishToNexus
will publish all publish-related tasks,
including the one intended only for the Gradle Plugin Portal.
Tested in standalone open source Nexus Repo Manager, which doesn't support the staging plugin. So, only SNAPSHOT workflow has been validated locally.
The enableFeaturePreview('STABLE_PUBLISHING')
option in settings.gradle is a warning presented by the new nexus-publish-plugin:
As part of making the publishing plugins stable, the 'deferred configurable' behavior of the 'publishing {}' block has been deprecated. In Gradle 5.0 the 'enableFeaturePreview('STABLE_PUBLISHING')' flag will be removed and the new behavior will become the default. Please add 'enableFeaturePreview('STABLE_PUBLISHING')' to your settings file and do a test run by publishing to a local repository. If all artifacts are published as expected, there is nothing else to do. If the published artifacts change unexpectedly, please see the migration guide for more details: https://docs.gradle.org/4.10.2/userguide/publishing_maven.html#publishing_maven:deferred_configuration.
This PR is an attempt at resolving #411 cc @OpenAPITools/generator-core-team