Skip to content

Commit

Permalink
Use io.spring.maven.antora
Browse files Browse the repository at this point in the history
  • Loading branch information
rwinch committed Aug 1, 2023
1 parent 9109378 commit 6b950a7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 93 deletions.
111 changes: 21 additions & 90 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -366,99 +366,30 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.spring.maven.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
<version>0.0.2-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<playbook>src/main/antora/antora-playbook.yml</playbook>
</configuration>
</plugin>
<plugin>
<groupId>io.spring.maven.antora</groupId>
<artifactId>antora-component-version-maven-plugin</artifactId>
<version>0.0.2-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>antora-component-version</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>docs</id>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.1</version>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>initialize</phase>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install antora</id>
<goals>
<goal>npm</goal>
</goals>
<phase>initialize</phase>
<configuration>
<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>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>antora</id>
<goals>
<goal>exec</goal>
</goals>
<phase>compile</phase>
<configuration>
<!-- If we don't want to depend on default node installation path we can use a maven
property aligned with frontend-maven-plugin's installDirectory configuration -->
<executable>node/node</executable>
<arguments>
<argument>node_modules/.bin/antora</argument>
<argument>src/main/antora/antora-playbook.yml</argument>
<argument>--to-dir=target/site</argument>
</arguments>
<workingDirectory>${project.basedir}</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filesets>
<fileset>
<directory>node</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>node_modules</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>build</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>spring-snapshot</id>
Expand Down
2 changes: 1 addition & 1 deletion src/main/antora/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nav:
ext:
collector:
- run:
command: mvnw -Pdocs resources:resources
command: mvnw process-resources
local: true
scan:
dir: target/classes/antora-resources
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: ${project.version}

version: ${antora-component.version}
prerelease: ${antora-component.prerelease}
asciidoc:
attributes:
attribute-missing: 'warn'
Expand Down

0 comments on commit 6b950a7

Please sign in to comment.