Skip to content

Conversation

@ngocnhan-tran1996
Copy link
Contributor

When we build document, example with new version (4.0.0-SNAPSHOT) and it will work with Spring Framework 7.x version, but the current document is pointed with Spring current (6.2.x) version

You can read more about that here.

Reference
https://docs.spring.io/spring-amqp/reference/4.0-SNAPSHOT/sample-apps.html#hello-world-sync

That's why I think we can use gradle for improving the build document process.

The main points:

  • The new Spring AMQP version document will be compatitable with Spring Framework version or Micrometer version document
  • Reference javadoc will be easier, use javadoc:org.springframework.amqp... instead {spring-amqp-java-docs}...

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
@artembilan
Copy link
Member

Thank you for your effort!
Unfortunately, I don't have too much time today to look into this for today's release, so this will be revised for the next milestone.

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
- '@springio/asciidoctor-extensions/javadoc-extension'
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we have to contribute this one to the build-all docs branch: https://github.com/spring-projects/spring-amqp/blob/docs-build/antora-playbook.yml#L28

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line use for prefix javadoc: when generating document

The reference:
https://github.com/spring-io/asciidoctor-extensions?tab=readme-ov-file#javadoc

I think it will be easier when we use javadoc links in document instead prefix {spring-amqp-java-docs}

build.gradle Outdated
"javadoc-location-org-springframework-transaction": "$springDocs/spring-framework/docs/$springVersion/javadoc-api".toString(),
"javadoc-location-org-springframework-amqp": "$springDocs/spring-amqp/docs/$project.version/api".toString(),
"micrometer-docs": "$micrometerDocsPrefix/micrometer/reference/${generateVersionWithoutPatch(micrometerVersion)}".toString(),
"micrometer-tracing-docs": "$micrometerDocsPrefix/tracing/reference/${generateVersionWithoutPatch(micrometerTracingVersion)}".toString()
Copy link
Member

Choose a reason for hiding this comment

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

Why did you change to double quotes?
That is not Groovy way about static strings as map keys: https://www.jetbrains.com/help/inspectopedia/GroovyGStringKey.html

build.gradle Outdated
if(matcher) {

return matcher[0][2] == null
return matcher[0][2] == null || matcher[0][2].startsWith("-M")
Copy link
Member

Choose a reason for hiding this comment

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

There is also -RC.
But in general the algorithm for Antora versioning is MAJOR.MINOR + -SNAPSHOT if present.
So, please, revise this respectively.
Just wrote this Groovy script to be sure:

version = '7.0.1-SNAPSHOT'
majorMinor = version.split('\\.')[0,1].join('.')
println majorMinor + (version.endsWith('-SNAPSHOT') ? '-SNAPSHOT' : '')

Or just one line for your logic:

return version.split('\\.')[0,1].join('.') +  (version.endsWith('-SNAPSHOT') ? '-SNAPSHOT' : '')

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
@artembilan artembilan added this to the 4.0.0-M2 milestone Feb 21, 2025
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

I think this is good so far.
Merging it to give it a spin.

Thank you!

@artembilan artembilan merged commit 2ce61f1 into spring-projects:main Feb 21, 2025
3 checks passed
@artembilan
Copy link
Member

So, that didn't go well: https://docs.spring.io/spring-amqp/reference/4.0-SNAPSHOT/amqp/broker-configuration.html#builder-api

See the Javadoc for javadoc:org.springframework.amqp.core.QueueBuilder[org.springframework.amqp.core.QueueBuilder] and javadoc:org.springframework.amqp.core.ExchangeBuilder[org.springframework.amqp.core.ExchangeBuilder] for more information.

JavaDocs are not resolved.
Perhaps I was right that docs-build branch has to be fixed as well.

@ngocnhan-tran1996
Copy link
Contributor Author

I will checkout from docs-build and create PR for fixing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants