From c07334efe067853068dee3c6be05bde649b84585 Mon Sep 17 00:00:00 2001 From: Michael Osipov <1983-01-06@gmx.net> Date: Thu, 19 Jan 2023 20:36:56 +0100 Subject: [PATCH] Prepare for Doxia 2.0.0 --- pom.xml | 2 +- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../src/site/site.xml | 7 ---- .../mojo/versions/AbstractVersionsReport.java | 10 ----- .../AbstractVersionsReportRenderer.java | 16 +++++--- .../PluginUpdatesReportRenderer.java | 2 + .../PropertyUpdatesReportRenderer.java | 2 + .../reporting/VersionsReportRendererBase.java | 38 +------------------ 18 files changed, 17 insertions(+), 137 deletions(-) delete mode 100644 versions-maven-plugin/src/it/it-dependency-updates-aggregate-report-issue-333/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-dependency-updates-report-001/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-dependency-updates-report-002/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-dependency-updates-report-003/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-dependency-updates-report-004/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-parent-updates-report-001/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-plugin-updates-aggregate-report-issue-333/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-plugin-updates-report-001/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-plugin-updates-report-002/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-plugin-updates-report-003/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-property-updates-aggregate-report-issue-333/src/site/site.xml delete mode 100644 versions-maven-plugin/src/it/it-property-updates-report-001/src/site/site.xml diff --git a/pom.xml b/pom.xml index dd9daa58f5..fa32bcd892 100644 --- a/pom.xml +++ b/pom.xml @@ -129,7 +129,7 @@ 1.12.0 1.11.1 ${project.version} - 3.7 + 3.12.1 ${maven-fluido-skin.version} 2.1.0 diff --git a/versions-maven-plugin/src/it/it-dependency-updates-aggregate-report-issue-333/src/site/site.xml b/versions-maven-plugin/src/it/it-dependency-updates-aggregate-report-issue-333/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-dependency-updates-aggregate-report-issue-333/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-dependency-updates-report-001/src/site/site.xml b/versions-maven-plugin/src/it/it-dependency-updates-report-001/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-dependency-updates-report-001/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-dependency-updates-report-002/src/site/site.xml b/versions-maven-plugin/src/it/it-dependency-updates-report-002/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-dependency-updates-report-002/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-dependency-updates-report-003/src/site/site.xml b/versions-maven-plugin/src/it/it-dependency-updates-report-003/src/site/site.xml deleted file mode 100644 index 854b5fbbc1..0000000000 --- a/versions-maven-plugin/src/it/it-dependency-updates-report-003/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - \ No newline at end of file diff --git a/versions-maven-plugin/src/it/it-dependency-updates-report-004/src/site/site.xml b/versions-maven-plugin/src/it/it-dependency-updates-report-004/src/site/site.xml deleted file mode 100644 index 854b5fbbc1..0000000000 --- a/versions-maven-plugin/src/it/it-dependency-updates-report-004/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - \ No newline at end of file diff --git a/versions-maven-plugin/src/it/it-parent-updates-report-001/src/site/site.xml b/versions-maven-plugin/src/it/it-parent-updates-report-001/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-parent-updates-report-001/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-plugin-updates-aggregate-report-issue-333/src/site/site.xml b/versions-maven-plugin/src/it/it-plugin-updates-aggregate-report-issue-333/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-plugin-updates-aggregate-report-issue-333/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-plugin-updates-report-001/src/site/site.xml b/versions-maven-plugin/src/it/it-plugin-updates-report-001/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-plugin-updates-report-001/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-plugin-updates-report-002/src/site/site.xml b/versions-maven-plugin/src/it/it-plugin-updates-report-002/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-plugin-updates-report-002/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-plugin-updates-report-003/src/site/site.xml b/versions-maven-plugin/src/it/it-plugin-updates-report-003/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-plugin-updates-report-003/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-property-updates-aggregate-report-issue-333/src/site/site.xml b/versions-maven-plugin/src/it/it-property-updates-aggregate-report-issue-333/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-property-updates-aggregate-report-issue-333/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/it/it-property-updates-report-001/src/site/site.xml b/versions-maven-plugin/src/it/it-property-updates-report-001/src/site/site.xml deleted file mode 100644 index e955148484..0000000000 --- a/versions-maven-plugin/src/it/it-property-updates-report-001/src/site/site.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - org.apache.maven.skins - maven-default-skin - 1.0 - - diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java index 18f815eca6..1029da13b8 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java @@ -19,7 +19,6 @@ * under the License. */ -import java.io.File; import java.util.Locale; import java.util.Map; import java.util.Set; @@ -230,15 +229,6 @@ protected MavenProject getProject() { return project; } - @Override - protected String getOutputDirectory() { - if (!outputDirectory.isAbsolute()) { - outputDirectory = new File(project.getBasedir(), outputDirectory.getPath()); - } - - return outputDirectory.getAbsolutePath(); - } - @Override protected Renderer getSiteRenderer() { return siteRenderer; diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/AbstractVersionsReportRenderer.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/AbstractVersionsReportRenderer.java index 6d849e7c28..1b9d99ce8e 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/AbstractVersionsReportRenderer.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/AbstractVersionsReportRenderer.java @@ -112,9 +112,11 @@ protected void renderBody() { */ protected void renderOverview() { sink.table(); + sink.tableRows(null, false); sink.tableRow(); renderOverviewTableRow(computeOverviewStats()); sink.tableRow_(); + sink.tableRows_(); sink.table_(); } @@ -187,6 +189,7 @@ protected void renderIcon(boolean success) { protected void renderSummaryTable(Map contents, boolean hasScope) { sink.table(); + sink.tableRows(null, false); sink.tableRow(); renderSummaryTableHeader(hasScope, true); @@ -198,6 +201,7 @@ protected void renderSummaryTable(Map contents, bo renderSummaryTableHeader(hasScope, true); sink.tableRow_(); + sink.tableRows_(); sink.table_(); } @@ -368,26 +372,26 @@ protected void renderVersions(ArtifactVersion[] allUpdates, AbstractVersionDetai someNotAllowed = true; } if (allowed && label != null) { - safeBold(); + sink.bold(); } sink.text(allUpdates[i].toString()); if (label != null) { if (allowed) { - safeBold_(); + sink.bold_(); } sink.nonBreakingSpace(); - safeItalic(); + sink.italic(); sink.text(label); - safeItalic_(); + sink.italic_(); } } if (someNotAllowed) { sink.lineBreak(); sink.lineBreak(); sink.text("* "); - safeItalic(); + sink.italic(); sink.text(getText("report.excludedVersion")); - safeItalic_(); + sink.italic_(); } } diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PluginUpdatesReportRenderer.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PluginUpdatesReportRenderer.java index 1e1f9dbed2..43a2d059fe 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PluginUpdatesReportRenderer.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PluginUpdatesReportRenderer.java @@ -93,6 +93,7 @@ private void renderTable(String titleKey, Map protected void renderSummaryTable(Map contents) { sink.table(); + sink.tableRows(null, false); sink.tableRow(); renderSummaryTableHeader(false, false); @@ -104,6 +105,7 @@ protected void renderSummaryTable(Map contents renderSummaryTableHeader(false, false); sink.tableRow_(); + sink.tableRows_(); sink.table_(); } diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PropertyUpdatesReportRenderer.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PropertyUpdatesReportRenderer.java index 2913fcfb93..5c7269f5ef 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PropertyUpdatesReportRenderer.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/PropertyUpdatesReportRenderer.java @@ -81,6 +81,7 @@ protected void renderTable(String titleKey, Map cont protected void renderSummaryTable(Map contents) { sink.table(); + sink.tableRows(null, false); sink.tableRow(); renderSummaryTableHeader(false, false); @@ -92,6 +93,7 @@ protected void renderSummaryTable(Map contents) { renderSummaryTableHeader(false, false); sink.tableRow_(); + sink.tableRows_(); sink.table_(); } diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/VersionsReportRendererBase.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/VersionsReportRendererBase.java index 0f21dbc1d3..10fa592e79 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/VersionsReportRendererBase.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/reporting/VersionsReportRendererBase.java @@ -96,40 +96,6 @@ protected boolean equals(ArtifactVersion v1, ArtifactVersion v2) { || (v1 != null && v2 != null && v1.toString().equals(v2.toString())); } - protected void safeBold() { - try { - sink.bold(); - } catch (NoSuchMethodError e) { - // ignore Maven 2.1.0 - } - } - - @SuppressWarnings("checkstyle:MethodName") - protected void safeBold_() { - try { - sink.bold_(); - } catch (NoSuchMethodError e) { - // ignore Maven 2.1.0 - } - } - - protected void safeItalic() { - try { - sink.italic(); - } catch (NoSuchMethodError e) { - // ignore Maven 2.1.0 - } - } - - @SuppressWarnings("checkstyle:MethodName") - protected void safeItalic_() { - try { - sink.italic_(); - } catch (NoSuchMethodError e) { - // ignore Maven 2.1.0 - } - } - /** * Renders a table header containing elements denoted by the given keys * @param keys variable argument list containing keys of the property file to retrieve the @@ -188,11 +154,11 @@ protected void renderBoldText(boolean bold, Object object) { String text = object.toString(); if (!text.isEmpty()) { if (bold) { - safeBold(); + sink.bold(); } sink.text(text); if (bold) { - safeBold_(); + sink.bold_(); } } }