Skip to content

Commit ca7085b

Browse files
committed
Use io.spring.maven.antora
1 parent 9109378 commit ca7085b

File tree

3 files changed

+24
-93
lines changed

3 files changed

+24
-93
lines changed

Diff for: pom.xml

+21-90
Original file line numberDiff line numberDiff line change
@@ -366,99 +366,30 @@
366366
<groupId>org.apache.maven.plugins</groupId>
367367
<artifactId>maven-assembly-plugin</artifactId>
368368
</plugin>
369+
<plugin>
370+
<groupId>io.spring.maven.antora</groupId>
371+
<artifactId>antora-maven-plugin</artifactId>
372+
<version>0.0.2</version>
373+
<extensions>true</extensions>
374+
<configuration>
375+
<playbook>src/main/antora/antora-playbook.yml</playbook>
376+
</configuration>
377+
</plugin>
378+
<plugin>
379+
<groupId>io.spring.maven.antora</groupId>
380+
<artifactId>antora-component-version-maven-plugin</artifactId>
381+
<version>0.0.2</version>
382+
<executions>
383+
<execution>
384+
<goals>
385+
<goal>antora-component-version</goal>
386+
</goals>
387+
</execution>
388+
</executions>
389+
</plugin>
369390
</plugins>
370391
</build>
371392

372-
<profiles>
373-
<profile>
374-
<id>docs</id>
375-
<build>
376-
<plugins>
377-
<plugin>
378-
<groupId>com.github.eirslett</groupId>
379-
<artifactId>frontend-maven-plugin</artifactId>
380-
<version>1.12.1</version>
381-
<executions>
382-
<execution>
383-
<id>install node and npm</id>
384-
<goals>
385-
<goal>install-node-and-npm</goal>
386-
</goals>
387-
<phase>initialize</phase>
388-
<configuration>
389-
<nodeVersion>${node.version}</nodeVersion>
390-
<npmVersion>${npm.version}</npmVersion>
391-
</configuration>
392-
</execution>
393-
<execution>
394-
<id>npm install antora</id>
395-
<goals>
396-
<goal>npm</goal>
397-
</goals>
398-
<phase>initialize</phase>
399-
<configuration>
400-
<arguments>install @antora/cli@${antora.version} @antora/site-generator-default@${antora.version} @antora/atlas-extension@${antora-atlas.version} @antora/collector-extension@${antora-collector.version} @asciidoctor/tabs@${asciidoctor-tabs.version} @springio/antora-extensions@${spring-antora-extensions.version} @springio/asciidoctor-extensions@${spring-asciidoctor-extensions.version}</arguments>
401-
</configuration>
402-
</execution>
403-
</executions>
404-
</plugin>
405-
<plugin>
406-
<groupId>org.codehaus.mojo</groupId>
407-
<artifactId>exec-maven-plugin</artifactId>
408-
<version>3.0.0</version>
409-
<executions>
410-
<execution>
411-
<id>antora</id>
412-
<goals>
413-
<goal>exec</goal>
414-
</goals>
415-
<phase>compile</phase>
416-
<configuration>
417-
<!-- If we don't want to depend on default node installation path we can use a maven
418-
property aligned with frontend-maven-plugin's installDirectory configuration -->
419-
<executable>node/node</executable>
420-
<arguments>
421-
<argument>node_modules/.bin/antora</argument>
422-
<argument>src/main/antora/antora-playbook.yml</argument>
423-
<argument>--to-dir=target/site</argument>
424-
</arguments>
425-
<workingDirectory>${project.basedir}</workingDirectory>
426-
</configuration>
427-
</execution>
428-
</executions>
429-
</plugin>
430-
<plugin>
431-
<groupId>org.apache.maven.plugins</groupId>
432-
<artifactId>maven-clean-plugin</artifactId>
433-
<version>3.1.0</version>
434-
<configuration>
435-
<filesets>
436-
<fileset>
437-
<directory>node</directory>
438-
<followSymlinks>false</followSymlinks>
439-
</fileset>
440-
<fileset>
441-
<directory>node_modules</directory>
442-
<followSymlinks>false</followSymlinks>
443-
</fileset>
444-
<fileset>
445-
<directory>build</directory>
446-
<followSymlinks>false</followSymlinks>
447-
</fileset>
448-
</filesets>
449-
</configuration>
450-
</plugin>
451-
</plugins>
452-
<resources>
453-
<resource>
454-
<directory>src/main/resources</directory>
455-
<filtering>true</filtering>
456-
</resource>
457-
</resources>
458-
</build>
459-
</profile>
460-
</profiles>
461-
462393
<repositories>
463394
<repository>
464395
<id>spring-snapshot</id>

Diff for: src/main/antora/antora.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ nav:
66
ext:
77
collector:
88
- run:
9-
command: mvnw -Pdocs resources:resources
9+
command: mvnw process-resources
1010
local: true
1111
scan:
1212
dir: target/classes/antora-resources

Diff for: src/main/resources/antora-resources/antora.yml renamed to src/main/antora/resources/antora-resources/antora.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version: ${project.version}
2-
1+
version: ${antora-component.version}
2+
prerelease: ${antora-component.prerelease}
33
asciidoc:
44
attributes:
55
attribute-missing: 'warn'

0 commit comments

Comments
 (0)