diff --git a/.gitignore b/.gitignore index 7189db8..447d3e9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ maven-plugin-tools-2.6.tar.xz maven-plugin-tools-2.7-source-release.zip /maven-plugin-tools-3.1-source-release.zip /maven-plugin-tools-3.3-source-release.zip +/maven-plugin-tools-3.4-source-release.zip diff --git a/0001-Avoid-duplicate-MOJO-parameters.patch b/0001-Avoid-duplicate-MOJO-parameters.patch index 88c4168..183695b 100644 --- a/0001-Avoid-duplicate-MOJO-parameters.patch +++ b/0001-Avoid-duplicate-MOJO-parameters.patch @@ -1,17 +1,17 @@ -From d72e785c46305fe00eb126d315d2dfe4b98f458a Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Mon, 13 Oct 2014 11:50:26 +0200 -Subject: [PATCH 1/2] Avoid duplicate MOJO parameters +From d4974142b5123f3dbe23ea9ca9399e7f0bc2f99e Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Mon, 16 Mar 2015 14:29:21 +0100 +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; +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 a9c8ccf..7a7e70a 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; @@ -19,7 +19,7 @@ index d595438..ed3a17f 100644 import java.util.List; import java.util.Map; import java.util.Set; -@@ -554,7 +555,7 @@ public class JavaAnnotationsMojoDescriptorExtractor +@@ -573,7 +574,7 @@ public class JavaAnnotationsMojoDescriptorExtractor parameter.setSince( parameterAnnotationContent.getSince() ); parameter.setRequired( parameterAnnotationContent.required() ); @@ -28,7 +28,7 @@ index d595438..ed3a17f 100644 } // Component annotations -@@ -594,7 +595,7 @@ public class JavaAnnotationsMojoDescriptorExtractor +@@ -614,7 +615,7 @@ public class JavaAnnotationsMojoDescriptorExtractor //parameter.setRequired( ... ); parameter.setEditable( false ); @@ -37,7 +37,7 @@ index d595438..ed3a17f 100644 } mojoDescriptor.setPluginDescriptor( pluginDescriptor ); -@@ -604,6 +605,25 @@ public class JavaAnnotationsMojoDescriptorExtractor +@@ -624,6 +625,25 @@ public class JavaAnnotationsMojoDescriptorExtractor return mojoDescriptors; } @@ -61,8 +61,8 @@ index d595438..ed3a17f 100644 + } + protected ExecuteAnnotationContent findExecuteInParentHierarchy( MojoAnnotatedClass mojoAnnotatedClass, - Map mojoAnnotatedClasses ) + Map mojoAnnotatedClasses ) { -- -1.9.3 +2.1.0 diff --git a/0002-Port-to-QDox-2.0.patch b/0002-Port-to-QDox-2.0.patch deleted file mode 100644 index 3fe121b..0000000 --- a/0002-Port-to-QDox-2.0.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 1e6ca46d86b2e63b5444368d900b675919852c3f Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Tue, 28 Oct 2014 10:34:51 +0100 -Subject: [PATCH 2/2] Port to QDox 2.0 - ---- - .../JavaAnnotationsMojoDescriptorExtractor.java | 15 ++++++++------- - .../extractor/java/JavaMojoDescriptorExtractor.java | 18 +++++++++--------- - pom.xml | 2 +- - 3 files changed, 18 insertions(+), 17 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 ed3a17f..41a47d0 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 -@@ -19,10 +19,11 @@ package org.apache.maven.tools.plugin.annotations; - * under the License. - */ - --import com.thoughtworks.qdox.JavaDocBuilder; -+import com.thoughtworks.qdox.JavaProjectBuilder; - import com.thoughtworks.qdox.model.DocletTag; - import com.thoughtworks.qdox.model.JavaClass; - import com.thoughtworks.qdox.model.JavaField; -+ - import org.apache.maven.artifact.Artifact; - import org.apache.maven.artifact.factory.ArtifactFactory; - import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -@@ -377,7 +378,7 @@ public class JavaAnnotationsMojoDescriptorExtractor - - if ( superClass != null ) - { -- if ( superClass.getFields().length > 0 ) -+ if ( superClass.getFields().size() > 0 ) - { - rawParams = extractFieldParameterTags( superClass, javaClassesMap ); - } -@@ -394,7 +395,7 @@ public class JavaAnnotationsMojoDescriptorExtractor - rawParams = new TreeMap(); - } - -- JavaField[] classFields = javaClass.getFields(); -+ Collection classFields = javaClass.getFields(); - - if ( classFields != null ) - { -@@ -434,7 +435,7 @@ public class JavaAnnotationsMojoDescriptorExtractor - - protected Map discoverClasses( final String encoding, List sourceDirectories ) - { -- JavaDocBuilder builder = new JavaDocBuilder(); -+ JavaProjectBuilder builder = new JavaProjectBuilder(); - builder.setEncoding( encoding ); - - for ( File source : sourceDirectories ) -@@ -442,14 +443,14 @@ public class JavaAnnotationsMojoDescriptorExtractor - builder.addSourceTree( source ); - } - -- JavaClass[] javaClasses = builder.getClasses(); -+ Collection javaClasses = builder.getClasses(); - -- if ( javaClasses == null || javaClasses.length < 1 ) -+ if ( javaClasses == null || javaClasses.size() < 1 ) - { - return Collections.emptyMap(); - } - -- Map javaClassMap = new HashMap( javaClasses.length ); -+ Map javaClassMap = new HashMap( javaClasses.size() ); - - for ( JavaClass javaClass : javaClasses ) - { -diff --git a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java -index 3fabe44..dbbe480 100644 ---- a/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java -+++ b/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java -@@ -19,11 +19,10 @@ package org.apache.maven.tools.plugin.extractor.java; - * under the License. - */ - --import com.thoughtworks.qdox.JavaDocBuilder; -+import com.thoughtworks.qdox.JavaProjectBuilder; - import com.thoughtworks.qdox.model.DocletTag; - import com.thoughtworks.qdox.model.JavaClass; - import com.thoughtworks.qdox.model.JavaField; --import com.thoughtworks.qdox.model.Type; - - import org.apache.maven.plugin.descriptor.InvalidParameterException; - import org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException; -@@ -36,13 +35,13 @@ import org.apache.maven.tools.plugin.PluginToolsRequest; - import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor; - import org.apache.maven.tools.plugin.extractor.ExtractionException; - import org.apache.maven.tools.plugin.util.PluginUtils; -- - import org.codehaus.plexus.component.annotations.Component; - import org.codehaus.plexus.logging.AbstractLogEnabled; - import org.codehaus.plexus.util.StringUtils; - - import java.io.File; - import java.util.ArrayList; -+import java.util.Collection; - import java.util.List; - import java.util.Map; - import java.util.TreeMap; -@@ -199,7 +198,7 @@ public class JavaMojoDescriptorExtractor - 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 -@@ -468,7 +467,7 @@ public class JavaMojoDescriptorExtractor - { - JavaField field = entry.getValue(); - -- Type type = field.getType(); -+ JavaClass type = field.getType(); - - Parameter pd = new Parameter(); - -@@ -492,7 +491,7 @@ public class JavaMojoDescriptorExtractor - pd.setType( value.toString() ); - } - -- pd.setDescription( field.getComment() ); -+ pd.setDescription( field.getComment() != null ? field.getComment() : "" ); - - DocletTag deprecationTag = field.getTagByName( JavaMojoAnnotation.DEPRECATED ); - -@@ -653,7 +652,7 @@ public class JavaMojoDescriptorExtractor - rawParams = new TreeMap(); - } - -- JavaField[] classFields = javaClass.getFields(); -+ List classFields = javaClass.getFields(); - - if ( classFields != null ) - { -@@ -703,7 +702,7 @@ public class JavaMojoDescriptorExtractor - @SuppressWarnings( "unchecked" ) - protected JavaClass[] discoverClasses( final PluginToolsRequest request ) - { -- JavaDocBuilder builder = new JavaDocBuilder(); -+ JavaProjectBuilder builder = new JavaProjectBuilder(); - builder.setEncoding( request.getEncoding() ); - - MavenProject project = request.getProject(); -@@ -720,7 +719,8 @@ public class JavaMojoDescriptorExtractor - builder.addSourceTree( generatedPlugin ); - } - -- return builder.getClasses(); -+ Collection classes = builder.getClasses(); -+ return classes.toArray( new JavaClass[classes.size()] ); - } - - /** -diff --git a/pom.xml b/pom.xml -index 0af658b..4ce60d9 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -222,7 +222,7 @@ - - com.thoughtworks.qdox - qdox -- 1.12.1 -+ 2.0-M2 - - - --- -1.9.3 - diff --git a/maven-plugin-tools.spec b/maven-plugin-tools.spec index e57d5bd..7b15bc4 100644 --- a/maven-plugin-tools.spec +++ b/maven-plugin-tools.spec @@ -1,6 +1,6 @@ Name: maven-plugin-tools -Version: 3.3 -Release: 4%{?dist} +Version: 3.4 +Release: 1%{?dist} Epoch: 0 Summary: Maven Plugin Tools License: ASL 2.0 @@ -10,7 +10,6 @@ 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-Port-to-QDox-2.0.patch BuildRequires: maven-local BuildRequires: mvn(com.sun:tools) @@ -170,10 +169,6 @@ API documentation for %{name}. %prep %setup -q %patch0 -p1 -%patch1 -p1 - -# For easier installation -ln -s maven-script/maven-script-{ant,beanshell} . # For com.sun:tools use scope "compile" instead of "system" %pom_remove_dep com.sun:tools maven-plugin-tools-javadoc @@ -195,13 +190,13 @@ ln -s maven-script/maven-script-{ant,beanshell} . %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-plugin-tools-ant -%pom_change_dep :maven-project :maven-core maven-plugin-tools-ant +%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-plugin-tools-beanshell +%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 @@ -209,7 +204,7 @@ ln -s maven-script/maven-script-{ant,beanshell} . %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-plugin-tools-model +%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 @@ -260,6 +255,9 @@ ln -s maven-script/maven-script-{ant,beanshell} . %changelog +* Mon Mar 16 2015 Michael Simacek - 0:3.4-1 +- Update to upstream version 3.4 + * Tue Oct 28 2014 Mikolaj Izdebski - 0:3.3-4 - Port to QDox 2.0 diff --git a/sources b/sources index 1af8a59..134c8f5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -221733f6197b04a0f6cf11ef40443fcd maven-plugin-tools-3.3-source-release.zip +275fd44c09bb5bef45548cafafdde270 maven-plugin-tools-3.4-source-release.zip