#5 ignore jTidy crashes when generating maven plugin descriptors
Merged 4 years ago by decathorpe. Opened 4 years ago by decathorpe.
Unknown source master  into  master

@@ -0,0 +1,16 @@

+ 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 771b08b..05fef85 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

+ @@ -291,6 +291,11 @@ public final class GeneratorUtils

+          {

+              // cannot happen as every JVM must support UTF-8, see also class javadoc for java.nio.charset.Charset

+          }

+ +        catch ( NullPointerException e )

+ +        {

+ +            // if this happens, then the JavaDoc is messed up, so just ignore it

+ +            return "";

+ +        }

+  

+          if ( StringUtils.isEmpty( commentCleaned ) )

+          {

file modified
+8 -2
@@ -3,7 +3,7 @@

  

  Name:           maven-plugin-tools

  Version:        3.6.0

- Release:        3%{?dist}

+ Release:        4%{?dist}

  Epoch:          0

  Summary:        Maven Plugin Tools

  License:        ASL 2.0
@@ -12,7 +12,8 @@

  

  Source0:        https://repo1.maven.org/maven2/org/apache/maven/plugin-tools/%{name}/%{version}/%{name}-%{version}-source-release.zip

  

- Patch0:         0001-Port-to-plexus-utils-3.0.24.patch

+ Patch0:         0000-ignore-jtidy-crashes.patch

+ Patch1:         0001-Port-to-plexus-utils-3.0.24.patch

  

  BuildRequires:  maven-local

  BuildRequires:  mvn(com.thoughtworks.qdox:qdox)
@@ -172,7 +173,9 @@

  

  %prep

  %setup -q

+ 

  %patch0 -p1

+ %patch1 -p1

  

  %pom_remove_plugin :maven-enforcer-plugin

  
@@ -234,6 +237,9 @@

  

  

  %changelog

+ * Thu May 14 2020 Fabio Valentini <decathorpe@gmail.com> - 0:3.6.0-4

+ - Ignore jTidy crashes when generating maven plugin descriptors.

+ 

  * Sun Mar 29 2020 Fabio Valentini <decathorpe@gmail.com> - 0:3.6.0-3

  - Disable unused beanshell support.

  

Sometimes, jTidy goes crazy when parsing HTML, and when this happens, the descriptor goal from maven-plugin-plugin crashes.
We obviously don't want that, so just ignore NPEs from jTidy :)

Fixes: maven-surefire FTBFS in rawhide

Yeah I don't see anything obviously wrong with the SureFire plugin javadoc and the -Xdoclint:all isn't giving me anything useful. Let's merge this. :thumbsup:

Pull-Request has been merged by decathorpe

4 years ago