From 39337269e28dea96de2e699830be97bf8bd55049 Mon Sep 17 00:00:00 2001 From: Abel Salgado Romero Date: Sat, 20 Jan 2024 12:14:50 +0100 Subject: [PATCH] Checkpoint: use latest available Doxia 2.0.0-M8 * Unify Doxia versions in parent pom * Use same Doxia version for doxia-core and doxia-site-renderer * Use javax.inject.Named instead of custom Plexus * Bump maven-site-plugin to 4.0.0-M13 --- asciidoctor-converter-doxia-module/pom.xml | 2 +- .../maven/site/AsciidoctorConverterDoxiaParser.java | 5 ++--- .../maven/site/AsciidoctorConverterDoxiaParserModule.java | 6 +++--- asciidoctor-parser-doxia-module/pom.xml | 2 +- .../maven/site/ast/AsciidoctorAstDoxiaParser.java | 6 +++--- .../maven/site/ast/AsciidoctorAstDoxiaParserModule.java | 6 +++--- .../site/ast/processors/test/TestNodeProcessorFactory.java | 4 ++-- pom.xml | 6 ++++-- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/asciidoctor-converter-doxia-module/pom.xml b/asciidoctor-converter-doxia-module/pom.xml index 3f8a3976..3061c8a6 100644 --- a/asciidoctor-converter-doxia-module/pom.xml +++ b/asciidoctor-converter-doxia-module/pom.xml @@ -47,7 +47,7 @@ org.apache.maven.doxia doxia-site-renderer - ${doxia-site-renderer.version} + ${doxia.version} test 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 2e8f3126..455e8145 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 @@ -2,7 +2,6 @@ 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; import org.apache.maven.project.MavenProject; import org.asciidoctor.*; @@ -10,13 +9,13 @@ import org.asciidoctor.maven.log.LogRecordFormatter; import org.asciidoctor.maven.log.LogRecordsProcessors; import org.asciidoctor.maven.log.MemoryLogHandler; -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.Named; import javax.inject.Provider; import java.io.File; import java.io.IOException; @@ -31,7 +30,7 @@ * @author jdlee * @author mojavelinux */ -@Component(role = Parser.class, hint = AsciidoctorConverterDoxiaParser.ROLE_HINT) +@Named(AsciidoctorConverterDoxiaParser.ROLE_HINT) public class AsciidoctorConverterDoxiaParser extends AbstractTextParser { private final Logger logger = LoggerFactory.getLogger(AsciidoctorConverterDoxiaParser.class); diff --git a/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParserModule.java b/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParserModule.java index cb39ac9a..049194ea 100644 --- a/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParserModule.java +++ b/asciidoctor-converter-doxia-module/src/main/java/org/asciidoctor/maven/site/AsciidoctorConverterDoxiaParserModule.java @@ -1,8 +1,8 @@ package org.asciidoctor.maven.site; import org.apache.maven.doxia.parser.module.AbstractParserModule; -import org.apache.maven.doxia.parser.module.ParserModule; -import org.codehaus.plexus.component.annotations.Component; + +import javax.inject.Named; /** * This class is the entry point for integration with the Maven Site Plugin @@ -12,7 +12,7 @@ * * @author jdlee */ -@Component(role = ParserModule.class, hint = AsciidoctorConverterDoxiaParser.ROLE_HINT) +@Named(AsciidoctorConverterDoxiaParser.ROLE_HINT) public class AsciidoctorConverterDoxiaParserModule extends AbstractParserModule { /** diff --git a/asciidoctor-parser-doxia-module/pom.xml b/asciidoctor-parser-doxia-module/pom.xml index ce45159e..f956c713 100644 --- a/asciidoctor-parser-doxia-module/pom.xml +++ b/asciidoctor-parser-doxia-module/pom.xml @@ -52,7 +52,7 @@ org.apache.maven.doxia doxia-site-renderer - ${doxia-site-renderer.version} + ${doxia.version} test diff --git a/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParser.java b/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParser.java index 9777b26e..2bcfd290 100644 --- a/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParser.java +++ b/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParser.java @@ -2,7 +2,6 @@ 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; import org.apache.maven.project.MavenProject; import org.asciidoctor.*; @@ -14,14 +13,15 @@ import org.asciidoctor.maven.site.SiteConversionConfiguration; import org.asciidoctor.maven.site.SiteConversionConfigurationParser; import org.asciidoctor.maven.site.SiteLogHandlerDeserializer; -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.Named; import javax.inject.Provider; + import java.io.File; import java.io.IOException; import java.io.Reader; @@ -35,7 +35,7 @@ * * @author abelsromero */ -@Component(role = Parser.class, hint = AsciidoctorAstDoxiaParser.ROLE_HINT) +@Named(AsciidoctorAstDoxiaParser.ROLE_HINT) public class AsciidoctorAstDoxiaParser extends AbstractTextParser { private final Logger logger = LoggerFactory.getLogger(AsciidoctorAstDoxiaParser.class); diff --git a/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParserModule.java b/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParserModule.java index 3e821f23..22c8c736 100644 --- a/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParserModule.java +++ b/asciidoctor-parser-doxia-module/src/main/java/org/asciidoctor/maven/site/ast/AsciidoctorAstDoxiaParserModule.java @@ -1,8 +1,8 @@ package org.asciidoctor.maven.site.ast; import org.apache.maven.doxia.parser.module.AbstractParserModule; -import org.apache.maven.doxia.parser.module.ParserModule; -import org.codehaus.plexus.component.annotations.Component; + +import javax.inject.Named; /** * This class is the entry point for integration with the Maven Site Plugin @@ -12,7 +12,7 @@ * * @author abelsromero */ -@Component(role = ParserModule.class, hint = AsciidoctorAstDoxiaParser.ROLE_HINT) +@Named(AsciidoctorAstDoxiaParser.ROLE_HINT) public class AsciidoctorAstDoxiaParserModule extends AbstractParserModule { /** diff --git a/asciidoctor-parser-doxia-module/src/test/java/org/asciidoctor/maven/site/ast/processors/test/TestNodeProcessorFactory.java b/asciidoctor-parser-doxia-module/src/test/java/org/asciidoctor/maven/site/ast/processors/test/TestNodeProcessorFactory.java index 142757d4..9742f041 100644 --- a/asciidoctor-parser-doxia-module/src/test/java/org/asciidoctor/maven/site/ast/processors/test/TestNodeProcessorFactory.java +++ b/asciidoctor-parser-doxia-module/src/test/java/org/asciidoctor/maven/site/ast/processors/test/TestNodeProcessorFactory.java @@ -3,7 +3,7 @@ import lombok.SneakyThrows; import org.apache.commons.lang3.tuple.Pair; import org.apache.maven.doxia.sink.Sink; -import org.apache.maven.doxia.siterenderer.RenderingContext; +import org.apache.maven.doxia.siterenderer.DocumentRenderingContext; import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink; import org.asciidoctor.maven.site.ast.NodeProcessor; import org.mockito.Mockito; @@ -20,6 +20,6 @@ public static Pair create(Class clazz) { } public static Sink createSink() { - return new SiteRendererSink(Mockito.mock(RenderingContext.class)); + return new SiteRendererSink(Mockito.mock(DocumentRenderingContext.class)); } } diff --git a/pom.xml b/pom.xml index 34d9b64e..db4a9f3a 100644 --- a/pom.xml +++ b/pom.xml @@ -72,8 +72,10 @@ UTF-8 11 3.9.6 - 2.0.0-M7 - 2.0.0-M6 + + 2.0.0-M8 2.2.0 2.5.11 9.4.5.0