Skip to content

Commit

Permalink
Prepare for Doxia 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Oct 14, 2023
1 parent 679d822 commit 2a63924
Show file tree
Hide file tree
Showing 24 changed files with 916 additions and 63 deletions.
2 changes: 1 addition & 1 deletion maven-plugin-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.9.1-SNAPSHOT</version>
<version>3.10.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-annotations</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-plugin-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.9.1-SNAPSHOT</version>
<version>3.10.0-SNAPSHOT</version>
</parent>

<groupId>org.apache.maven.plugins</groupId>
Expand Down
16 changes: 11 additions & 5 deletions maven-plugin-report-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.9.1-SNAPSHOT</version>
<version>3.10.0-SNAPSHOT</version>
</parent>

<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -82,7 +82,12 @@
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
<version>1.11.1</version>
<version>2.0.0-M8</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
<version>2.0.0-M13</version>
</dependency>

<!-- shared -->
Expand All @@ -94,8 +99,8 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8.1</version>
<!--same version as used by doxia site renderer -->
<version>3.12.0</version>
</dependency>
<!-- plexus -->
<dependency>
Expand Down Expand Up @@ -245,8 +250,9 @@
<settingsFile>src/it/settings.xml</settingsFile>
<streamLogsOnFailures>true</streamLogsOnFailures>
<filterProperties>
<sitePluginVersion>3.12.1</sitePluginVersion>
<projectInfoReportsPlugin>3.4.1</projectInfoReportsPlugin>
<sitePluginVersion>4.0.0-M10</sitePluginVersion>
<projectInfoReportsPlugin>4.0.0-M1-SNAPSHOT</projectInfoReportsPlugin>
<compilerPluginVersion>3.11.0</compilerPluginVersion>
<antVersion>${antVersion}</antVersion>
</filterProperties>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,18 @@ protected MavenProject getProject() {
* {@inheritDoc}
*/
public boolean canGenerateReport() {
if (skip || skipReport) {
getLog().info("Maven Plugin Plugin Report generation skipped.");
return false;
}

return true;
}

/**
* {@inheritDoc}
*/
protected void executeReport(Locale locale) throws MavenReportException {
if (!canGenerateReport()) {
return;
}
if (skip || skipReport) {
getLog().info("Maven Plugin Plugin Report generation skipped.");
return;
}

// Generate the plugin's documentation
generatePluginDocumentation(locale);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
<configuration>
<locales>en</locales>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion maven-plugin-report-plugin/src/it/plugin-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ under the License.
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
<configuration>
<locales>en,de,fr</locales>
<locales>default,de,fr</locales>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,16 @@ protected MavenProject getProject() {

/** {@inheritDoc} */
public boolean canGenerateReport() {
if (skip || skipReport) {
getLog().info("Maven Plugin Plugin Report generation skipped.");
return false;
}

return true;
}

/** {@inheritDoc} */
protected void executeReport(Locale locale) throws MavenReportException {
if (!canGenerateReport()) {
return;
}
if (skip || skipReport) {
getLog().info("Maven Plugin Plugin Report generation skipped.");
return;
}

// Generate the plugin's documentation
generatePluginDocumentation(locale);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet.Semantics;
import org.apache.maven.doxia.util.HtmlTools;
import org.apache.maven.doxia.util.DoxiaUtils;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.Parameter;
import org.apache.maven.plugin.logging.Log;
Expand Down Expand Up @@ -260,7 +260,7 @@ private void renderParameterOverviewTableRow(Parameter parameter) {
renderTableCellWithCode(
format("parameter.name", parameter.getName()),
// no need for additional URI encoding as it returns only URI safe characters
Optional.of("#" + HtmlTools.encodeId(parameter.getName())));
Optional.of("#" + DoxiaUtils.encodeId(parameter.getName())));

// type
Map.Entry<String, Optional<String>> type = getLinkedType(parameter, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ private void renderUsageSection(boolean hasMavenReport) {
sb.append(" ...").append(Markup.EOL);
sb.append("</project>");

verbatimText(sb.toString());
verbatimSource(sb.toString());

sink.paragraph();
linkPatternedText(getI18nString("configuration.end"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ public String getOutputName() {
*/
private void generateMojosDocumentation(PluginDescriptor pluginDescriptor, Locale locale)
throws MavenReportException {

if (pluginDescriptor.getMojos() != null) {
for (MojoDescriptor descriptor : pluginDescriptor.getMojos()) {
GoalRenderer renderer;
Expand All @@ -222,7 +221,7 @@ private void generateMojosDocumentation(PluginDescriptor pluginDescriptor, Local
disableInternalJavadocLinkValidation,
getLog());
} catch (IOException e) {
throw new MavenReportException("Can not generate sink for mojo " + descriptor.getGoal(), e);
throw new MavenReportException("Cannot generate sink for mojo " + descriptor.getGoal(), e);
}
renderer.render();
}
Expand Down
2 changes: 1 addition & 1 deletion maven-plugin-tools-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.9.1-SNAPSHOT</version>
<version>3.10.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-tools-annotations</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-plugin-tools-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.9.1-SNAPSHOT</version>
<version>3.10.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-tools-api</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions maven-plugin-tools-generators/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.9.1-SNAPSHOT</version>
<version>3.10.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-tools-generators</artifactId>
Expand Down Expand Up @@ -57,7 +57,7 @@
<!-- other -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<artifactId>velocity-engine-core</artifactId>
</dependency>

<dependency>
Expand Down

0 comments on commit 2a63924

Please sign in to comment.