This commit is contained in:
parent
cb07c82c87
commit
b4fe9eaa9d
@ -1,29 +1,17 @@
|
||||
From 6953b37ee5a7c0566d2e11e7141768f8a4c03fa2 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Mon, 27 Apr 2020 12:56:04 +0200
|
||||
Subject: [PATCH 2/3] Remove dependency on jtidy
|
||||
|
||||
---
|
||||
.../plugin/generator/GeneratorUtils.java | 55 +------------------
|
||||
1 file changed, 1 insertion(+), 54 deletions(-)
|
||||
|
||||
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
index e9ec47fe..1393b507 100644
|
||||
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
@@ -52,7 +52,6 @@ import org.apache.maven.reporting.MavenReport;
|
||||
--- maven-plugin-tools-3.6.0/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java 2018-10-29 10:41:50.000000000 +0100
|
||||
+++ maven-plugin-tools-3.6.0/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java 2023-07-24 22:39:51.914568518 +0200
|
||||
@@ -51,7 +51,6 @@
|
||||
import org.codehaus.plexus.component.repository.ComponentDependency;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.codehaus.plexus.util.xml.XMLWriter;
|
||||
-import org.w3c.tidy.Tidy;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
@@ -262,58 +261,6 @@ public final class GeneratorUtils
|
||||
return decoded.toString();
|
||||
/**
|
||||
* Convenience methods to play with Maven plugins.
|
||||
@@ -255,58 +254,6 @@
|
||||
}
|
||||
|
||||
- /**
|
||||
/**
|
||||
- * Fixes some javadoc comment to become a valid XHTML snippet.
|
||||
- *
|
||||
- * @param description Javadoc description with HTML tags, may be <code>null</code>.
|
||||
@ -53,7 +41,7 @@ index e9ec47fe..1393b507 100644
|
||||
- try
|
||||
- {
|
||||
- ByteArrayOutputStream out = new ByteArrayOutputStream( commentCleaned.length() + 256 );
|
||||
- tidy.parse( new ByteArrayInputStream( commentCleaned.getBytes( UTF_8 ) ), out );
|
||||
- tidy.parse( new ByteArrayInputStream( commentCleaned.getBytes( "UTF-8" ) ), out );
|
||||
- commentCleaned = out.toString( "UTF-8" );
|
||||
- }
|
||||
- catch ( UnsupportedEncodingException e )
|
||||
@ -75,10 +63,11 @@ index e9ec47fe..1393b507 100644
|
||||
- return commentCleaned;
|
||||
- }
|
||||
-
|
||||
/**
|
||||
- /**
|
||||
* Converts a HTML fragment as extracted from a javadoc comment to a plain text string. This method tries to retain
|
||||
* as much of the text formatting as possible by means of the following transformations:
|
||||
@@ -345,7 +292,7 @@ public final class GeneratorUtils
|
||||
* <ul>
|
||||
@@ -337,7 +284,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
@ -87,6 +76,54 @@ index e9ec47fe..1393b507 100644
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
--
|
||||
2.35.1
|
||||
|
||||
--- maven-plugin-tools-3.6.0/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java 2018-10-29 10:41:50.000000000 +0100
|
||||
+++ maven-plugin-tools-3.6.0/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java 2023-07-24 22:49:33.765883927 +0200
|
||||
@@ -202,7 +202,7 @@
|
||||
w.writeMarkup( getString( "pluginxdoc.mojodescriptor.deprecated" ) );
|
||||
w.endElement(); // p
|
||||
w.startElement( "div" );
|
||||
- w.writeMarkup( GeneratorUtils.makeHtmlValid( mojoDescriptor.getDeprecated() ) );
|
||||
+ w.writeMarkup( mojoDescriptor.getDeprecated() );
|
||||
w.endElement(); // div
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
w.startElement( "div" );
|
||||
if ( StringUtils.isNotEmpty( mojoDescriptor.getDescription() ) )
|
||||
{
|
||||
- w.writeMarkup( GeneratorUtils.makeHtmlValid( mojoDescriptor.getDescription() ) );
|
||||
+ w.writeMarkup( mojoDescriptor.getDescription() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -470,14 +470,14 @@
|
||||
{
|
||||
w.startElement( "div" );
|
||||
w.writeMarkup( format( "pluginxdoc.mojodescriptor.parameter.deprecated",
|
||||
- GeneratorUtils.makeHtmlValid( parameter.getDeprecated() ) ) );
|
||||
+ parameter.getDeprecated() ) );
|
||||
w.endElement(); // div
|
||||
}
|
||||
|
||||
w.startElement( "div" );
|
||||
if ( StringUtils.isNotEmpty( parameter.getDescription() ) )
|
||||
{
|
||||
- w.writeMarkup( GeneratorUtils.makeHtmlValid( parameter.getDescription() ) );
|
||||
+ w.writeMarkup( parameter.getDescription() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -689,11 +689,11 @@
|
||||
if ( StringUtils.isNotEmpty( parameter.getDeprecated() ) )
|
||||
{
|
||||
description = format( "pluginxdoc.mojodescriptor.parameter.deprecated",
|
||||
- GeneratorUtils.makeHtmlValid( parameter.getDeprecated() ) );
|
||||
+ parameter.getDeprecated() );
|
||||
}
|
||||
else if ( StringUtils.isNotEmpty( parameter.getDescription() ) )
|
||||
{
|
||||
- description = GeneratorUtils.makeHtmlValid( parameter.getDescription() );
|
||||
+ description = parameter.getDescription();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -388,7 +388,7 @@
|
||||
+</plugin>
|
||||
--- maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 2019-11-25 11:05:03.978261704 +0100
|
||||
@@ -0,0 +1,1062 @@
|
||||
@@ -0,0 +1,1056 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<plugin>
|
||||
+ <name>${project.name}</name>
|
||||
@ -1168,12 +1168,6 @@
|
||||
+ <version>3.6.0</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>net.sf.jtidy</groupId>
|
||||
+ <artifactId>jtidy</artifactId>
|
||||
+ <type>jar</type>
|
||||
+ <version>r938</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>xerces</groupId>
|
||||
+ <artifactId>dom3-xml-apis</artifactId>
|
||||
+ <type>jar</type>
|
||||
|
@ -170,6 +170,8 @@ API documentation for %{name}.
|
||||
|
||||
%pom_change_dep org.easymock:easymock:: :::test maven-plugin-tools-annotations
|
||||
|
||||
%pom_remove_dep net.sf.jtidy:jtidy maven-plugin-tools-generators
|
||||
|
||||
%{mvn_package} :maven-plugin-tools __noinstall
|
||||
%{mvn_package} :maven-script __noinstall
|
||||
%{mvn_package} :{*} @1
|
||||
|
Loading…
x
Reference in New Issue
Block a user