Skip to content

Commit f2d04ae

Browse files
committed
Fix site integration failing with maven-site-plugin v3.10.0
This makes maven-site-plugin v3.10.0 the minimum compatible version * Make AsciidoctorDoxiaParser extend AbstractTextParser instad of XhtmlParser * Bump minimum Doxia version to v1.10 * Update maven-site-plugin it test Fixes #564
1 parent fb79430 commit f2d04ae

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Bug Fixes::
2222

2323
* Exclude dot files and folders from conversion (#555)
2424
* Fix `StringIndexOutOfBoundsException` parsing log records when cursor file is above source directory (#563)
25+
* Fix build failing with maven-site-plugin v3.10.0 (#566)
2526

2627
Build / Infrastructure::
2728

pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<plexus.utils.version>3.0.23</plexus.utils.version>
7777
<plexus.component.metadata.version>1.7</plexus.component.metadata.version>
7878
<netty.version>4.1.71.Final</netty.version>
79-
<doxia.version>1.8</doxia.version>
79+
<doxia.version>1.10</doxia.version>
8080
</properties>
8181

8282
<dependencyManagement>
@@ -143,11 +143,6 @@
143143
<artifactId>doxia-core</artifactId>
144144
<version>${doxia.version}</version>
145145
</dependency>
146-
<dependency>
147-
<groupId>org.apache.maven.doxia</groupId>
148-
<artifactId>doxia-module-xhtml</artifactId>
149-
<version>${doxia.version}</version>
150-
</dependency>
151146
<dependency>
152147
<groupId>org.junit.jupiter</groupId>
153148
<artifactId>junit-jupiter</artifactId>

src/it/maven-site-plugin/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
<build>
1616
<plugins>
1717
<!--
18-
Workaround to prevent `java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent`
18+
Up to v2.2.1, use v2.8.1 as workaround to prevent `java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent`
1919
with `maven-site-plugin` v3.6 or lower.
2020
This only affects the it tests, normal executions (e.g. in asciidoctor-maven-examples) work fine.
2121
-->
2222
<plugin>
2323
<groupId>org.apache.maven.plugins</groupId>
2424
<artifactId>maven-project-info-reports-plugin</artifactId>
25-
<version>2.8.1</version>
25+
<version>3.1.2</version>
2626
</plugin>
2727
<!-- tag::plugin-decl[] -->
2828
<plugin>
2929
<groupId>org.apache.maven.plugins</groupId>
3030
<artifactId>maven-site-plugin</artifactId>
31-
<!-- doxia 1.7 is only compatible with maven-site-plugin 3.4 or + -->
32-
<version>3.4</version>
31+
<!-- v2.2.2 of the plugin require Maven Site Plugin doxia 3.10.6 alongside Doxia 1.11.1 -->
32+
<version>3.10.0</version>
3333
<configuration>
3434
<asciidoc>
3535
<baseDir>${project.basedir}/src/site/asciidoc</baseDir>

src/main/java/org/asciidoctor/maven/site/AsciidoctorDoxiaParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.asciidoctor.maven.site;
22

3-
import org.apache.maven.doxia.module.xhtml.XhtmlParser;
3+
import org.apache.maven.doxia.parser.AbstractTextParser;
44
import org.apache.maven.doxia.parser.ParseException;
55
import org.apache.maven.doxia.parser.Parser;
66
import org.apache.maven.doxia.sink.Sink;
@@ -31,7 +31,7 @@
3131
* @author mojavelinux
3232
*/
3333
@Component(role = Parser.class, hint = AsciidoctorDoxiaParser.ROLE_HINT)
34-
public class AsciidoctorDoxiaParser extends XhtmlParser {
34+
public class AsciidoctorDoxiaParser extends AbstractTextParser {
3535

3636
@Inject
3737
protected Provider<MavenProject> mavenProjectProvider;
@@ -45,7 +45,7 @@ public class AsciidoctorDoxiaParser extends XhtmlParser {
4545
* {@inheritDoc}
4646
*/
4747
@Override
48-
public void parse(Reader reader, Sink sink) throws ParseException {
48+
public void parse(Reader reader, Sink sink, String reference) throws ParseException {
4949
String source;
5050
try {
5151
if ((source = IOUtil.toString(reader)) == null) {

0 commit comments

Comments
 (0)