Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish javadoc / reference docs to spring.io #3345

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

pderop
Copy link
Contributor

@pderop pderop commented Jul 10, 2024

This PR is meant to publish javadoc and reference docs to docs.spring.io/projecrtreactor/reactor-netty/

In this PR, a new deployDocs gradle plugin is used to prepare/upload and install javadoc/reference docs.
The deployDocs gradle plugin is now using SimpleSSH java library which supports JDK 8, so it drastically simplifies everything.

note that SimpleSSH depends on an old com.jcraft:jsch project which is deprecated and this PR replaces it with https://github.com/mwiede/jsch, which can be used as a drop-in replacement for old com.jcraft:jsch.

on each push, the following docs will be updated here:

https://docs.spring.io/projectreactor/reactor-netty/docs/VERSION/api/ (javadoc)
https://docs.spring.io/projectreactor/reactor-netty/docs/VERSION/reference/html/ (reference doc)
https://docs.spring.io/projectreactor/reactor-netty/docs/VERSION/reference/pdf/ (pdf reference doc)
https://docs.spring.io/projectreactor/reactor-netty/docs/current -> (the latest stable docs)
https://docs.spring.io/projectreactor/reactor-netty/docs/current-SNAPSHOT -> (the most recent snapshot docs)
https://docs.spring.io/projectreactor/reactor-netty/docs/<major>.<minor>.x -> (the most recently released version starting with <major>.<minor>)
https://docs.spring.io/projectreactor/reactor-netty/docs/<major>.<minor>.x-SNAPSHOT -> (the most recent snapshot docs starting with <major>.<minor>)

you can check existing docs which have been manually uploaded in https://docs.spring.io/projectreactor/reactor-netty/docs/

@pderop pderop added the type/documentation A documentation update label Jul 10, 2024
@pderop pderop added this to the 1.1.22 milestone Jul 10, 2024
@pderop pderop self-assigned this Jul 10, 2024
@pderop pderop changed the title Publish javadoc refdoc to spring.io Publish javadoc / reference docs to spring.io Jul 10, 2024
@pderop pderop requested review from violetagg and a team and removed request for violetagg July 10, 2024 12:35
@pderop pderop force-pushed the publish-javadoc-refdoc-to-spring.io branch from 153c0e9 to adccae7 Compare July 11, 2024 14:58
@pderop
Copy link
Contributor Author

pderop commented Jul 11, 2024

actually, in previous closed #3345 PR, we were using the latest version of org.hidetake.ssh (2.11.2), and it was requiring JDK11.

Now, spring-security is using an older version of org.hidetake.ssh: 2.10.1, and this version is JDK8 compatible !
see https://github.com/spring-projects/spring-security/blob/main/gradle/libs.versions.toml#L102

So, last forced push is now using org.hidetake.ssh 2.10.1 (the exact same version used by spring-security).

@pderop
Copy link
Contributor Author

pderop commented Jul 12, 2024

thanks @violetagg for the review!

@pderop pderop merged commit d32ce60 into reactor:1.1.x Jul 12, 2024
14 checks passed
@pderop
Copy link
Contributor Author

pderop commented Jul 12, 2024

there is a remaining issue in the build of the merged PR: https://github.com/reactor/reactor-netty/actions/runs/9904990175/job/27363908378

I am checking it now.

pderop added a commit that referenced this pull request Jul 12, 2024
pderop added a commit that referenced this pull request Jul 12, 2024
This reverts commit a7ffbb0.
pderop added a commit that referenced this pull request Jul 12, 2024
@pderop
Copy link
Contributor Author

pderop commented Jul 13, 2024

This PR has been merged, but after, has been reverted, because it still does not work, see https://github.com/reactor/reactor-netty/actions/runs/9908800193/job/27375769400

> Task :reactor-netty:deployDocs
Retrying: com.jcraft.jsch.JSchException: reject HostKey: ***
Retrying: com.jcraft.jsch.JSchException: reject HostKey: ***
Retrying: com.jcraft.jsch.JSchException: reject HostKey: ***
Retrying: com.jcraft.jsch.JSchException: reject HostKey: ***
Retrying: com.jcraft.jsch.JSchException: reject HostKey: ***

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':reactor-netty:deployDocs'.
> com.jcraft.jsch.JSchException: reject HostKey: ***

I suspect that it's because the org.hidetake.ssh' version '2.10.1' that is used by this PR has a transitive dependency to com.jcraft:jsch which is deprecated and has compatibiliy problems with latest openssh keys format.

see https://stackoverflow.com/questions/53134212/invalid-privatekey-when-using-jsch

on my own lab, I could reproduce and replacing the old com.jcraft jsch library by https://github.com/mwiede/jsch (drop in replacement) worked: to use it, the following can be done:

  • get this PR + the additional commit from 16cdaaf
  • add in buildSrc this build.gradle patch:
/*
 * Copyright (c) 2024 VMware, Inc. or its affiliates, All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
plugins {
	id 'groovy'
}

repositories {
	gradlePluginPortal()
	mavenCentral()
}

dependencies {
	implementation localGroovy()
	implementation "com.github.mwiede:jsch:0.2.5"
	implementation("org.hidetake:gradle-ssh-plugin:2.10.1") {
		exclude group: 'com.jcraft', module: 'jsch'
	}
}

and remove the following from the toplevel build.gradle:

id 'org.hidetake.ssh' version '2.10.1' apply false

Now, I did not complete the PR with the above, because I cannot prove that com.github.mwiede:jsch:0.2.5 is also used by spring-security (spring-security is also using org.hidetake:gradle-ssh-plugin:2.10.1, but it seems to also use com.jcraft:jsch old artifact).

see https://github.com/spring-projects/spring-security/blob/main/buildSrc/src/main/groovy/io/spring/gradle/convention/DeployDocsPlugin.groovy and https://github.com/spring-projects/spring-security/blob/main/gradle/libs.versions.toml#L103

so, that's why for the moment, this PR has been reverted.

@violetagg , please update this PR with the proper labels in order to indicate that it has been reverted (I'm not sure).

thanks.

@violetagg violetagg added type/chore A task not related to code (build, formatting, process, ...) and removed type/documentation A documentation update labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants