Port to maven-reporting-impl 2.3
This commit is contained in:
parent
1be8f396bf
commit
bbad2330d5
68
0001-Avoid-duplicate-MOJO-parameters.patch
Normal file
68
0001-Avoid-duplicate-MOJO-parameters.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From d72e785c46305fe00eb126d315d2dfe4b98f458a Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Mon, 13 Oct 2014 11:50:26 +0200
|
||||
Subject: [PATCH] Avoid duplicate MOJO parameters
|
||||
|
||||
---
|
||||
.../JavaAnnotationsMojoDescriptorExtractor.java | 24 ++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
|
||||
index d595438..ed3a17f 100644
|
||||
--- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
|
||||
+++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java
|
||||
@@ -61,6 +61,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;
|
||||
@@ -554,7 +555,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
|
||||
parameter.setSince( parameterAnnotationContent.getSince() );
|
||||
parameter.setRequired( parameterAnnotationContent.required() );
|
||||
|
||||
- mojoDescriptor.addParameter( parameter );
|
||||
+ addParameter( mojoDescriptor, parameter );
|
||||
}
|
||||
|
||||
// Component annotations
|
||||
@@ -594,7 +595,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
|
||||
//parameter.setRequired( ... );
|
||||
parameter.setEditable( false );
|
||||
|
||||
- mojoDescriptor.addParameter( parameter );
|
||||
+ addParameter( mojoDescriptor, parameter );
|
||||
}
|
||||
|
||||
mojoDescriptor.setPluginDescriptor( pluginDescriptor );
|
||||
@@ -604,6 +605,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 )
|
||||
{
|
||||
--
|
||||
1.9.3
|
||||
|
||||
@ -1,14 +1,16 @@
|
||||
Name: maven-plugin-tools
|
||||
Version: 3.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Epoch: 0
|
||||
Summary: Maven Plugin Tools
|
||||
|
||||
License: ASL 2.0
|
||||
URL: http://maven.apache.org/plugin-tools/
|
||||
Source0: http://repo2.maven.org/maven2/org/apache/maven/plugin-tools/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||
BuildArch: noarch
|
||||
|
||||
Source0: http://repo2.maven.org/maven2/org/apache/maven/plugin-tools/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||
|
||||
Patch0: 0001-Avoid-duplicate-MOJO-parameters.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(com.sun:tools)
|
||||
BuildRequires: mvn(com.thoughtworks.qdox:qdox)
|
||||
@ -168,6 +170,7 @@ API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
# For easier installation
|
||||
ln -s maven-script/maven-script-{ant,beanshell} .
|
||||
@ -257,6 +260,9 @@ ln -s maven-script/maven-script-{ant,beanshell} .
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 13 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:3.3-2
|
||||
- Port to maven-reporting-impl 2.3
|
||||
|
||||
* Thu Jun 19 2014 Michal Srb <msrb@redhat.com> - 0:3.3-1
|
||||
- Update to upstream version 3.3
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user