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

Add apidocs classifier for publishing to docs.spring.io #3328

Closed
wants to merge 1 commit into from

Conversation

pderop
Copy link
Contributor

@pderop pderop commented Jun 28, 2024

in docs.spring.io, there is an autorepo script which automates the deployment to docs.spring.io of any docs zip deployed to artifactory.

the convention is the following:

  1. any docs zip published to artifactory should contain zip.type=docs, and zip.deployed=false special artifactory properties. see spring framework example, or spring pulsar example.

  2. the structure of the docs zip should be like this:

  • api/* -> contains javadoc
  • reference/html/ -> contains reference flat html files
  • reference/pdf/ -> contains reference pdf file (if any)

Now, our current reactor-netty-docs zip contains only the html files and the structure is different (docs/*).
We can't change the layout of the reactor-netty-docs zip, else it could break any other components, like the projectreactor.io site, which expects reference documentation to be located in docs/* sub directory of the docs zip.

So, this PR just adds a new reactor-netty apidocs classifier which contains:

  • api/* -> javadoc
  • reference/html/* -> reference html doc files
  • reference/pdf/ -> pdf reference doc, if any

the new apidocs artifact will be published with the special properties zip.type=docs and zip.deployed=false, so the content of the apidocs artifact will also be copied to:

  • https://docs.spring.io/projectreactor/netty/docs/VERSION/api/ (javadoc)
  • https://docs.spring.io/projectreactor/netty/docs/VERSION/reference/html/ (reference doc)
  • https://docs.spring.io/projectreactor/netty/docs/VERSION/reference/pdf/ (pdf reference doc)

not that the autorepo script also uses autoln, which will maintain symbolic links like:

  • https://docs.spring.io/projectreactor/netty/docs/current -> (the latest stable docs)
  • https://docs.spring.io/projectreactor/netty/docs/current-SNAPSHOT -> (the most recent snapshot docs)
  • https://docs.spring.io/projectreactor/netty/docs/<major>.<minor>.x -> (the most recently released version starting with <major>.<minor>)
  • https://docs.spring.io/projectreactor/netty/docs/<major>.<minor>.x-SNAPSHOT -> (the most recent snapshot docs starting with <major>.<minor>)

@pderop pderop added the type/documentation A documentation update label Jun 28, 2024
@pderop pderop added this to the 1.0.47 milestone Jun 28, 2024
@pderop pderop requested a review from a team June 28, 2024 17:07
}

//add apidocs.zip to the publication
publishing.publications.mavenJava.artifact(apidocsZip)
Copy link
Member

@violetagg violetagg Jun 28, 2024

Choose a reason for hiding this comment

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

Does this mean that we will publish this artifact to Maven Central?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, if this is an obstructive issue, is there a way to publish this new artifact to artifactory only ?
or alternatively, maybe there is another way: use rsync in order to push the javadocs/reference/pdf directly to docs.spring.io (then I'll need to explore that approach ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mmm ... this is interesting: in spring-security, it seems that the docs are deployed in docs.spring.io by doing some ssh commands in groovy code, see this deployDocs groovy task in spring-security. maybe we should do the same.

I need to explore this; putting this PR in draft mode for the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could experiment this spring-security ssh commands, I see how it works and could test it using a local ssh server container.
I will close this current PR (because I don't want to loose it), and will create a new one based on the same approach used by spring-security.

@pderop pderop marked this pull request as draft June 30, 2024 19:19
@pderop
Copy link
Contributor Author

pderop commented Jul 1, 2024

Closing this PR, and will create another PR which is based on the spring-security ssh commands approach.

@pderop pderop closed this Jul 1, 2024
@pderop pderop added the status/declined We feel we shouldn't currently apply this change/suggestion label Jul 1, 2024
@pderop pderop removed this from the 1.0.47 milestone Jul 1, 2024
@violetagg violetagg removed the type/documentation A documentation update label Jul 1, 2024
@pderop pderop mentioned this pull request Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/declined We feel we shouldn't currently apply this change/suggestion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants