Update to upstream version 3.5.1

This commit is contained in:
Mikolaj Izdebski 2018-01-26 08:27:40 +01:00
parent 47ecfaa90b
commit 2a11fe3caf
6 changed files with 121 additions and 117 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ maven-plugin-tools-2.7-source-release.zip
/maven-plugin-tools-3.3-source-release.zip
/maven-plugin-tools-3.4-source-release.zip
/maven-plugin-tools-3.5-source-release.zip
/maven-plugin-tools-3.5.1-source-release.zip

View File

@ -1,4 +1,4 @@
From c3ac93da0ffa924b76c01bd1119e9e5fdf538cb0 Mon Sep 17 00:00:00 2001
From 0ebe12503766c6a76c507498e9e7f0cb1c4469c2 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 16 Mar 2015 14:29:21 +0100
Subject: [PATCH 1/3] Avoid duplicate MOJO parameters
@ -8,61 +8,61 @@ Subject: [PATCH 1/3] Avoid duplicate MOJO parameters
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
index 231f623..a034dc2 100644
index 587ddad..231ed12 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
@@ -29,6 +29,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -573,7 +574,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
parameter.setSince( parameterAnnotationContent.getSince() );
parameter.setRequired( parameterAnnotationContent.required() );
- mojoDescriptor.addParameter( parameter );
+ addParameter( mojoDescriptor, parameter );
}
// Component annotations
parameter.setSince( parameterAnnotationContent.getSince() );
parameter.setRequired( parameterAnnotationContent.required() );
- mojoDescriptor.addParameter( parameter );
+ addParameter( mojoDescriptor, parameter );
}
// Component annotations
@@ -614,7 +615,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
//parameter.setRequired( ... );
parameter.setEditable( false );
- mojoDescriptor.addParameter( parameter );
+ addParameter( mojoDescriptor, parameter );
}
mojoDescriptor.setPluginDescriptor( pluginDescriptor );
//parameter.setRequired( ... );
parameter.setEditable( false );
- mojoDescriptor.addParameter( parameter );
+ addParameter( mojoDescriptor, parameter );
}
mojoDescriptor.setPluginDescriptor( pluginDescriptor );
@@ -624,6 +625,25 @@ public class JavaAnnotationsMojoDescriptorExtractor
return mojoDescriptors;
}
+ private void addParameter( ExtendedMojoDescriptor mojoDescriptor,
+ org.apache.maven.plugin.descriptor.Parameter parameter )
+ throws DuplicateParameterException
+ {
+ if ( mojoDescriptor.getParameters() != null )
+ {
+ for ( Iterator<?> it = mojoDescriptor.getParameters().iterator(); it.hasNext(); )
+ {
+ if ( it.next().equals( parameter ) )
+ {
+ getLogger().warn( "Duplicate parameter " + parameter.getName() + " field in MOJO descriptor" );
+ it.remove();
+ }
+ }
+ }
+
+ mojoDescriptor.addParameter( parameter );
+ }
+
protected ExecuteAnnotationContent findExecuteInParentHierarchy( MojoAnnotatedClass mojoAnnotatedClass,
Map<String, MojoAnnotatedClass> mojoAnnotatedClasses )
{
return mojoDescriptors;
}
+ private void addParameter( ExtendedMojoDescriptor mojoDescriptor,
+ org.apache.maven.plugin.descriptor.Parameter parameter )
+ throws DuplicateParameterException
+ {
+ if ( mojoDescriptor.getParameters() != null )
+ {
+ for ( Iterator<?> it = mojoDescriptor.getParameters().iterator(); it.hasNext(); )
+ {
+ if ( it.next().equals( parameter ) )
+ {
+ getLogger().warn( "Duplicate parameter " + parameter.getName() + " field in MOJO descriptor" );
+ it.remove();
+ }
+ }
+ }
+
+ mojoDescriptor.addParameter( parameter );
+ }
+
protected ExecuteAnnotationContent findExecuteInParentHierarchy( MojoAnnotatedClass mojoAnnotatedClass,
Map<String, MojoAnnotatedClass> mojoAnnotatedClasses )
{
--
2.7.4
2.14.3

View File

@ -1,4 +1,4 @@
From 85fc3d643138044f461c3d89b9c6cb2ee58a6036 Mon Sep 17 00:00:00 2001
From ea64c5b59f5f820a73ab3e82b6898762e55a8719 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 16 Mar 2015 16:42:20 +0100
Subject: [PATCH 2/3] Deal with nulls from getComment
@ -9,58 +9,58 @@ Subject: [PATCH 2/3] Deal with nulls from getComment
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
index a034dc2..0bf6e50 100644
index 231ed12..6ac677b 100644
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
@@ -269,7 +269,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
MojoAnnotationContent mojoAnnotationContent = entry.getValue().getMojo();
if ( mojoAnnotationContent != null )
{
- mojoAnnotationContent.setDescription( javaClass.getComment() );
+ mojoAnnotationContent.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag since = findInClassHierarchy( javaClass, "since" );
if ( since != null )
MojoAnnotationContent mojoAnnotationContent = entry.getValue().getMojo();
if ( mojoAnnotationContent != null )
{
- mojoAnnotationContent.setDescription( javaClass.getComment() );
+ mojoAnnotationContent.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag since = findInClassHierarchy( javaClass, "since" );
if ( since != null )
@@ -300,7 +300,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
}
ParameterAnnotationContent parameterAnnotationContent = parameter.getValue();
- parameterAnnotationContent.setDescription( javaField.getComment() );
+ parameterAnnotationContent.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag deprecated = javaField.getTagByName( "deprecated" );
if ( deprecated != null )
}
ParameterAnnotationContent parameterAnnotationContent = parameter.getValue();
- parameterAnnotationContent.setDescription( javaField.getComment() );
+ parameterAnnotationContent.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag deprecated = javaField.getTagByName( "deprecated" );
if ( deprecated != null )
@@ -326,7 +326,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
}
ComponentAnnotationContent componentAnnotationContent = component.getValue();
- componentAnnotationContent.setDescription( javaField.getComment() );
+ componentAnnotationContent.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag deprecated = javaField.getTagByName( "deprecated" );
if ( deprecated != null )
}
ComponentAnnotationContent componentAnnotationContent = component.getValue();
- componentAnnotationContent.setDescription( javaField.getComment() );
+ componentAnnotationContent.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag deprecated = javaField.getTagByName( "deprecated" );
if ( deprecated != null )
diff --git a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
index 7ab0957..39a20c1 100644
index 137d90d..36b30dc 100644
--- a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
+++ b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
@@ -115,7 +115,7 @@ public class JavaJavadocMojoDescriptorExtractor
ExtendedMojoDescriptor mojoDescriptor = new ExtendedMojoDescriptor();
mojoDescriptor.setLanguage( "java" );
mojoDescriptor.setImplementation( javaClass.getFullyQualifiedName() );
- mojoDescriptor.setDescription( javaClass.getComment() );
+ mojoDescriptor.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
// ----------------------------------------------------------------------
// Mojo annotations in alphabetical order
ExtendedMojoDescriptor mojoDescriptor = new ExtendedMojoDescriptor();
mojoDescriptor.setLanguage( "java" );
mojoDescriptor.setImplementation( javaClass.getFullyQualifiedName() );
- mojoDescriptor.setDescription( javaClass.getComment() );
+ mojoDescriptor.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
// ----------------------------------------------------------------------
// Mojo annotations in alphabetical order
@@ -392,7 +392,7 @@ public class JavaJavadocMojoDescriptorExtractor
pd.setType( type.getFullyQualifiedName() );
- pd.setDescription( field.getComment() );
+ pd.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag deprecationTag = field.getTagByName( JavadocMojoAnnotation.DEPRECATED );
pd.setType( type.getFullyQualifiedName() );
- pd.setDescription( field.getComment() );
+ pd.setDescription( javaClass.getComment() != null ? javaClass.getComment() : "" );
DocletTag deprecationTag = field.getTagByName( JavadocMojoAnnotation.DEPRECATED );
--
2.7.4
2.14.3

View File

@ -1,4 +1,4 @@
From 433826f38814e496b78327010a6ffb08569fc297 Mon Sep 17 00:00:00 2001
From 690138ca262b03d7e43336dd9bfee2ca0e1b03f9 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 12 May 2016 09:36:10 +0200
Subject: [PATCH 3/3] Port to plexus-utils 3.0.24
@ -8,26 +8,26 @@ Subject: [PATCH 3/3] Port to plexus-utils 3.0.24
1 file changed, 9 insertions(+), 1 deletion(-)
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 7d444a8..ff2f473 100644
index 23c3ed9..7543496 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
@@ -302,7 +302,15 @@ public class PluginHelpGenerator
return;
}
- Properties properties = PropertyUtils.loadProperties( tmpPropertiesFile );
+ Properties properties;
+ try
+ {
+ properties = PropertyUtils.loadProperties( tmpPropertiesFile );
+ }
+ catch ( IOException exc )
+ {
+ properties = new Properties();
+ }
String helpPackageName = properties.getProperty( "helpPackageName" );
return;
}
- Properties properties = PropertyUtils.loadProperties( tmpPropertiesFile );
+ Properties properties;
+ try
+ {
+ properties = PropertyUtils.loadProperties( tmpPropertiesFile );
+ }
+ catch ( IOException exc )
+ {
+ properties = new Properties();
+ }
String helpPackageName = properties.getProperty( "helpPackageName" );
--
2.7.4
2.14.3

View File

@ -1,6 +1,6 @@
Name: maven-plugin-tools
Version: 3.5
Release: 4%{?dist}
Version: 3.5.1
Release: 1%{?dist}
Epoch: 0
Summary: Maven Plugin Tools
License: ASL 2.0
@ -263,6 +263,9 @@ API documentation for %{name}.
%changelog
* Fri Jan 26 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:3.5.1-1
- Update to upstream version 3.5.1
* Fri Sep 15 2017 Michael Simacek <msimacek@redhat.com> - 0:3.5-4
- Add missing dependency

View File

@ -1 +1 @@
0adf05a8ab1a59612c90483fff2cfab9 maven-plugin-tools-3.5-source-release.zip
SHA512 (maven-plugin-tools-3.5.1-source-release.zip) = 0ef29773db58f9457debba1b8d989d8809be162b7617ad5ebe7d99882d63713b28adad26fcf99ba75631aa3ecf66cdd1c17d70c9cbc08ad656614a14cc17af99