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

Prepare for Doxia 2.0.0 #905

Merged
merged 1 commit into from
Jan 25, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<doxiaVersion>1.12.0</doxiaVersion>
<doxia-sitetoolsVersion>1.11.1</doxia-sitetoolsVersion>
<pluginVersion>${project.version}</pluginVersion>
<sitePluginVersion>3.7</sitePluginVersion>
<sitePluginVersion>3.12.1</sitePluginVersion>
<!-- dotted property can not be used in .vm -->
<fluidoVersion>${maven-fluido-skin.version}</fluidoVersion>
<modelloNamespaceRuleVersion>2.1.0</modelloNamespaceRuleVersion>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* under the License.
*/

import java.io.File;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_();
}

Expand Down Expand Up @@ -187,6 +189,7 @@ protected void renderIcon(boolean success) {

protected void renderSummaryTable(Map<Dependency, ArtifactVersions> contents, boolean hasScope) {
sink.table();
sink.tableRows(null, false);

sink.tableRow();
renderSummaryTableHeader(hasScope, true);
Expand All @@ -198,6 +201,7 @@ protected void renderSummaryTable(Map<Dependency, ArtifactVersions> contents, bo
renderSummaryTableHeader(hasScope, true);
sink.tableRow_();

sink.tableRows_();
sink.table_();
}

Expand Down Expand Up @@ -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_();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ private void renderTable(String titleKey, Map<Dependency, PluginUpdatesDetails>

protected void renderSummaryTable(Map<Dependency, PluginUpdatesDetails> contents) {
sink.table();
sink.tableRows(null, false);

sink.tableRow();
renderSummaryTableHeader(false, false);
Expand All @@ -104,6 +105,7 @@ protected void renderSummaryTable(Map<Dependency, PluginUpdatesDetails> contents
renderSummaryTableHeader(false, false);
sink.tableRow_();

sink.tableRows_();
sink.table_();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ protected void renderTable(String titleKey, Map<Property, PropertyVersions> cont

protected void renderSummaryTable(Map<Property, PropertyVersions> contents) {
sink.table();
sink.tableRows(null, false);

sink.tableRow();
renderSummaryTableHeader(false, false);
Expand All @@ -92,6 +93,7 @@ protected void renderSummaryTable(Map<Property, PropertyVersions> contents) {
renderSummaryTableHeader(false, false);
sink.tableRow_();

sink.tableRows_();
sink.table_();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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_();
}
}
}
Expand Down