diff --git a/asciidoctor-converter-doxia-module/src/it/maven-site-plugin/pom.xml b/asciidoctor-converter-doxia-module/src/it/maven-site-plugin/pom.xml index afad503e..42079274 100644 --- a/asciidoctor-converter-doxia-module/src/it/maven-site-plugin/pom.xml +++ b/asciidoctor-converter-doxia-module/src/it/maven-site-plugin/pom.xml @@ -22,14 +22,14 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> - <version>3.1.2</version> + <version>3.3.0</version> </plugin> <!-- tag::plugin-decl[] --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <!-- v2.2.2 of the plugin require Maven Site Plugin 3.1x.0 alongside Doxia 1.11.1 --> - <version>3.12.1</version> + <version>4.0.0-M1</version> <configuration> <asciidoc> <baseDir>${project.basedir}/src/site/asciidoc</baseDir> diff --git a/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParser.java b/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParser.java index aacf0df7..0f6407dd 100644 --- a/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParser.java +++ b/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParser.java @@ -13,13 +13,14 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.xml.Xpp3Dom; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.inject.Inject; import javax.inject.Provider; import java.io.File; import java.io.IOException; import java.io.Reader; -import java.util.logging.Logger; /** * This class is used by <a href="https://maven.apache.org/doxia/overview.html">the Doxia framework</a> @@ -33,6 +34,8 @@ @Component(role = Parser.class, hint = AsciidoctorConverterDoxiaParser.ROLE_HINT) public class AsciidoctorConverterDoxiaParser extends AbstractTextParser { + private Logger logger = LoggerFactory.getLogger(AsciidoctorDoxiaParser.class); + @Inject protected Provider<MavenProject> mavenProjectProvider; @@ -52,7 +55,7 @@ public void parse(Reader reader, Sink sink, String reference) throws ParseExcept source = ""; } } catch (IOException ex) { - getLog().error("Could not read AsciiDoc source: " + ex.getLocalizedMessage()); + logger.error("Could not read AsciiDoc source: " + ex.getLocalizedMessage()); return; } @@ -79,7 +82,7 @@ public void parse(Reader reader, Sink sink, String reference) throws ParseExcept String asciidocHtml = convertAsciiDoc(asciidoctor, source, conversionConfig.getOptions()); try { // process log messages according to mojo configuration - new LogRecordsProcessors(logHandler, siteDirectory, errorMessage -> getLog().error(errorMessage)) + new LogRecordsProcessors(logHandler, siteDirectory, errorMessage -> logger.error(errorMessage)) .processLogRecords(memoryLogHandler); } catch (Exception exception) { throw new ParseException(exception.getMessage(), exception); @@ -91,10 +94,10 @@ public void parse(Reader reader, Sink sink, String reference) throws ParseExcept private MemoryLogHandler asciidoctorLoggingSetup(Asciidoctor asciidoctor, LogHandler logHandler, File siteDirectory) { final MemoryLogHandler memoryLogHandler = new MemoryLogHandler(logHandler.getOutputToConsole(), siteDirectory, - logRecord -> getLog().info(LogRecordFormatter.format(logRecord, siteDirectory))); + logRecord -> logger.info(LogRecordFormatter.format(logRecord, siteDirectory))); asciidoctor.registerLogHandler(memoryLogHandler); // disable default console output of AsciidoctorJ - Logger.getLogger("asciidoctor").setUseParentHandlers(false); + java.util.logging.Logger.getLogger("asciidoctor").setUseParentHandlers(false); return memoryLogHandler; } @@ -136,7 +139,7 @@ private void requireLibrary(Asciidoctor asciidoctor, String require) { try { asciidoctor.requireLibrary(require); } catch (Exception ex) { - getLog().error(ex.getLocalizedMessage()); + logger.error(ex.getLocalizedMessage()); } } } diff --git a/asciidoctor-parser-doxia-module/src/it/maven-site-plugin/src/site/site.xml b/asciidoctor-parser-doxia-module/src/it/maven-site-plugin/src/site/site.xml index 08a5002b..29077b73 100644 --- a/asciidoctor-parser-doxia-module/src/it/maven-site-plugin/src/site/site.xml +++ b/asciidoctor-parser-doxia-module/src/it/maven-site-plugin/src/site/site.xml @@ -1,8 +1,8 @@ <project name="Maven Site Plugin IT"> <body> + <menu ref="reports"/> <menu name="AsciiDoc Pages"> <item name="Sample" href="sample.html"/> </menu> - ${reports} </body> </project> diff --git a/docs/modules/site-integration/pages/compatibility-matrix.adoc b/docs/modules/site-integration/pages/compatibility-matrix.adoc index 3d43d1d0..fd4138f8 100644 --- a/docs/modules/site-integration/pages/compatibility-matrix.adoc +++ b/docs/modules/site-integration/pages/compatibility-matrix.adoc @@ -19,6 +19,11 @@ Since v3.x.x the Asciidoctor Maven Plugin has been split into independent compon |=== |Asciidoctor Maven Plugin | Maven Site Plugin | Supported +// TODO uncomment on release +//|v3.0.x +//|v3.1x.x ~ v4.x.x +//|Yes + |v2.2.2 |v3.1x.x |Yes