Update to upstream version 3.6.0

This commit is contained in:
Marian Koncek 2019-01-02 09:10:55 +01:00 committed by Mikolaj Izdebski
parent ddee6faaad
commit 84c148fc1c
6 changed files with 9 additions and 197 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ maven-plugin-tools-2.7-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
/maven-plugin-tools-3.6.0-source-release.zip

View File

@ -1,68 +0,0 @@
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
---
.../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/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
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;
@@ -573,7 +574,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
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 );
@@ -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 )
{
--
2.14.3

View File

@ -1,66 +0,0 @@
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
---
.../annotations/JavaAnnotationsMojoDescriptorExtractor.java | 6 +++---
.../extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java | 4 ++--
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 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 )
@@ -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 )
@@ -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 )
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 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
@@ -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 );
--
2.14.3

View File

@ -1,6 +1,6 @@
Name: maven-plugin-tools
Version: 3.5.1
Release: 4%{?dist}
Version: 3.6.0
Release: 1%{?dist}
Summary: Maven Plugin Tools
License: ASL 2.0
URL: http://maven.apache.org/plugin-tools/
@ -8,12 +8,9 @@ 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
Patch1: 0002-Deal-with-nulls-from-getComment.patch
Patch2: 0003-Port-to-plexus-utils-3.0.24.patch
Patch0: 0001-Port-to-plexus-utils-3.0.24.patch
BuildRequires: maven-local
BuildRequires: mvn(com.sun:tools)
BuildRequires: mvn(com.thoughtworks.qdox:qdox)
BuildRequires: mvn(net.sf.jtidy:jtidy)
BuildRequires: mvn(org.apache.ant:ant)
@ -21,13 +18,11 @@ BuildRequires: mvn(org.apache.ant:ant-launcher)
BuildRequires: mvn(org.apache.maven.doxia:doxia-sink-api)
BuildRequires: mvn(org.apache.maven.doxia:doxia-site-renderer)
BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-artifact:2.2.1)
BuildRequires: mvn(org.apache.maven:maven-compat)
BuildRequires: mvn(org.apache.maven:maven-core)
BuildRequires: mvn(org.apache.maven:maven-model:2.2.1)
BuildRequires: mvn(org.apache.maven:maven-model)
BuildRequires: mvn(org.apache.maven:maven-parent:pom:)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven:maven-plugin-registry)
BuildRequires: mvn(org.apache.maven:maven-repository-metadata)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
@ -110,18 +105,6 @@ Provides: maven-shared-plugin-tools-java = 0:%{version}-%{release}
%description java
Descriptor extractor for plugins written in Java.
# Note that this package contains code, not documentation.
# See comments about "javadocs" subpackage below.
%package javadoc
Summary: Maven Plugin Tools Javadoc
%description javadoc
The Maven Plugin Tools Javadoc provides several Javadoc taglets to be used when
generating Javadoc.
Java API documentation for %{name} is contained in
%{name}-javadocs package. This package does not contain it.
%package model
Summary: Maven Plugin Metadata Model
Provides: maven-shared-plugin-tools-model = 0:%{version}-%{release}
@ -165,15 +148,9 @@ API documentation for %{name}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%pom_remove_plugin :maven-enforcer-plugin
# For com.sun:tools use scope "compile" instead of "system"
%pom_remove_dep com.sun:tools maven-plugin-tools-javadoc
%pom_add_dep com.sun:tools maven-plugin-tools-javadoc
%pom_xpath_inject "pom:project/pom:properties" "
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>"
@ -181,39 +158,6 @@ API documentation for %{name}.
# Remove test dependencies because tests are skipped anyways.
%pom_xpath_remove "pom:dependency[pom:scope='test']"
# Use Maven 3.1.1 APIs
%pom_remove_dep :maven-project maven-plugin-plugin
%pom_remove_dep :maven-plugin-descriptor maven-plugin-plugin
%pom_remove_dep :maven-plugin-registry maven-plugin-plugin
%pom_remove_dep :maven-artifact-manager maven-plugin-plugin
%pom_change_dep :maven-project :maven-core maven-plugin-tools-annotations
%pom_change_dep :maven-plugin-descriptor :maven-compat maven-plugin-tools-annotations
%pom_remove_dep :maven-plugin-descriptor maven-script/maven-plugin-tools-ant
%pom_change_dep :maven-project :maven-core maven-script/maven-plugin-tools-ant
%pom_remove_dep :maven-plugin-descriptor maven-plugin-tools-api
%pom_change_dep :maven-project :maven-core maven-plugin-tools-api
%pom_remove_dep :maven-plugin-descriptor maven-script/maven-plugin-tools-beanshell
%pom_remove_dep :maven-project maven-plugin-tools-generators
%pom_remove_dep :maven-plugin-descriptor maven-plugin-tools-generators
%pom_change_dep :maven-project :maven-core maven-plugin-tools-java
%pom_remove_dep :maven-plugin-descriptor maven-plugin-tools-java
%pom_change_dep :maven-plugin-descriptor :maven-plugin-api maven-script/maven-plugin-tools-model
%pom_remove_dep :maven-project maven-script/maven-script-ant
%pom_remove_dep :maven-plugin-descriptor maven-script/maven-script-ant
%pom_remove_dep :maven-project
%pom_remove_dep :maven-plugin-descriptor
%pom_add_dep org.apache.maven:maven-compat
%pom_add_dep org.apache.maven:maven-plugin-registry
%build
%mvn_build -s -f
@ -243,8 +187,6 @@ API documentation for %{name}.
%files java -f .mfiles-maven-plugin-tools-java
%files javadoc -f .mfiles-maven-plugin-tools-javadoc
%files model -f .mfiles-maven-plugin-tools-model
%license LICENSE NOTICE
@ -261,6 +203,9 @@ API documentation for %{name}.
%changelog
* Wed Jan 02 2019 Marian Koncek <mkoncek@redhat.com> - 0:3.6.0-1
- Update to upstream version 3.6.0
* Tue Jul 31 2018 Michael Simacek <msimacek@redhat.com> - 0:3.5.1-4
- Install license files for all subpackage combinations

View File

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