Skip to content

Commit 1787905

Browse files
committed
Introduce common configuration for Antora-based documentation sites.
The antora profile allows running a local documentation build of a modules' antora site. The antora-process-resources build pre-processes antora docs resources for e.g. exposing maven properties. Closes: #2087
1 parent caa2ba6 commit 1787905

File tree

1 file changed

+132
-0
lines changed

1 file changed

+132
-0
lines changed

parent/pom.xml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
<smallrye-mutiny>1.9.0</smallrye-mutiny>
131131
<slf4j>2.0.2</slf4j>
132132
<spring>6.1.0-M4</spring>
133+
<antora.playbook>src/main/antora/antora-playbook.yml</antora.playbook>
134+
<spring-antora>0.0.3</spring-antora>
133135
<spring-asciidoctor-backends.version>0.0.7</spring-asciidoctor-backends.version>
134136
<spring-hateoas>2.2.0-M1</spring-hateoas>
135137
<spring-plugin>3.0.0</spring-plugin>
@@ -259,6 +261,118 @@
259261
</build>
260262
</profile>
261263

264+
<profile>
265+
<id>antora-process-resources</id>
266+
<build>
267+
<plugins>
268+
<plugin>
269+
<groupId>io.spring.maven.antora</groupId>
270+
<artifactId>antora-component-version-maven-plugin</artifactId>
271+
<executions>
272+
<execution>
273+
<goals>
274+
<goal>antora-component-version</goal>
275+
</goals>
276+
</execution>
277+
</executions>
278+
</plugin>
279+
280+
<plugin>
281+
<groupId>org.apache.maven.plugins</groupId>
282+
<artifactId>maven-antrun-plugin</artifactId>
283+
<executions>
284+
<execution>
285+
<id>export-properties</id>
286+
<phase>generate-resources</phase>
287+
<configuration>
288+
<target>
289+
<loadresource property="spring.short">
290+
<concat>${spring}</concat>
291+
<filterchain>
292+
<replaceregex pattern="([\d]+\.[\d]+)(\..*)" replace="\1" />
293+
</filterchain>
294+
</loadresource>
295+
<loadresource property="springdata.commons.short">
296+
<concat>${springdata.commons}</concat>
297+
<filterchain>
298+
<replaceregex pattern="([\d]+\.[\d]+)(.*)" replace="\1" />
299+
</filterchain>
300+
</loadresource>
301+
<loadresource property="springdata.commons.docs">
302+
<concat>${springdata.commons}</concat>
303+
<filterchain>
304+
<replaceregex pattern="([\d]+\.[\d]+\.[\d]+)(.*)" replace="\1" />
305+
</filterchain>
306+
</loadresource>
307+
</target>
308+
<exportAntProperties>true</exportAntProperties>
309+
</configuration>
310+
<goals>
311+
<goal>run</goal>
312+
</goals>
313+
</execution>
314+
</executions>
315+
</plugin>
316+
317+
</plugins>
318+
</build>
319+
</profile>
320+
321+
<profile>
322+
<id>antora</id>
323+
324+
<properties>
325+
<maven.main.skip>true</maven.main.skip>
326+
<maven.test.skip>true</maven.test.skip>
327+
<aspectj.skip>true</aspectj.skip>
328+
<maven.install.skip>true</maven.install.skip>
329+
<skipTests>true</skipTests>
330+
</properties>
331+
<build>
332+
333+
<plugins>
334+
<!-- force-skip -->
335+
<plugin>
336+
<groupId>org.jetbrains.kotlin</groupId>
337+
<artifactId>kotlin-maven-plugin</artifactId>
338+
<inherited>false</inherited>
339+
<configuration>
340+
<skip>true</skip>
341+
</configuration>
342+
</plugin>
343+
344+
<plugin>
345+
<groupId>org.apache.maven.plugins</groupId>
346+
<artifactId>maven-deploy-plugin</artifactId>
347+
<configuration>
348+
<skip>true</skip>
349+
</configuration>
350+
</plugin>
351+
</plugins>
352+
353+
<pluginManagement>
354+
<plugins>
355+
<plugin>
356+
<groupId>io.spring.maven.antora</groupId>
357+
<artifactId>antora-maven-plugin</artifactId>
358+
<extensions>true</extensions>
359+
<configuration>
360+
<playbook>${antora.playbook}</playbook>
361+
</configuration>
362+
<executions>
363+
<execution>
364+
<goals>
365+
<goal>antora</goal>
366+
</goals>
367+
<phase>compile</phase>
368+
</execution>
369+
</executions>
370+
</plugin>
371+
</plugins>
372+
</pluginManagement>
373+
</build>
374+
</profile>
375+
262376
<profile>
263377

264378
<!--
@@ -1018,6 +1132,18 @@
10181132
</dependencies>
10191133
</plugin>
10201134

1135+
<plugin>
1136+
<groupId>io.spring.maven.antora</groupId>
1137+
<artifactId>antora-maven-plugin</artifactId>
1138+
<version>${spring-antora}</version>
1139+
</plugin>
1140+
1141+
<plugin>
1142+
<groupId>io.spring.maven.antora</groupId>
1143+
<artifactId>antora-component-version-maven-plugin</artifactId>
1144+
<version>${spring-antora}</version>
1145+
</plugin>
1146+
10211147
<plugin>
10221148
<groupId>org.apache.maven.plugins</groupId>
10231149
<artifactId>maven-antrun-plugin</artifactId>
@@ -1085,6 +1211,12 @@
10851211
</configuration>
10861212
</plugin>
10871213

1214+
<plugin>
1215+
<groupId>org.apache.maven.plugins</groupId>
1216+
<artifactId>maven-resources-plugin</artifactId>
1217+
<version>3.3.1</version>
1218+
</plugin>
1219+
10881220
<plugin>
10891221
<groupId>org.apache.maven.plugins</groupId>
10901222
<artifactId>maven-jar-plugin</artifactId>

0 commit comments

Comments
 (0)