You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/07/18 20:10:53 UTC
[maven-plugin-tools] 01/01: Prepare for Doxia (Sitetools) 2.0.0
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch prepare-for-doxia-2
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git
commit 8afea467187626a20c4602976a763d98a9f7038e
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Mon Jul 18 22:05:30 2022 +0200
Prepare for Doxia (Sitetools) 2.0.0
* Simplify Velocity context setup
* Add/fix missing elements in site descriptors
* Upgrade Maven Project Reports Plugin to 3.4.0 for ITs
---
maven-plugin-plugin/pom.xml | 2 +-
.../antsample-maven-plugin/src/site/site.xml | 7 ++++++-
.../javasample-maven-plugin/src/site/site.xml | 7 ++++++-
.../maven/tools/plugin/generator/PluginHelpGenerator.java | 15 +++++++--------
4 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/maven-plugin-plugin/pom.xml b/maven-plugin-plugin/pom.xml
index 47f849fc..60f762c4 100644
--- a/maven-plugin-plugin/pom.xml
+++ b/maven-plugin-plugin/pom.xml
@@ -327,7 +327,7 @@
<streamLogsOnFailures>true</streamLogsOnFailures>
<filterProperties>
<sitePluginVersion>3.11.0</sitePluginVersion>
- <projectInfoReportsPlugin>3.2.2</projectInfoReportsPlugin>
+ <projectInfoReportsPlugin>3.4.0</projectInfoReportsPlugin>
<antVersion>${antVersion}</antVersion>
</filterProperties>
<properties>
diff --git a/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/src/site/site.xml b/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/src/site/site.xml
index fc47fd70..e4ac0af4 100644
--- a/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/src/site/site.xml
+++ b/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/src/site/site.xml
@@ -20,6 +20,11 @@
<project name="${artifactId}">
<publishDate position="right" format="dd/MM/yyyy, HH:mm" />
<version position="right"/>
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.11.1</version>
+ </skin>
<poweredBy>
<logo name="Maven" href="http://maven.apache.org/"
img="${project.url}/images/maven-feather.png" />
@@ -31,6 +36,6 @@
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
</menu>
- ${reports}
+ <menu ref="reports" />
</body>
</project>
diff --git a/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/src/site/site.xml b/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/src/site/site.xml
index 45203145..8f287660 100644
--- a/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/src/site/site.xml
+++ b/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/src/site/site.xml
@@ -20,6 +20,11 @@
<project name="${artifactId}">
<publishDate position="right" format="dd/MM/yyyy, HH:mm" />
<version position="right"/>
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.11.1</version>
+ </skin>
<poweredBy>
<logo name="Maven" href="http://maven.apache.org/"
img="${project.url}/images/maven-feather.png" />
@@ -31,7 +36,7 @@
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
</menu>
- ${reports}
+ <menu ref="reports" />
</body>
</project>
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
index 2c3af589..d430e5a0 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
@@ -184,20 +184,19 @@ public class PluginHelpGenerator
private String getHelpClassSources( String pluginHelpPath, PluginDescriptor pluginDescriptor )
throws IOException
{
- Properties properties = new Properties();
- VelocityContext context = new VelocityContext( properties );
+ VelocityContext context = new VelocityContext();
if ( this.helpPackageName != null )
{
- properties.put( "helpPackageName", this.helpPackageName );
+ context.put( "helpPackageName", this.helpPackageName );
}
else
{
- properties.put( "helpPackageName", "" );
+ context.put( "helpPackageName", "" );
}
- properties.put( "pluginHelpPath", pluginHelpPath );
- properties.put( "artifactId", pluginDescriptor.getArtifactId() );
- properties.put( "goalPrefix", pluginDescriptor.getGoalPrefix() );
- properties.put( "useAnnotations", useAnnotations );
+ context.put( "pluginHelpPath", pluginHelpPath );
+ context.put( "artifactId", pluginDescriptor.getArtifactId() );
+ context.put( "goalPrefix", pluginDescriptor.getGoalPrefix() );
+ context.put( "useAnnotations", useAnnotations );
StringWriter stringWriter = new StringWriter();