@@ -141,6 +141,46 @@ tasks.named("documentPluginGoals") {
141141 ]
142142}
143143
144+ def antoraMavenPluginLocalAggregateContent = tasks. register(" antoraMavenPluginLocalAggregateContent" , Zip ) {
145+ destinationDirectory = layout. buildDirectory. dir(' generated/docs/antora-content' )
146+ archiveClassifier = " maven-plugin-local-aggregate-content"
147+ from(tasks. getByName(" generateAntoraYml" )) {
148+ into " modules"
149+ }
150+ }
151+
152+ def antoraMavenPluginAggregateContent = tasks. register(" antoraMavenPluginAggregateContent" , Zip ) {
153+ destinationDirectory = layout. buildDirectory. dir(' generated/docs/antora-content' )
154+ archiveClassifier = " maven-plugin-aggregate-content"
155+ from(documentPluginGoals) {
156+ into " modules/maven-plugin/partials/goals"
157+ }
158+ }
159+
160+ def antoraMavenPluginCatalogContent = tasks. register(" antoraMavenPluginCatalogContent" , Zip ) {
161+ destinationDirectory = layout. buildDirectory. dir(' generated/docs/antora-content' )
162+ archiveClassifier = " maven-plugin-catalog-content"
163+ from(javadoc) {
164+ into " api/java"
165+ }
166+ }
167+
168+ tasks. named(" generateAntoraPlaybook" ) {
169+ xrefStubs = [" appendix:.*" , " api:.*" , " reference:.*" , " how-to:.*" ]
170+ alwaysInclude = [name : " maven-plugin" , classifier : " local-aggregate-content" ]
171+ dependsOn antoraMavenPluginLocalAggregateContent
172+ }
173+
174+
175+ tasks. named(" antora" ) {
176+ inputs. files(antoraMavenPluginLocalAggregateContent, antoraMavenPluginAggregateContent, antoraMavenPluginCatalogContent)
177+ }
178+
179+ artifacts {
180+ antoraContent antoraMavenPluginAggregateContent
181+ antoraContent antoraMavenPluginCatalogContent
182+ }
183+
144184tasks. named(" dockerTest" ). configure {
145185 dependsOn tasks. named(" prepareMavenBinaries" )
146186}
0 commit comments