Accepting request 1100556 from Java:packages
Don't depend on jtidy OBS-URL: https://build.opensuse.org/request/show/1100556 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-plugin-tools?expand=0&rev=8
This commit is contained in:
commit
fa1e2ba776
145
0004-Remove-dependency-on-jtidy.patch
Normal file
145
0004-Remove-dependency-on-jtidy.patch
Normal file
@ -0,0 +1,145 @@
|
||||
--- maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java 2018-10-29 10:41:50.000000000 +0100
|
||||
+++ maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java 2023-07-24 23:08:19.511756145 +0200
|
||||
@@ -544,11 +544,11 @@
|
||||
{
|
||||
description =
|
||||
"<strong>" + getBundle( locale ).getString( "report.plugin.goal.deprecated" ) + "</strong> "
|
||||
- + GeneratorUtils.makeHtmlValid( mojo.getDeprecated() );
|
||||
+ + mojo.getDeprecated();
|
||||
}
|
||||
else if ( StringUtils.isNotEmpty( mojo.getDescription() ) )
|
||||
{
|
||||
- description = GeneratorUtils.makeHtmlValid( mojo.getDescription() );
|
||||
+ description = mojo.getDescription();
|
||||
}
|
||||
else
|
||||
{
|
||||
--- 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;
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
- * @return The description with valid XHTML tags, never <code>null</code>.
|
||||
- */
|
||||
- public static String makeHtmlValid( String description )
|
||||
- {
|
||||
- if ( StringUtils.isEmpty( description ) )
|
||||
- {
|
||||
- return "";
|
||||
- }
|
||||
-
|
||||
- String commentCleaned = decodeJavadocTags( description );
|
||||
-
|
||||
- // Using jTidy to clean comment
|
||||
- Tidy tidy = new Tidy();
|
||||
- tidy.setDocType( "loose" );
|
||||
- tidy.setXHTML( true );
|
||||
- tidy.setXmlOut( true );
|
||||
- tidy.setInputEncoding( "UTF-8" );
|
||||
- tidy.setOutputEncoding( "UTF-8" );
|
||||
- tidy.setMakeClean( true );
|
||||
- tidy.setNumEntities( true );
|
||||
- tidy.setQuoteNbsp( false );
|
||||
- tidy.setQuiet( true );
|
||||
- tidy.setShowWarnings( false );
|
||||
- try
|
||||
- {
|
||||
- ByteArrayOutputStream out = new ByteArrayOutputStream( commentCleaned.length() + 256 );
|
||||
- tidy.parse( new ByteArrayInputStream( commentCleaned.getBytes( "UTF-8" ) ), out );
|
||||
- commentCleaned = out.toString( "UTF-8" );
|
||||
- }
|
||||
- catch ( UnsupportedEncodingException e )
|
||||
- {
|
||||
- // cannot happen as every JVM must support UTF-8, see also class javadoc for java.nio.charset.Charset
|
||||
- }
|
||||
-
|
||||
- if ( StringUtils.isEmpty( commentCleaned ) )
|
||||
- {
|
||||
- return "";
|
||||
- }
|
||||
-
|
||||
- // strip the header/body stuff
|
||||
- String ls = System.getProperty( "line.separator" );
|
||||
- int startPos = commentCleaned.indexOf( "<body>" + ls ) + 6 + ls.length();
|
||||
- int endPos = commentCleaned.indexOf( ls + "</body>" );
|
||||
- commentCleaned = commentCleaned.substring( startPos, endPos );
|
||||
-
|
||||
- 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:
|
||||
* <ul>
|
||||
@@ -337,7 +284,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
- parser.parse( new StringReader( makeHtmlValid( html ) ), htmlCallback, true );
|
||||
+ parser.parse( new StringReader( html ), htmlCallback, true );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
--- 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>
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 24 21:05:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* 0004-Remove-dependency-on-jtidy.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 13 09:17:09 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -30,6 +30,7 @@ Source1: %{base_name}-build.tar.xz
|
||||
Patch0: 0001-Avoid-duplicate-MOJO-parameters.patch
|
||||
Patch1: 0002-Deal-with-nulls-from-getComment.patch
|
||||
Patch2: 0003-Port-to-plexus-utils-3.0.24.patch
|
||||
Patch3: 0004-Remove-dependency-on-jtidy.patch
|
||||
# The maven-plugin-plugin is used to generate those descriptors, which
|
||||
# creates a circular dependency of maven-plugin-plugin on itself.
|
||||
# We generated those ones outside the rpm build for a bootstrap package.
|
||||
@ -70,6 +71,7 @@ artifact metadata and a generic help goal.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch20 -p1
|
||||
|
||||
%pom_remove_plugin -r :maven-enforcer-plugin
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 24 21:05:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* 0004-Remove-dependency-on-jtidy.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 25 10:29:02 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -28,6 +28,7 @@ Source0: http://repo2.maven.org/maven2/org/apache/maven/plugin-tools/%{ba
|
||||
Patch0: 0001-Avoid-duplicate-MOJO-parameters.patch
|
||||
Patch1: 0002-Deal-with-nulls-from-getComment.patch
|
||||
Patch2: 0003-Port-to-plexus-utils-3.0.24.patch
|
||||
Patch3: 0004-Remove-dependency-on-jtidy.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: unzip
|
||||
@ -78,6 +79,7 @@ API documentation for %{name}.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%pom_remove_plugin -r :maven-enforcer-plugin
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 24 21:05:56 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* 0004-Remove-dependency-on-jtidy.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 5 08:28:11 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -28,6 +28,7 @@ Source1: %{name}-build.tar.xz
|
||||
Patch0: 0001-Avoid-duplicate-MOJO-parameters.patch
|
||||
Patch1: 0002-Deal-with-nulls-from-getComment.patch
|
||||
Patch2: 0003-Port-to-plexus-utils-3.0.24.patch
|
||||
Patch3: 0004-Remove-dependency-on-jtidy.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: apache-commons-cli
|
||||
BuildRequires: atinject
|
||||
@ -38,7 +39,6 @@ BuildRequires: guava
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: jdom2
|
||||
BuildRequires: jtidy
|
||||
BuildRequires: junit
|
||||
BuildRequires: maven-lib
|
||||
BuildRequires: maven-reporting-api
|
||||
@ -157,6 +157,7 @@ API documentation for %{name}.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%pom_remove_plugin -r :maven-enforcer-plugin
|
||||
|
||||
@ -169,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
|
||||
@ -184,7 +187,6 @@ build-jar-repository -s lib \
|
||||
guava/guava \
|
||||
guice/google-guice-no_aop \
|
||||
jdom2/jdom2 \
|
||||
jtidy \
|
||||
junit \
|
||||
maven/maven-artifact \
|
||||
maven/maven-compat \
|
||||
|
Loading…
Reference in New Issue
Block a user