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 29, 2023
1 parent 52cf6b5 commit 8432664
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 66 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.10.2-SNAPSHOT</version>
<version>3.11.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.10.2-SNAPSHOT</version>
<version>3.11.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.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -86,7 +86,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 @@ -98,8 +103,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 @@ -249,8 +254,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,17 @@ protected MavenProject getProject() {
* {@inheritDoc}
*/
public boolean canGenerateReport() {
if (skip || skipReport) {
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,15 @@ protected MavenProject getProject() {

/** {@inheritDoc} */
public boolean canGenerateReport() {
if (skip || skipReport) {
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 @@ -137,7 +137,6 @@ public boolean canGenerateReport() {
@Override
protected void executeReport(Locale locale) throws MavenReportException {
if (skip) {
getLog().info("Maven Plugin Plugin Report generation skipped.");
return;
}

Expand Down Expand Up @@ -205,24 +204,23 @@ public String getOutputName() {
*/
private void generateMojosDocumentation(PluginDescriptor pluginDescriptor, Locale locale)
throws MavenReportException {

if (pluginDescriptor.getMojos() != null) {
for (MojoDescriptor descriptor : pluginDescriptor.getMojos()) {
GoalRenderer renderer;
try {
String filename = descriptor.getGoal() + "-mojo.html";
Sink sink = getSinkFactory().createSink(outputDirectory, filename);
Sink sink = getSinkFactory().createSink(getReportOutputDirectory(), filename);
renderer = new GoalRenderer(
sink,
i18n,
locale,
project,
descriptor,
outputDirectory,
getReportOutputDirectory(),
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.10.2-SNAPSHOT</version>
<version>3.11.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.10.2-SNAPSHOT</version>
<version>3.11.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.10.2-SNAPSHOT</version>
<version>3.11.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
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</li>
</ul>
<subsection name="Required Parameters">
<table border="0" class="bodyTable">
<table class="bodyTable">
<tr>
<th>Name</th>
<th>Type</th>
Expand Down Expand Up @@ -81,7 +81,7 @@
</table>
</subsection>
<subsection name="Optional Parameters">
<table border="0" class="bodyTable">
<table class="bodyTable">
<tr>
<th>Name</th>
<th>Type</th>
Expand Down Expand Up @@ -109,7 +109,7 @@
<subsection name="Parameter Details">
<h4>
<strong>
<a name="dir">&lt;dir&gt;</a>
<a id="dir">&lt;dir&gt;</a>
</strong>
</h4>
<div>Test parameter description</div>
Expand Down Expand Up @@ -142,7 +142,7 @@
<hr/>
<h4>
<strong>
<a name="withoutSince">&lt;withoutSince&gt;</a>
<a id="withoutSince">&lt;withoutSince&gt;</a>
</strong>
</h4>
<div>(no description)</div>
Expand Down
2 changes: 1 addition & 1 deletion maven-plugin-tools-java/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.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-tools-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-script/maven-plugin-tools-ant/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-script</artifactId>
<version>3.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-tools-ant</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-script/maven-plugin-tools-beanshell/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-script</artifactId>
<version>3.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-tools-beanshell</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-script/maven-plugin-tools-model/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-script</artifactId>
<version>3.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<artifactId>maven-plugin-tools-model</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-script/maven-script-ant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script</artifactId>
<version>3.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<artifactId>maven-script-ant</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-script/maven-script-beanshell/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-script</artifactId>
<version>3.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<artifactId>maven-script-beanshell</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-script/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
</parent>

<artifactId>maven-script</artifactId>
Expand Down
22 changes: 6 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools</artifactId>
<version>3.10.2-SNAPSHOT</version>
<version>3.11.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Maven Plugin Tools</name>
Expand Down Expand Up @@ -103,8 +103,8 @@
<asmVersion>9.5</asmVersion>
<plexusUtilsVersion>4.0.0</plexusUtilsVersion>
<plexusXmlVersion>3.0.0</plexusXmlVersion>
<reportingApiVersion>3.1.1</reportingApiVersion>
<reportingImplVersion>3.2.0</reportingImplVersion>
<reportingApiVersion>4.0.0-M8</reportingApiVersion>
<reportingImplVersion>4.0.0-M11</reportingImplVersion>
<compilerPluginVersion>3.11.0</compilerPluginVersion>
<javadocPluginVersion>3.5.0</javadocPluginVersion>
<project.build.outputTimestamp>2023-10-15T07:23:21Z</project.build.outputTimestamp>
Expand Down Expand Up @@ -193,12 +193,6 @@
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>${reportingImplVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -230,24 +224,20 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
<version>1.2</version>
<version>2.0</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
<exclusion>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- other -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
<artifactId>velocity-engine-core</artifactId>
<version>2.3</version>
</dependency>

<dependency>
Expand Down

0 comments on commit 8432664

Please sign in to comment.