Some docs related cleanups

* Remove docs zipping
* Remove AsciiDoc plugins and tasks
* Fix `integration-reference.adoc` - use the whole content of just remove simple `si-amqp.adoc`
* Remove obsolete `ant/upload-dist.xml`
This commit is contained in:
Artem Bilan
2023-12-05 16:44:29 -05:00
parent 9cc8e4996a
commit 41d786bd96
8 changed files with 76 additions and 232 deletions

View File

@@ -22,8 +22,6 @@ plugins {
id 'org.ajoberstar.grgit' version '4.1.1'
id 'io.spring.nohttp' version '0.0.11'
id 'io.spring.dependency-management' version '1.1.4' apply false
id 'org.asciidoctor.jvm.pdf' version '3.3.2'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.antora' version '1.0.0'
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
}
@@ -37,7 +35,6 @@ ext {
linkScmUrl = 'https://github.com/spring-projects/spring-amqp'
linkScmConnection = 'git://github.com/spring-projects/spring-amqp.git'
linkScmDevConnection = 'git@github.com:spring-projects/spring-amqp.git'
springAsciidoctorBackendsVersion = '0.0.7'
modifiedFiles =
files()
@@ -95,7 +92,7 @@ antora {
]
}
tasks.named("generateAntoraYml") {
tasks.named('generateAntoraYml') {
asciidocAttributes = project.provider( {
return ['project-version' : project.version ]
} )
@@ -548,27 +545,17 @@ project('spring-rabbit-test') {
}
configurations {
asciidoctorExtensions
micrometerDocs
}
dependencies {
asciidoctorExtensions "io.spring.asciidoctor.backends:spring-asciidoctor-backends:${springAsciidoctorBackendsVersion}"
micrometerDocs "io.micrometer:micrometer-docs-generator:$micrometerDocsVersion"
}
task prepareAsciidocBuild(type: Sync) {
dependsOn configurations.asciidoctorExtensions
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from 'src/reference/asciidoc/'
into "$buildDir/asciidoc"
}
def observationInputDir = file("$buildDir/docs/microsources").absolutePath
def generatedDocsDir = file("$buildDir/docs/generated").absolutePath
task copyObservation(type: Copy) {
dependsOn prepareAsciidocBuild
from file('spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/micrometer').absolutePath
from file('spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/micrometer').absolutePath
include '*.java'
@@ -594,66 +581,6 @@ task filterMetricsDocsContent(type: Copy) {
filter { line -> line.replaceAll('org.springframework.*.micrometer.', '').replaceAll('^Fully qualified n', 'N') }
}
asciidoctorPdf {
dependsOn prepareAsciidocBuild, filterMetricsDocsContent
baseDirFollowsSourceFile()
asciidoctorj {
sourceDir "$buildDir/asciidoc"
inputs.dir(sourceDir).withPathSensitivity(PathSensitivity.RELATIVE)
sources {
include 'index.adoc'
}
options doctype: 'book'
attributes 'icons': 'font',
'sectanchors': '',
'sectnums': '',
'toc': '',
'source-highlighter' : 'coderay',
revnumber: project.version,
'project-version': project.version
}
}
asciidoctor {
dependsOn asciidoctorPdf
baseDirFollowsSourceFile()
sourceDir "$buildDir/asciidoc"
configurations 'asciidoctorExtensions'
outputOptions {
backends "spring-html"
}
resources {
from(sourceDir) {
include 'images/*', 'css/**', 'js/**'
}
}
options doctype: 'book', eruby: 'erubis'
attributes 'docinfo': 'shared',
stylesdir: "css/",
stylesheet: 'spring.css',
'linkcss': true,
'icons': 'font',
'sectanchors': '',
'source-highlighter': 'highlight.js',
'highlightjsdir': 'js/highlight',
'highlightjs-theme': 'github',
'idprefix': '',
'idseparator': '-',
'spring-version': project.version,
'allow-uri-read': '',
'toc': 'left',
'toclevbels': '4',
revnumber: project.version,
'project-version': project.version
}
task reference(dependsOn: asciidoctor) {
group = 'Documentation'
description = 'Generate the reference documentation'
}
task api(type: Javadoc) {
group = 'Documentation'
description = 'Generates aggregated Javadoc API documentation.'
@@ -717,7 +644,7 @@ task schemaZip(type: Zip) {
}
}
task docsZip(type: Zip, dependsOn: [reference]) {
task docsZip(type: Zip) {
group = 'Distribution'
archiveClassifier = 'docs'
description = "Builds -${archiveClassifier} archive containing api and reference " +
@@ -730,16 +657,6 @@ task docsZip(type: Zip, dependsOn: [reference]) {
from (api) {
into 'api'
}
from ('build/docs/asciidoc') {
into 'reference/html'
}
from ('build/docs/asciidocPdf') {
include 'index.pdf'
rename 'index.pdf', 'spring-amqp-reference.pdf'
into 'reference/pdf'
}
}
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {

View File

@@ -1,65 +0,0 @@
<?xml version="1.0"?>
<project name="upload-dist-tasks">
<!-- can be run independent of maven as follows (but it's easier
to simply use "mvn antrun:run"):
- classpath must be uncommented below. when run from maven,
- the classpath is set up for you
ant -f src/ant/upload-dist.xml \
-Ddist.id=spring-amqp \
-Ddist.name='Spring AMQP' \
-Ddist.key=AMQP \
-Ddist.accessKey=<access key> \
-Ddist.secretKey=<secret key> \
-Ddist.bucketName=dist.springframework.org \
-Ddist.fileName=spring-amqp-1.0.0.M1.zip \
-Ddist.filePath=../../spring-amqp-1.0.0.M1.zip \
-Ddist.version=1.0.0.M1 \
upload-dist
-->
<taskdef resource="org/springframework/build/aws/ant/antlib.xml">
<!-- see comment above
<classpath>
<pathelement location="/Users/cbeams/Desktop/org.springframework.build.aws.ant-3.0.5.RELEASE.jar"/>
<pathelement location="/Users/cbeams/.m2/repository/net/java/dev/jets3t/jets3t/0.7.2/jets3t-0.7.2.jar"/>
<pathelement location="/Users/cbeams/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
<pathelement location="/Users/cbeams/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
<pathelement location="/Users/cbeams/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"/>
</classpath>
-->
</taskdef>
<target name="upload-dist" depends="upload-prep,upload-s3,upload-staging"/>
<target name="upload-prep">
<condition property="dist.releaseType" value="snapshot">
<contains string="${dist.version}" substring="snapshot" casesensitive="false"/>
</condition>
<condition property="dist.releaseType" value="release" else="milestone">
<contains string="${dist.version}" substring="release" casesensitive="false"/>
</condition>
</target>
<target name="upload-s3" unless="dist.staging">
<checksum file="${dist.filePath}" algorithm="sha1"/>
<s3 accessKey="${dist.accessKey}" secretKey="${dist.secretKey}">
<upload bucketName="${dist.bucketName}" file="${dist.filePath}"
toFile="${dist.releaseType}/${dist.key}/${dist.fileName}" publicRead="true">
<metadata name="project.name" value="${dist.name}"/>
<metadata name="release.type" value="${dist.releaseType}"/>
<metadata name="bundle.version" value="${dist.version}"/>
<metadata name="package.file.name" value="${dist.fileName}"/>
</upload>
<upload bucketName="${dist.bucketName}" file="${dist.filePath}.sha1"
toFile="${dist.releaseType}/${dist.key}/${dist.fileName}.sha1" publicRead="true">
</upload>
</s3>
</target>
<target name="upload-staging" if="dist.staging">
<echo>Copying dist .ZIP to ${dist.staging}</echo>
<checksum file="${dist.filePath}" algorithm="sha1"/>
<copy file="${dist.filePath}.sha1"
toFile="${dist.staging}/${dist.key}/${dist.fileName}.sha1"/>
<copy file="${dist.filePath}"
toFile="${dist.staging}/${dist.key}/${dist.fileName}"/>
</target>
</project>

View File

@@ -41,4 +41,4 @@ runtime:
format: pretty
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.9/ui-bundle.zip
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.10/ui-bundle.zip

View File

@@ -6,7 +6,7 @@ nav:
ext:
collector:
run:
command: gradlew -q "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :generateAntoraResources
command: gradlew -q :generateAntoraResources
local: true
scan:
dir: build/generated-antora-resources

View File

@@ -61,7 +61,6 @@
** xref:sample-apps.adoc[]
** xref:testing.adoc[]
* xref:integration-reference.adoc[]
** xref:si-amqp.adoc[]
* xref:resources.adoc[]
** xref:further-reading.adoc[]
* xref:appendix/micrometer.adoc[]

View File

@@ -1,8 +1,5 @@
[[spring-amqp-reference]]
= Spring AMQP
ifdef::backend-html5[]
:revnumber: ''
endif::[]
:numbered:
:icons: font
:hide-uri-scheme:
@@ -16,6 +13,6 @@ These libraries facilitate management of AMQP resources while promoting the use
In all of these cases, you can see similarities to the JMS support in the Spring Framework.
For other project-related information, visit the Spring AMQP project https://projects.spring.io/spring-amqp/[homepage].
(C) 2010 - 2021 by VMware, Inc.
(C) 2010 - 2023
Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

View File

@@ -1,4 +1,74 @@
[[spring-integration-reference]]
= Spring Integration - Reference
This part of the reference documentation provides a quick introduction to the AMQP support within the Spring Integration project.
This part of the reference documentation provides a quick introduction to the AMQP support within the Spring Integration project.
[[spring-integration-amqp-introduction]]
== Introduction
The https://spring.io/spring-integration[Spring Integration] project includes AMQP Channel Adapters and Gateways that build upon the Spring AMQP project.
Those adapters are developed and released in the Spring Integration project.
In Spring Integration, "`Channel Adapters`" are unidirectional (one-way), whereas "`Gateways`" are bidirectional (request-reply).
We provide an inbound-channel-adapter, an outbound-channel-adapter, an inbound-gateway, and an outbound-gateway.
Since the AMQP adapters are part of the Spring Integration release, the documentation is available as part of the Spring Integration distribution.
We provide a quick overview of the main features here.
See the https://docs.spring.io/spring-integration/reference[Spring Integration Reference Guide] for much more detail.
[[inbound-channel-adapter]]
== Inbound Channel Adapter
To receive AMQP Messages from a queue, you can configure an `<inbound-channel-adapter>`.
The following example shows how to configure an inbound channel adapter:
[source,xml]
----
<amqp:inbound-channel-adapter channel="fromAMQP"
queue-names="some.queue"
connection-factory="rabbitConnectionFactory"/>
----
[[outbound-channel-adapter]]
== Outbound Channel Adapter
To send AMQP Messages to an exchange, you can configure an `<outbound-channel-adapter>`.
You can optionally provide a 'routing-key' in addition to the exchange name.
The following example shows how to define an outbound channel adapter:
[source,xml]
----
<amqp:outbound-channel-adapter channel="toAMQP"
exchange-name="some.exchange"
routing-key="foo"
amqp-template="rabbitTemplate"/>
----
[[inbound-gateway]]
== Inbound Gateway
To receive an AMQP Message from a queue and respond to its reply-to address, you can configure an `<inbound-gateway>`.
The following example shows how to define an inbound gateway:
[source,xml]
----
<amqp:inbound-gateway request-channel="fromAMQP"
reply-channel="toAMQP"
queue-names="some.queue"
connection-factory="rabbitConnectionFactory"/>
----
[[outbound-gateway]]
== Outbound Gateway
To send AMQP Messages to an exchange and receive back a response from a remote client, you can configure an `<outbound-gateway>`.
You can optionally provide a 'routing-key' in addition to the exchange name.
The following example shows how to define an outbound gateway:
[source,xml]
----
<amqp:outbound-gateway request-channel="toAMQP"
reply-channel="fromAMQP"
exchange-name="some.exchange"
routing-key="foo"
amqp-template="rabbitTemplate"/>
----

View File

@@ -1,74 +0,0 @@
[[spring-integration-amqp]]
= Spring Integration AMQP Support
This brief chapter covers the relationship between the Spring Integration and the Spring AMQP projects.
[[spring-integration-amqp-introduction]]
== Introduction
The https://www.springsource.org/spring-integration[Spring Integration] project includes AMQP Channel Adapters and Gateways that build upon the Spring AMQP project.
Those adapters are developed and released in the Spring Integration project.
In Spring Integration, "`Channel Adapters`" are unidirectional (one-way), whereas "`Gateways`" are bidirectional (request-reply).
We provide an inbound-channel-adapter, an outbound-channel-adapter, an inbound-gateway, and an outbound-gateway.
Since the AMQP adapters are part of the Spring Integration release, the documentation is available as part of the Spring Integration distribution.
We provide a quick overview of the main features here.
See the https://docs.spring.io/spring-integration/reference/htmlsingle/[Spring Integration Reference Guide] for much more detail.
[[inbound-channel-adapter]]
== Inbound Channel Adapter
To receive AMQP Messages from a queue, you can configure an `<inbound-channel-adapter>`.
The following example shows how to configure an inbound channel adapter:
[source,xml]
----
<amqp:inbound-channel-adapter channel="fromAMQP"
queue-names="some.queue"
connection-factory="rabbitConnectionFactory"/>
----
[[outbound-channel-adapter]]
== Outbound Channel Adapter
To send AMQP Messages to an exchange, you can configure an `<outbound-channel-adapter>`.
You can optionally provide a 'routing-key' in addition to the exchange name.
The following example shows how to define an outbound channel adapter:
[source,xml]
----
<amqp:outbound-channel-adapter channel="toAMQP"
exchange-name="some.exchange"
routing-key="foo"
amqp-template="rabbitTemplate"/>
----
[[inbound-gateway]]
== Inbound Gateway
To receive an AMQP Message from a queue and respond to its reply-to address, you can configure an `<inbound-gateway>`.
The following example shows how to define an inbound gateway:
[source,xml]
----
<amqp:inbound-gateway request-channel="fromAMQP"
reply-channel="toAMQP"
queue-names="some.queue"
connection-factory="rabbitConnectionFactory"/>
----
[[outbound-gateway]]
== Outbound Gateway
To send AMQP Messages to an exchange and receive back a response from a remote client, you can configure an `<outbound-gateway>`.
You can optionally provide a 'routing-key' in addition to the exchange name.
The following example shows how to define an outbound gateway:
[source,xml]
----
<amqp:outbound-gateway request-channel="toAMQP"
reply-channel="fromAMQP"
exchange-name="some.exchange"
routing-key="foo"
amqp-template="rabbitTemplate"/>
----