Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix site integration failing with maven-site-plugin v3.10.0 #566

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Expand Up @@ -22,6 +22,7 @@ Bug Fixes::

* Exclude dot files and folders from conversion (#555)
* Fix `StringIndexOutOfBoundsException` parsing log records when cursor file is above source directory (#563)
* Fix compatibility with maven-site-plugin v3.10.0 (previous versions no longer supported) (https://github.com/michael-o[@michael-o]) (#566)

Build / Infrastructure::

Expand Down
7 changes: 1 addition & 6 deletions pom.xml
Expand Up @@ -76,7 +76,7 @@
<plexus.utils.version>3.0.23</plexus.utils.version>
<plexus.component.metadata.version>1.7</plexus.component.metadata.version>
<netty.version>4.1.71.Final</netty.version>
<doxia.version>1.8</doxia.version>
<doxia.version>1.10</doxia.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -143,11 +143,6 @@
<artifactId>doxia-core</artifactId>
<version>${doxia.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-xhtml</artifactId>
<version>${doxia.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions src/it/maven-site-plugin/pom.xml
Expand Up @@ -15,21 +15,21 @@
<build>
<plugins>
<!--
Workaround to prevent `java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent`
Up to v2.2.1, use v2.8.1 as workaround to prevent `java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent`
with `maven-site-plugin` v3.6 or lower.
This only affects the it tests, normal executions (e.g. in asciidoctor-maven-examples) work fine.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8.1</version>
<version>3.1.2</version>
</plugin>
<!-- tag::plugin-decl[] -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<!-- doxia 1.7 is only compatible with maven-site-plugin 3.4 or + -->
<version>3.4</version>
<!-- v2.2.2 of the plugin require Maven Site Plugin 3.10.0 alongside Doxia 1.11.1 -->
<version>3.10.0</version>
<configuration>
<asciidoc>
<baseDir>${project.basedir}/src/site/asciidoc</baseDir>
Expand Down
@@ -1,6 +1,6 @@
package org.asciidoctor.maven.site;

import org.apache.maven.doxia.module.xhtml.XhtmlParser;
import org.apache.maven.doxia.parser.AbstractTextParser;
import org.apache.maven.doxia.parser.ParseException;
import org.apache.maven.doxia.parser.Parser;
import org.apache.maven.doxia.sink.Sink;
Expand Down Expand Up @@ -31,7 +31,7 @@
* @author mojavelinux
*/
@Component(role = Parser.class, hint = AsciidoctorDoxiaParser.ROLE_HINT)
public class AsciidoctorDoxiaParser extends XhtmlParser {
public class AsciidoctorDoxiaParser extends AbstractTextParser {

@Inject
protected Provider<MavenProject> mavenProjectProvider;
Expand All @@ -45,7 +45,7 @@ public class AsciidoctorDoxiaParser extends XhtmlParser {
* {@inheritDoc}
*/
@Override
public void parse(Reader reader, Sink sink) throws ParseException {
public void parse(Reader reader, Sink sink, String reference) throws ParseException {
String source;
try {
if ((source = IOUtil.toString(reader)) == null) {
Expand Down