From e293a7ec1417ad76428d36f13f7c5526d2e02dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 7 Jun 2023 09:09:47 +0200 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 maven-plugin-plugin-bootstrap revision 3ac85e0ce2f23ea15e7944ba17bacdac --- .gitattributes | 23 + 0001-Avoid-duplicate-MOJO-parameters.patch | 68 + 0002-Deal-with-nulls-from-getComment.patch | 66 + 0003-Port-to-plexus-utils-3.0.24.patch | 33 + maven-plugin-plugin-bootstrap-resouces.patch | 1914 ++++++++++++++++++ maven-plugin-plugin-bootstrap.changes | 28 + maven-plugin-plugin-bootstrap.spec | 134 ++ maven-plugin-plugin.changes | 20 + maven-plugin-plugin.spec | 118 ++ maven-plugin-tools-3.6.0-source-release.zip | 3 + maven-plugin-tools-build.tar.xz | 3 + maven-plugin-tools.changes | 36 + maven-plugin-tools.spec | 277 +++ 13 files changed, 2723 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-Avoid-duplicate-MOJO-parameters.patch create mode 100644 0002-Deal-with-nulls-from-getComment.patch create mode 100644 0003-Port-to-plexus-utils-3.0.24.patch create mode 100644 maven-plugin-plugin-bootstrap-resouces.patch create mode 100644 maven-plugin-plugin-bootstrap.changes create mode 100644 maven-plugin-plugin-bootstrap.spec create mode 100644 maven-plugin-plugin.changes create mode 100644 maven-plugin-plugin.spec create mode 100644 maven-plugin-tools-3.6.0-source-release.zip create mode 100644 maven-plugin-tools-build.tar.xz create mode 100644 maven-plugin-tools.changes create mode 100644 maven-plugin-tools.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-Avoid-duplicate-MOJO-parameters.patch b/0001-Avoid-duplicate-MOJO-parameters.patch new file mode 100644 index 0000000..1e010b9 --- /dev/null +++ b/0001-Avoid-duplicate-MOJO-parameters.patch @@ -0,0 +1,68 @@ +From 0ebe12503766c6a76c507498e9e7f0cb1c4469c2 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +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 mojoAnnotatedClasses ) + { +-- +2.14.3 + diff --git a/0002-Deal-with-nulls-from-getComment.patch b/0002-Deal-with-nulls-from-getComment.patch new file mode 100644 index 0000000..de983ad --- /dev/null +++ b/0002-Deal-with-nulls-from-getComment.patch @@ -0,0 +1,66 @@ +From ea64c5b59f5f820a73ab3e82b6898762e55a8719 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +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 + diff --git a/0003-Port-to-plexus-utils-3.0.24.patch b/0003-Port-to-plexus-utils-3.0.24.patch new file mode 100644 index 0000000..a553bef --- /dev/null +++ b/0003-Port-to-plexus-utils-3.0.24.patch @@ -0,0 +1,33 @@ +From 690138ca262b03d7e43336dd9bfee2ca0e1b03f9 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Thu, 12 May 2016 09:36:10 +0200 +Subject: [PATCH 3/3] Port to plexus-utils 3.0.24 + +--- + .../maven/tools/plugin/generator/PluginHelpGenerator.java | 10 +++++++++- + 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 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" ); + +-- +2.14.3 + diff --git a/maven-plugin-plugin-bootstrap-resouces.patch b/maven-plugin-plugin-bootstrap-resouces.patch new file mode 100644 index 0000000..5f95942 --- /dev/null +++ b/maven-plugin-plugin-bootstrap-resouces.patch @@ -0,0 +1,1914 @@ +--- maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-plugin-plugin/plugin-help.xml 1970-01-01 01:00:00.000000000 +0100 ++++ maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/filtered-resources/META-INF/maven/org.apache.maven.plugins/maven-plugin-plugin/plugin-help.xml 2019-11-25 11:03:12.945643770 +0100 +@@ -0,0 +1,385 @@ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ plugin ++ ++ ++ addPluginArtifactMetadata ++ Inject any plugin-specific artifact metadata to the project's artifact, for subsequent installation and deployment. It is used: ++1. to add the latest metadata (which is plugin-specific) for shipping alongside the plugin's artifact ++2. to define plugin mapping in the group ++ ++ false ++ true ++ false ++ false ++ false ++ true ++ package ++ org.apache.maven.plugin.plugin.metadata.AddPluginArtifactMetadataMojo ++ java ++ per-lookup ++ once-per-session ++ 2.0 ++ true ++ ++ ++ goalPrefix ++ java.lang.String ++ false ++ true ++ Inject any plugin-specific artifact metadata to the project's artifact, for subsequent installation and deployment. It is used: ++1. to add the latest metadata (which is plugin-specific) for shipping alongside the plugin's artifact ++2. to define plugin mapping in the group ++ ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Inject any plugin-specific artifact metadata to the project's artifact, for subsequent installation and deployment. It is used: ++1. to add the latest metadata (which is plugin-specific) for shipping alongside the plugin's artifact ++2. to define plugin mapping in the group ++ ++ ++ ++ ++ ${maven.plugin.skip} ++ ++ ++ ++ descriptor ++ Generate a plugin descriptor. ++ ++Note: Since 3.0, for Java plugin annotations support, default phase defined by this goal is after the 'compilation' of any scripts. This doesn't override the default binding coded at generate-resources phase in Maven core. ++ ++ runtime ++ false ++ true ++ false ++ false ++ false ++ true ++ process-classes ++ org.apache.maven.plugin.plugin.DescriptorGeneratorMojo ++ java ++ per-lookup ++ once-per-session ++ 2.0 ++ true ++ ++ ++ encoding ++ java.lang.String ++ 2.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ extractors ++ java.util.Set ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ goalPrefix ++ java.lang.String ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ mojoDependencies ++ java.util.List ++ 3.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ outputDirectory ++ java.io.File ++ false ++ true ++ Generate a plugin descriptor. ++ ++Note: Since 3.0, for Java plugin annotations support, default phase defined by this goal is after the 'compilation' of any scripts. This doesn't override the default binding coded at generate-resources phase in Maven core. ++ ++ ++ ++ packagingTypes ++ java.util.List ++ 3.3 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ skipDescriptor ++ boolean ++ 2.6 ++ false ++ true ++ Generate a plugin descriptor. ++ ++Note: Since 3.0, for Java plugin annotations support, default phase defined by this goal is after the 'compilation' of any scripts. This doesn't override the default binding coded at generate-resources phase in Maven core. ++ ++ ++ ++ skipErrorNoDescriptorsFound ++ boolean ++ 3.0 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ ++ ${encoding} ++ ++ ${maven.plugin.skip} ++ ++ ${maven.plugin.skipErrorNoDescriptorsFound} ++ ++ ++ ++ help ++ Display help information on maven-plugin-plugin. ++Call mvn plugin:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugin.plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ Display help information on maven-plugin-plugin. ++Call mvn plugin:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ Display help information on maven-plugin-plugin. ++Call mvn plugin:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ indentSize ++ int ++ false ++ true ++ Display help information on maven-plugin-plugin. ++Call mvn plugin:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ lineLength ++ int ++ false ++ true ++ Display help information on maven-plugin-plugin. ++Call mvn plugin:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ helpmojo ++ Generates a HelpMojo class. ++ compile ++ false ++ true ++ false ++ false ++ false ++ true ++ generate-sources ++ org.apache.maven.plugin.plugin.HelpGeneratorMojo ++ java ++ per-lookup ++ once-per-session ++ 2.4 ++ true ++ ++ ++ encoding ++ java.lang.String ++ 2.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ extractors ++ java.util.Set ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ goalPrefix ++ java.lang.String ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ helpPackageName ++ java.lang.String ++ 2.6 ++ false ++ true ++ Generates a HelpMojo class. ++ ++ ++ mojoDependencies ++ java.util.List ++ 3.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ outputDirectory ++ java.io.File ++ false ++ true ++ Generates a HelpMojo class. ++ ++ ++ packagingTypes ++ java.util.List ++ 3.3 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ skipErrorNoDescriptorsFound ++ boolean ++ 3.0 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ ++ ${encoding} ++ ++ ${maven.plugin.skip} ++ ${maven.plugin.skipErrorNoDescriptorsFound} ++ ++ ++ ++ report ++ Generates the Plugin's documentation report: plugin-info.html plugin overview page, and one goal-mojo.html per goal. ++ false ++ true ++ false ++ false ++ false ++ true ++ process-classes ++ org.apache.maven.plugin.plugin.PluginReport ++ java ++ per-lookup ++ once-per-session ++ 2.0 ++ true ++ ++ ++ encoding ++ java.lang.String ++ 2.7 ++ false ++ true ++ Generates the Plugin's documentation report: plugin-info.html plugin overview page, and one goal-mojo.html per goal. ++ ++ ++ goalPrefix ++ java.lang.String ++ 2.4 ++ false ++ true ++ Generates the Plugin's documentation report: plugin-info.html plugin overview page, and one goal-mojo.html per goal. ++ ++ ++ outputDirectory ++ java.io.File ++ false ++ true ++ Generates the Plugin's documentation report: plugin-info.html plugin overview page, and one goal-mojo.html per goal. ++ ++ ++ requirements ++ org.apache.maven.plugin.plugin.Requirements ++ false ++ true ++ Generates the Plugin's documentation report: plugin-info.html plugin overview page, and one goal-mojo.html per goal. ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Generates the Plugin's documentation report: plugin-info.html plugin overview page, and one goal-mojo.html per goal. ++ ++ ++ skipReport ++ boolean ++ 2.8 ++ false ++ true ++ Generates the Plugin's documentation report: plugin-info.html plugin overview page, and one goal-mojo.html per goal. ++ ++ ++ ++ ${encoding} ++ ${goalPrefix} ++ ++ ${maven.plugin.skip} ++ ${maven.plugin.report.skip} ++ ++ ++ ++ +--- maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 1970-01-01 01:00:00.000000000 +0100 ++++ maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/filtered-resources/META-INF/maven/plugin.xml 2019-11-25 11:05:03.978261704 +0100 +@@ -0,0 +1,1062 @@ ++ ++ ++ ${project.name} ++ ${project.description} ++ ${project.groupId} ++ ${project.artifactId} ++ ${project.version} ++ plugin ++ false ++ true ++ ++ ++ addPluginArtifactMetadata ++ Inject any plugin-specific ++<a href="/ref/current/maven-repository-metadata/repository-metadata.html">artifact metadata</a> to the project's ++artifact, for subsequent installation and deployment. ++It is used: ++<ol> ++<li>to add the <code>latest</code> metadata (which is plugin-specific) for shipping alongside the plugin's ++ artifact</li> ++<li>to define plugin mapping in the group</li> ++</ol> ++ false ++ true ++ false ++ false ++ false ++ true ++ package ++ org.apache.maven.plugin.plugin.metadata.AddPluginArtifactMetadataMojo ++ java ++ per-lookup ++ once-per-session ++ 2.0 ++ true ++ ++ ++ goalPrefix ++ java.lang.String ++ false ++ true ++ Inject any plugin-specific ++<a href="/ref/current/maven-repository-metadata/repository-metadata.html">artifact metadata</a> to the project's ++artifact, for subsequent installation and deployment. ++It is used: ++<ol> ++<li>to add the <code>latest</code> metadata (which is plugin-specific) for shipping alongside the plugin's ++ artifact</li> ++<li>to define plugin mapping in the group</li> ++</ol> ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ false ++ false ++ Inject any plugin-specific ++<a href="/ref/current/maven-repository-metadata/repository-metadata.html">artifact metadata</a> to the project's ++artifact, for subsequent installation and deployment. ++It is used: ++<ol> ++<li>to add the <code>latest</code> metadata (which is plugin-specific) for shipping alongside the plugin's ++ artifact</li> ++<li>to define plugin mapping in the group</li> ++</ol> ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Inject any plugin-specific ++<a href="/ref/current/maven-repository-metadata/repository-metadata.html">artifact metadata</a> to the project's ++artifact, for subsequent installation and deployment. ++It is used: ++<ol> ++<li>to add the <code>latest</code> metadata (which is plugin-specific) for shipping alongside the plugin's ++ artifact</li> ++<li>to define plugin mapping in the group</li> ++</ol> ++ ++ ++ ++ ++ ${maven.plugin.skip} ++ ++ ++ ++ descriptor ++ <p> ++Generate a plugin descriptor. ++</p> ++<p> ++<b>Note:</b> Since 3.0, for Java plugin annotations support, ++default <a href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">phase</a> ++defined by this goal is after the "compilation" of any scripts. This doesn't override ++<a href="/ref/current/maven-core/default-bindings.html#Bindings_for_maven-plugin_packaging">the default binding coded ++at generate-resources phase</a> in Maven core. ++</p> ++ runtime ++ false ++ true ++ false ++ false ++ false ++ true ++ process-classes ++ org.apache.maven.plugin.plugin.DescriptorGeneratorMojo ++ java ++ per-lookup ++ once-per-session ++ 2.0 ++ true ++ ++ ++ dependencies ++ java.util.Set ++ 3.0 ++ true ++ false ++ Abstract class for this Plugin. ++ ++ ++ encoding ++ java.lang.String ++ 2.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ extractors ++ java.util.Set ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ goalPrefix ++ java.lang.String ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ local ++ org.apache.maven.artifact.repository.ArtifactRepository ++ 3.0 ++ true ++ false ++ Abstract class for this Plugin. ++ ++ ++ mojoDependencies ++ java.util.List ++ 3.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ outputDirectory ++ java.io.File ++ false ++ true ++ <p> ++Generate a plugin descriptor. ++</p> ++<p> ++<b>Note:</b> Since 3.0, for Java plugin annotations support, ++default <a href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">phase</a> ++defined by this goal is after the "compilation" of any scripts. This doesn't override ++<a href="/ref/current/maven-core/default-bindings.html#Bindings_for_maven-plugin_packaging">the default binding coded ++at generate-resources phase</a> in Maven core. ++</p> ++ ++ ++ packagingTypes ++ java.util.List ++ 3.3 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ false ++ false ++ Abstract class for this Plugin. ++ ++ ++ remoteRepos ++ java.util.List ++ 3.0 ++ true ++ false ++ Abstract class for this Plugin. ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ skipDescriptor ++ boolean ++ 2.6 ++ false ++ true ++ <p> ++Generate a plugin descriptor. ++</p> ++<p> ++<b>Note:</b> Since 3.0, for Java plugin annotations support, ++default <a href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">phase</a> ++defined by this goal is after the "compilation" of any scripts. This doesn't override ++<a href="/ref/current/maven-core/default-bindings.html#Bindings_for_maven-plugin_packaging">the default binding coded ++at generate-resources phase</a> in Maven core. ++</p> ++ ++ ++ skipErrorNoDescriptorsFound ++ boolean ++ 3.0 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ ++ ++ ${encoding} ++ ++ ++ ++ ++ ${maven.plugin.skip} ++ ++ ${maven.plugin.skipErrorNoDescriptorsFound} ++ ++ ++ ++ org.apache.maven.tools.plugin.scanner.MojoScanner ++ mojoScanner ++ ++ ++ ++ ++ help ++ Display help information on maven-plugin-plugin.<br> ++Call <code>mvn plugin:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ false ++ false ++ false ++ false ++ false ++ true ++ org.apache.maven.plugin.plugin.HelpMojo ++ java ++ per-lookup ++ once-per-session ++ true ++ ++ ++ detail ++ boolean ++ false ++ true ++ Display help information on maven-plugin-plugin.<br> ++Call <code>mvn plugin:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ goal ++ java.lang.String ++ false ++ true ++ Display help information on maven-plugin-plugin.<br> ++Call <code>mvn plugin:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ indentSize ++ int ++ false ++ true ++ Display help information on maven-plugin-plugin.<br> ++Call <code>mvn plugin:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ lineLength ++ int ++ false ++ true ++ Display help information on maven-plugin-plugin.<br> ++Call <code>mvn plugin:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</code> to display parameter details. ++ ++ ++ ++ ${detail} ++ ${goal} ++ ${indentSize} ++ ${lineLength} ++ ++ ++ ++ helpmojo ++ Generates a <code>HelpMojo</code> class. ++ compile ++ false ++ true ++ false ++ false ++ false ++ true ++ generate-sources ++ org.apache.maven.plugin.plugin.HelpGeneratorMojo ++ java ++ per-lookup ++ once-per-session ++ 2.4 ++ true ++ ++ ++ dependencies ++ java.util.Set ++ 3.0 ++ true ++ false ++ Abstract class for this Plugin. ++ ++ ++ encoding ++ java.lang.String ++ 2.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ extractors ++ java.util.Set ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ goalPrefix ++ java.lang.String ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ helpPackageName ++ java.lang.String ++ 2.6 ++ false ++ true ++ Generates a <code>HelpMojo</code> class. ++ ++ ++ local ++ org.apache.maven.artifact.repository.ArtifactRepository ++ 3.0 ++ true ++ false ++ Abstract class for this Plugin. ++ ++ ++ mojoDependencies ++ java.util.List ++ 3.5 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ outputDirectory ++ java.io.File ++ false ++ true ++ Generates a <code>HelpMojo</code> class. ++ ++ ++ packagingTypes ++ java.util.List ++ 3.3 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ false ++ false ++ Abstract class for this Plugin. ++ ++ ++ remoteRepos ++ java.util.List ++ 3.0 ++ true ++ false ++ Abstract class for this Plugin. ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ skipErrorNoDescriptorsFound ++ boolean ++ 3.0 ++ false ++ true ++ Abstract class for this Plugin. ++ ++ ++ ++ ++ ${encoding} ++ ++ ++ ++ ++ ${maven.plugin.skip} ++ ${maven.plugin.skipErrorNoDescriptorsFound} ++ ++ ++ ++ org.apache.maven.tools.plugin.scanner.MojoScanner ++ mojoScanner ++ ++ ++ org.codehaus.plexus.velocity.VelocityComponent ++ velocity ++ ++ ++ ++ ++ report ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ false ++ true ++ false ++ false ++ false ++ true ++ process-classes ++ org.apache.maven.plugin.plugin.PluginReport ++ java ++ per-lookup ++ once-per-session ++ 2.0 ++ true ++ ++ ++ dependencies ++ java.util.Set ++ 3.0 ++ true ++ false ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ encoding ++ java.lang.String ++ 2.7 ++ false ++ true ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ goalPrefix ++ java.lang.String ++ 2.4 ++ false ++ true ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ inputEncoding ++ java.lang.String ++ false ++ false ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ local ++ org.apache.maven.artifact.repository.ArtifactRepository ++ 3.0 ++ true ++ false ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ outputDirectory ++ java.io.File ++ false ++ true ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ outputEncoding ++ java.lang.String ++ false ++ false ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ pluginXmlFile ++ java.io.File ++ 3.5.1 ++ true ++ false ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ project ++ org.apache.maven.project.MavenProject ++ false ++ false ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ remoteRepos ++ java.util.List ++ 3.0 ++ true ++ false ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ requirements ++ org.apache.maven.plugin.plugin.Requirements ++ false ++ true ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ skip ++ boolean ++ 2.8 ++ false ++ true ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ skipReport ++ boolean ++ 2.8 ++ false ++ true ++ Generates the Plugin's documentation report: <code>plugin-info.html</code> plugin overview page, ++and one <code><i>goal</i>-mojo.html</code> per goal. ++ ++ ++ ++ ++ ${encoding} ++ ${goalPrefix} ++ ${encoding} ++ ++ ++ ${outputEncoding} ++ ++ ++ ++ ${maven.plugin.skip} ++ ${maven.plugin.report.skip} ++ ++ ++ ++ org.apache.maven.tools.plugin.scanner.MojoScanner ++ mojoScanner ++ ++ ++ org.apache.maven.execution.RuntimeInformation ++ rtInfo ++ ++ ++ org.apache.maven.doxia.siterenderer.Renderer ++ siteRenderer ++ ++ ++ ++ ++ ++ ++ org.apache.maven ++ maven-compat ++ jar ++ 3.0 ++ ++ ++ org.apache.maven ++ maven-settings ++ jar ++ 3.6.2 ++ ++ ++ org.apache.maven ++ maven-model-builder ++ jar ++ 3.6.2 ++ ++ ++ org.apache.maven ++ maven-builder-support ++ jar ++ 3.6.2 ++ ++ ++ javax.inject ++ javax.inject ++ jar ++ 1 ++ ++ ++ org.eclipse.sisu ++ org.eclipse.sisu.inject ++ jar ++ 0.3.3 ++ ++ ++ javax.enterprise ++ cdi-api ++ jar ++ 1.1 ++ ++ ++ javax.el ++ javax.el-api ++ jar ++ 3.0.0 ++ ++ ++ org.jboss.spec.javax.interceptor ++ jboss-interceptors-api_1.2_spec ++ jar ++ any ++ ++ ++ org.codehaus.plexus ++ plexus-interpolation ++ jar ++ 1.25 ++ ++ ++ org.apache.maven.wagon ++ wagon-provider-api ++ jar ++ 3.3.3 ++ ++ ++ org.apache.maven ++ maven-resolver-provider ++ jar ++ 3.6.2 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-spi ++ jar ++ 1.4.1 ++ ++ ++ org.slf4j ++ slf4j-api ++ jar ++ 1.7.25 ++ ++ ++ org.apache.maven ++ maven-core ++ jar ++ 3.0 ++ ++ ++ com.google.inject ++ guice ++ jar ++ 4.2.1 ++ ++ ++ aopalliance ++ aopalliance ++ jar ++ 1.0 ++ ++ ++ cglib ++ cglib ++ jar ++ 3.2.0 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-api ++ jar ++ 1.4.1 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-util ++ jar ++ 1.4.1 ++ ++ ++ org.apache.maven.resolver ++ maven-resolver-impl ++ jar ++ 1.4.1 ++ ++ ++ org.codehaus.plexus ++ plexus-component-annotations ++ jar ++ 1.5.5 ++ ++ ++ org.apache.maven ++ maven-settings-builder ++ jar ++ 3.6.2 ++ ++ ++ org.sonatype.plexus ++ plexus-sec-dispatcher ++ jar ++ 1.4 ++ ++ ++ org.sonatype.plexus ++ plexus-cipher ++ jar ++ 1.4 ++ ++ ++ org.eclipse.sisu ++ org.eclipse.sisu.plexus ++ jar ++ 0.3.3 ++ ++ ++ org.apache.maven.plugin-tools ++ maven-plugin-tools-api ++ jar ++ 3.6.0 ++ ++ ++ org.apache.maven.plugin-tools ++ maven-plugin-tools-generators ++ jar ++ 3.6.0 ++ ++ ++ net.sf.jtidy ++ jtidy ++ jar ++ r938 ++ ++ ++ xerces ++ dom3-xml-apis ++ jar ++ 1.0 ++ ++ ++ org.ow2.asm ++ asm-commons ++ jar ++ 7.0 ++ ++ ++ org.ow2.asm ++ asm-tree ++ jar ++ 7.2 ++ ++ ++ org.ow2.asm ++ asm-analysis ++ jar ++ 7.2 ++ ++ ++ org.ow2.asm ++ asm ++ jar ++ 7.0 ++ ++ ++ org.apache.maven.plugin-tools ++ maven-plugin-tools-java ++ jar ++ 3.6.0 ++ ++ ++ com.thoughtworks.qdox ++ qdox ++ jar ++ 2.0-M5 ++ ++ ++ org.apache.maven.plugin-tools ++ maven-plugin-tools-annotations ++ jar ++ 3.6.0 ++ ++ ++ org.codehaus.plexus ++ plexus-archiver ++ jar ++ 3.6.0 ++ ++ ++ org.codehaus.plexus ++ plexus-io ++ jar ++ 3.2.0 ++ ++ ++ org.apache.commons ++ commons-compress ++ jar ++ 1.19 ++ ++ ++ org.tukaani ++ xz ++ jar ++ 1.8 ++ ++ ++ org.apache.maven.plugin-tools ++ maven-plugin-annotations ++ jar ++ 3.6.0 ++ ++ ++ org.apache.maven.doxia ++ doxia-sink-api ++ jar ++ 1.4 ++ ++ ++ org.apache.maven.doxia ++ doxia-logging-api ++ jar ++ 1.7 ++ ++ ++ org.apache.maven.doxia ++ doxia-site-renderer ++ jar ++ 1.4 ++ ++ ++ org.apache.maven.doxia ++ doxia-decoration-model ++ jar ++ 1.7.5 ++ ++ ++ commons-collections ++ commons-collections ++ jar ++ 3.2.1 ++ ++ ++ org.apache.maven.doxia ++ doxia-core ++ jar ++ 1.7 ++ ++ ++ org.apache.httpcomponents ++ httpcore ++ jar ++ 4.0.1 ++ ++ ++ org.apache.httpcomponents ++ httpclient ++ jar ++ 4.0.2 ++ ++ ++ commons-logging ++ commons-logging ++ jar ++ any ++ ++ ++ commons-codec ++ commons-codec ++ jar ++ any ++ ++ ++ xmlunit ++ xmlunit ++ jar ++ 1.5 ++ ++ ++ org.apache.maven.doxia ++ doxia-module-xhtml ++ jar ++ 1.7 ++ ++ ++ org.codehaus.plexus ++ plexus-i18n ++ jar ++ 1.0-beta-7 ++ ++ ++ org.apache.commons ++ commons-lang3 ++ jar ++ 3.5 ++ ++ ++ org.apache.maven.doxia ++ doxia-skin-model ++ jar ++ 1.7.5 ++ ++ ++ org.apache.maven ++ maven-plugin-api ++ jar ++ 3.0 ++ ++ ++ org.codehaus.plexus ++ plexus-classworlds ++ jar ++ 2.6.0 ++ ++ ++ org.apache.maven ++ maven-model ++ jar ++ 3.0 ++ ++ ++ org.apache.maven ++ maven-repository-metadata ++ jar ++ 3.0 ++ ++ ++ org.apache.maven ++ maven-artifact ++ jar ++ 3.0 ++ ++ ++ org.apache.maven.reporting ++ maven-reporting-impl ++ jar ++ 2.3 ++ ++ ++ org.apache.maven.shared ++ maven-shared-utils ++ jar ++ 3.2.0 ++ ++ ++ commons-io ++ commons-io ++ jar ++ 2.5 ++ ++ ++ org.apache.maven.reporting ++ maven-reporting-api ++ jar ++ 3.0 ++ ++ ++ org.codehaus.plexus ++ plexus-utils ++ jar ++ 3.0.20 ++ ++ ++ org.codehaus.plexus ++ plexus-velocity ++ jar ++ 1.1.8 ++ ++ ++ org.codehaus.plexus ++ plexus-container-default ++ jar ++ SYSTEM ++ ++ ++ org.apache.xbean ++ xbean-reflect ++ jar ++ SYSTEM ++ ++ ++ com.google.guava ++ guava ++ jar ++ 20.0 ++ ++ ++ junit ++ junit ++ jar ++ SYSTEM ++ ++ ++ org.hamcrest ++ hamcrest-core ++ jar ++ 1.3 ++ ++ ++ org.apache.velocity ++ velocity ++ jar ++ 1.7 ++ ++ ++ commons-lang ++ commons-lang ++ jar ++ 2.4 ++ ++ ++ +--- maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpMojo.java 1970-01-01 01:00:00.000000000 +0100 ++++ maven-plugin-tools-3.6.0/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpMojo.java 2019-11-25 11:01:29.241066576 +0100 +@@ -0,0 +1,458 @@ ++ ++package org.apache.maven.plugin.plugin; ++ ++import org.apache.maven.plugin.AbstractMojo; ++import org.apache.maven.plugin.MojoExecutionException; ++import org.apache.maven.plugins.annotations.Mojo; ++import org.apache.maven.plugins.annotations.Parameter; ++ ++import org.w3c.dom.Document; ++import org.w3c.dom.Element; ++import org.w3c.dom.Node; ++import org.w3c.dom.NodeList; ++import org.xml.sax.SAXException; ++ ++import javax.xml.parsers.DocumentBuilder; ++import javax.xml.parsers.DocumentBuilderFactory; ++import javax.xml.parsers.ParserConfigurationException; ++import java.io.IOException; ++import java.io.InputStream; ++import java.util.ArrayList; ++import java.util.List; ++ ++/** ++ * Display help information on maven-plugin-plugin.
++ * Call mvn plugin:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. ++ * @author maven-plugin-tools ++ */ ++@Mojo( name = "help", requiresProject = false, threadSafe = true ) ++public class HelpMojo ++ extends AbstractMojo ++{ ++ /** ++ * If true, display all settable properties for each goal. ++ * ++ */ ++ @Parameter( property = "detail", defaultValue = "false" ) ++ private boolean detail; ++ ++ /** ++ * The name of the goal for which to show help. If unspecified, all goals will be displayed. ++ * ++ */ ++ @Parameter( property = "goal" ) ++ private java.lang.String goal; ++ ++ /** ++ * The maximum length of a display line, should be positive. ++ * ++ */ ++ @Parameter( property = "lineLength", defaultValue = "80" ) ++ private int lineLength; ++ ++ /** ++ * The number of spaces per indentation level, should be positive. ++ * ++ */ ++ @Parameter( property = "indentSize", defaultValue = "2" ) ++ private int indentSize; ++ ++ // groupId/artifactId/plugin-help.xml ++ private static final String PLUGIN_HELP_PATH = ++ "/META-INF/maven/org.apache.maven.plugins/maven-plugin-plugin/plugin-help.xml"; ++ ++ private static final int DEFAULT_LINE_LENGTH = 80; ++ ++ private Document build() ++ throws MojoExecutionException ++ { ++ getLog().debug( "load plugin-help.xml: " + PLUGIN_HELP_PATH ); ++ InputStream is = null; ++ try ++ { ++ is = getClass().getResourceAsStream( PLUGIN_HELP_PATH ); ++ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); ++ DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); ++ return dBuilder.parse( is ); ++ } ++ catch ( IOException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( ParserConfigurationException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ catch ( SAXException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ finally ++ { ++ if ( is != null ) ++ { ++ try ++ { ++ is.close(); ++ } ++ catch ( IOException e ) ++ { ++ throw new MojoExecutionException( e.getMessage(), e ); ++ } ++ } ++ } ++ } ++ ++ /** ++ * {@inheritDoc} ++ */ ++ public void execute() ++ throws MojoExecutionException ++ { ++ if ( lineLength <= 0 ) ++ { ++ getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." ); ++ lineLength = DEFAULT_LINE_LENGTH; ++ } ++ if ( indentSize <= 0 ) ++ { ++ getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." ); ++ indentSize = 2; ++ } ++ ++ Document doc = build(); ++ ++ StringBuilder sb = new StringBuilder(); ++ Node plugin = getSingleChild( doc, "plugin" ); ++ ++ ++ String name = getValue( plugin, "name" ); ++ String version = getValue( plugin, "version" ); ++ String id = getValue( plugin, "groupId" ) + ":" + getValue( plugin, "artifactId" ) + ":" + version; ++ if ( isNotEmpty( name ) && !name.contains( id ) ) ++ { ++ append( sb, name + " " + version, 0 ); ++ } ++ else ++ { ++ if ( isNotEmpty( name ) ) ++ { ++ append( sb, name, 0 ); ++ } ++ else ++ { ++ append( sb, id, 0 ); ++ } ++ } ++ append( sb, getValue( plugin, "description" ), 1 ); ++ append( sb, "", 0 ); ++ ++ //plugin ++ String goalPrefix = getValue( plugin, "goalPrefix" ); ++ ++ Node mojos1 = getSingleChild( plugin, "mojos" ); ++ ++ List mojos = findNamedChild( mojos1, "mojo" ); ++ ++ if ( goal == null || goal.length() <= 0 ) ++ { ++ append( sb, "This plugin has " + mojos.size() + ( mojos.size() > 1 ? " goals:" : " goal:" ), 0 ); ++ append( sb, "", 0 ); ++ } ++ ++ for ( Node mojo : mojos ) ++ { ++ writeGoal( sb, goalPrefix, (Element) mojo ); ++ } ++ ++ if ( getLog().isInfoEnabled() ) ++ { ++ getLog().info( sb.toString() ); ++ } ++ } ++ ++ ++ private static boolean isNotEmpty( String string ) ++ { ++ return string != null && string.length() > 0; ++ } ++ ++ private String getValue( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ return getSingleChild( node, elementName ).getTextContent(); ++ } ++ ++ private Node getSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List namedChild = findNamedChild( node, elementName ); ++ if ( namedChild.isEmpty() ) ++ { ++ throw new MojoExecutionException( "Could not find " + elementName + " in plugin-help.xml" ); ++ } ++ if ( namedChild.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + " in plugin-help.xml" ); ++ } ++ return namedChild.get( 0 ); ++ } ++ ++ private List findNamedChild( Node node, String elementName ) ++ { ++ List result = new ArrayList(); ++ NodeList childNodes = node.getChildNodes(); ++ for ( int i = 0; i < childNodes.getLength(); i++ ) ++ { ++ Node item = childNodes.item( i ); ++ if ( elementName.equals( item.getNodeName() ) ) ++ { ++ result.add( item ); ++ } ++ } ++ return result; ++ } ++ ++ private Node findSingleChild( Node node, String elementName ) ++ throws MojoExecutionException ++ { ++ List elementsByTagName = findNamedChild( node, elementName ); ++ if ( elementsByTagName.isEmpty() ) ++ { ++ return null; ++ } ++ if ( elementsByTagName.size() > 1 ) ++ { ++ throw new MojoExecutionException( "Multiple " + elementName + "in plugin-help.xml" ); ++ } ++ return elementsByTagName.get( 0 ); ++ } ++ ++ private void writeGoal( StringBuilder sb, String goalPrefix, Element mojo ) ++ throws MojoExecutionException ++ { ++ String mojoGoal = getValue( mojo, "goal" ); ++ Node configurationElement = findSingleChild( mojo, "configuration" ); ++ Node description = findSingleChild( mojo, "description" ); ++ if ( goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) ) ++ { ++ append( sb, goalPrefix + ":" + mojoGoal, 0 ); ++ Node deprecated = findSingleChild( mojo, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 1 ); ++ if ( detail && description != null ) ++ { ++ append( sb, "", 0 ); ++ append( sb, description.getTextContent(), 1 ); ++ } ++ } ++ else if ( description != null ) ++ { ++ append( sb, description.getTextContent(), 1 ); ++ } ++ append( sb, "", 0 ); ++ ++ if ( detail ) ++ { ++ Node parametersNode = getSingleChild( mojo, "parameters" ); ++ List parameters = findNamedChild( parametersNode, "parameter" ); ++ append( sb, "Available parameters:", 1 ); ++ append( sb, "", 0 ); ++ ++ for ( Node parameter : parameters ) ++ { ++ writeParameter( sb, parameter, configurationElement ); ++ } ++ } ++ } ++ } ++ ++ private void writeParameter( StringBuilder sb, Node parameter, Node configurationElement ) ++ throws MojoExecutionException ++ { ++ String parameterName = getValue( parameter, "name" ); ++ String parameterDescription = getValue( parameter, "description" ); ++ ++ Element fieldConfigurationElement = null; ++ if ( configurationElement != null ) ++ { ++ fieldConfigurationElement = (Element) findSingleChild( configurationElement, parameterName ); ++ } ++ ++ String parameterDefaultValue = ""; ++ if ( fieldConfigurationElement != null && fieldConfigurationElement.hasAttribute( "default-value" ) ) ++ { ++ parameterDefaultValue = " (Default: " + fieldConfigurationElement.getAttribute( "default-value" ) + ")"; ++ } ++ append( sb, parameterName + parameterDefaultValue, 2 ); ++ Node deprecated = findSingleChild( parameter, "deprecated" ); ++ if ( ( deprecated != null ) && isNotEmpty( deprecated.getTextContent() ) ) ++ { ++ append( sb, "Deprecated. " + deprecated.getTextContent(), 3 ); ++ append( sb, "", 0 ); ++ } ++ append( sb, parameterDescription, 3 ); ++ if ( "true".equals( getValue( parameter, "required" ) ) ) ++ { ++ append( sb, "Required: Yes", 3 ); ++ } ++ if ( ( fieldConfigurationElement != null ) && isNotEmpty( fieldConfigurationElement.getTextContent() ) ) ++ { ++ String property = getPropertyFromExpression( fieldConfigurationElement.getTextContent() ); ++ append( sb, "User property: " + property, 3 ); ++ } ++ ++ append( sb, "", 0 ); ++ } ++ ++ /** ++ *

Repeat a String n times to form a new string.

++ * ++ * @param str String to repeat ++ * @param repeat number of times to repeat str ++ * @return String with repeated String ++ * @throws NegativeArraySizeException if repeat < 0 ++ * @throws NullPointerException if str is null ++ */ ++ private static String repeat( String str, int repeat ) ++ { ++ StringBuilder buffer = new StringBuilder( repeat * str.length() ); ++ ++ for ( int i = 0; i < repeat; i++ ) ++ { ++ buffer.append( str ); ++ } ++ ++ return buffer.toString(); ++ } ++ ++ /** ++ * Append a description to the buffer by respecting the indentSize and lineLength parameters. ++ * Note: The last character is always a new line. ++ * ++ * @param sb The buffer to append the description, not null. ++ * @param description The description, not null. ++ * @param indent The base indentation level of each line, must not be negative. ++ */ ++ private void append( StringBuilder sb, String description, int indent ) ++ { ++ for ( String line : toLines( description, indent, indentSize, lineLength ) ) ++ { ++ sb.append( line ).append( '\n' ); ++ } ++ } ++ ++ /** ++ * Splits the specified text into lines of convenient display length. ++ * ++ * @param text The text to split into lines, must not be null. ++ * @param indent The base indentation level of each line, must not be negative. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ * @return The sequence of display lines, never null. ++ * @throws NegativeArraySizeException if indent < 0 ++ */ ++ private static List toLines( String text, int indent, int indentSize, int lineLength ) ++ { ++ List lines = new ArrayList(); ++ ++ String ind = repeat( "\t", indent ); ++ ++ String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" ); ++ ++ for ( String plainLine : plainLines ) ++ { ++ toLines( lines, ind + plainLine, indentSize, lineLength ); ++ } ++ ++ return lines; ++ } ++ ++ /** ++ * Adds the specified line to the output sequence, performing line wrapping if necessary. ++ * ++ * @param lines The sequence of display lines, must not be null. ++ * @param line The line to add, must not be null. ++ * @param indentSize The size of each indentation, must not be negative. ++ * @param lineLength The length of the line, must not be negative. ++ */ ++ private static void toLines( List lines, String line, int indentSize, int lineLength ) ++ { ++ int lineIndent = getIndentLevel( line ); ++ StringBuilder buf = new StringBuilder( 256 ); ++ ++ String[] tokens = line.split( " +" ); ++ ++ for ( String token : tokens ) ++ { ++ if ( buf.length() > 0 ) ++ { ++ if ( buf.length() + token.length() >= lineLength ) ++ { ++ lines.add( buf.toString() ); ++ buf.setLength( 0 ); ++ buf.append( repeat( " ", lineIndent * indentSize ) ); ++ } ++ else ++ { ++ buf.append( ' ' ); ++ } ++ } ++ ++ for ( int j = 0; j < token.length(); j++ ) ++ { ++ char c = token.charAt( j ); ++ if ( c == '\t' ) ++ { ++ buf.append( repeat( " ", indentSize - buf.length() % indentSize ) ); ++ } ++ else if ( c == '\u00A0' ) ++ { ++ buf.append( ' ' ); ++ } ++ else ++ { ++ buf.append( c ); ++ } ++ } ++ } ++ lines.add( buf.toString() ); ++ } ++ ++ /** ++ * Gets the indentation level of the specified line. ++ * ++ * @param line The line whose indentation level should be retrieved, must not be null. ++ * @return The indentation level of the line. ++ */ ++ private static int getIndentLevel( String line ) ++ { ++ int level = 0; ++ for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) ++ { ++ level++; ++ } ++ for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ ) ++ { ++ if ( line.charAt( i ) == '\t' ) ++ { ++ level++; ++ break; ++ } ++ } ++ return level; ++ } ++ ++ private String getPropertyFromExpression( String expression ) ++ { ++ if ( expression != null && expression.startsWith( "${" ) && expression.endsWith( "}" ) ++ && !expression.substring( 2 ).contains( "${" ) ) ++ { ++ // expression="${xxx}" -> property="xxx" ++ return expression.substring( 2, expression.length() - 1 ); ++ } ++ // no property can be extracted ++ return null; ++ } ++} diff --git a/maven-plugin-plugin-bootstrap.changes b/maven-plugin-plugin-bootstrap.changes new file mode 100644 index 0000000..e89dd0a --- /dev/null +++ b/maven-plugin-plugin-bootstrap.changes @@ -0,0 +1,28 @@ +------------------------------------------------------------------- +Fri May 13 09:17:09 UTC 2022 - Fridrich Strba + +- Fix build with modello 2.0.0 + +------------------------------------------------------------------- +Mon Nov 25 10:25:11 UTC 2019 - Fridrich Strba + +- Upgrade to upstream 3.6.0 + * allow building with java > 1.8 too against objectweb-asm 7.2 +- Removed patch: + * fix-getPluginsAsMap.patch + + fix is present in the updated sources +- Modified patch: + * maven-plugin-plugin-bootstrap-resouces.patch + + regenerate from the non-bootstrap build to correspond to + what is generate by the maven-plugin-plugin + +------------------------------------------------------------------- +Fri Mar 29 17:04:37 UTC 2019 - Fridrich Strba + +- Initial packaging of a bootstrap version of maven-plugin-plugin + version 3.5.1 +- Added patch: + * maven-plugin-plugin-bootstrap-resouces.patch + + Add to the build pre-generated resources that need, in a + circular way, maven and maven-plugin-plugin for their + generation. diff --git a/maven-plugin-plugin-bootstrap.spec b/maven-plugin-plugin-bootstrap.spec new file mode 100644 index 0000000..11c87bb --- /dev/null +++ b/maven-plugin-plugin-bootstrap.spec @@ -0,0 +1,134 @@ +# +# spec file +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global base_name maven-plugin-tools +%global artifactId maven-plugin-plugin +Name: %{artifactId}-bootstrap +Version: 3.6.0 +Release: 0 +Summary: Maven Plugin Plugin +License: Apache-2.0 +Group: Development/Libraries/Java +URL: http://maven.apache.org/plugin-tools/ +Source0: http://repo2.maven.org/maven2/org/apache/maven/plugin-tools/%{base_name}/%{version}/%{base_name}-%{version}-source-release.zip +Source1: %{base_name}-build.tar.xz +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 +# The maven-plugin-plugin is used to generate those descriptors, which +# creates a circular dependency of maven-plugin-plugin on itself. +# We generated those ones outside the rpm build for a bootstrap package. +Patch20: maven-plugin-plugin-bootstrap-resouces.patch +BuildRequires: ant +BuildRequires: javapackages-local +BuildRequires: maven-doxia-logging-api +BuildRequires: maven-doxia-sink-api +BuildRequires: maven-doxia-sitetools +BuildRequires: maven-lib +BuildRequires: maven-plugin-annotations +BuildRequires: maven-plugin-registry +BuildRequires: maven-plugin-tools-api +BuildRequires: maven-plugin-tools-generators +BuildRequires: maven-reporting-api +BuildRequires: maven-reporting-impl +BuildRequires: modello >= 2.0.0 +BuildRequires: plexus-containers-container-default +BuildRequires: plexus-utils +BuildRequires: plexus-velocity +BuildRequires: unzip +BuildRequires: velocity +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-tools-annotations) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-tools-java) +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildArch: noarch + +%description +The Plugin Plugin is used to create a Maven plugin descriptor for any Mojo's +found in the source tree, to include in the JAR. It is also used to generate +Xdoc files for the Mojos as well as for updating the plugin registry, the +artifact metadata and a generic help goal. + +%prep +%setup -q -n %{base_name}-%{version} -a1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch20 -p1 + +%pom_remove_plugin -r :maven-enforcer-plugin + +%pom_xpath_inject "pom:project/pom:properties" " + UTF-8 + UTF-8" + +# Why on the earth is this dependency there ??? +%pom_remove_dep :maven-surefire-common maven-plugin-plugin + +# Remove test dependencies because tests are skipped anyways. +%pom_xpath_remove "pom:dependency[pom:scope='test']" + +%pom_change_dep org.easymock:easymock:: :::test maven-plugin-tools-annotations + +# For some reason, this dependency is not generated by javapackages-local +# and for some reasons if we give it a scope 'runtime' it works +%pom_remove_dep :maven-plugin-annotations maven-plugin-plugin +%pom_add_dep org.apache.maven.plugin-tools:maven-plugin-annotations:%{version}:runtime maven-plugin-plugin + +%{mvn_package} :maven-plugin-tools __noinstall + +%build +mkdir -p lib +build-jar-repository -s lib \ + maven-doxia/doxia-logging-api \ + maven-doxia/doxia-sink-api \ + maven-doxia-sitetools/doxia-site-renderer \ + maven/maven-artifact \ + maven/maven-compat \ + maven/maven-core \ + maven/maven-model \ + maven/maven-plugin-api \ + maven/maven-plugin-registry \ + maven/maven-repository-metadata \ + maven-plugin-tools/maven-plugin-annotations \ + maven-plugin-tools/maven-plugin-tools-api \ + maven-plugin-tools/maven-plugin-tools-generators \ + maven-reporting-api/maven-reporting-api \ + maven-reporting-impl/maven-reporting-impl \ + plexus-containers/plexus-container-default \ + plexus/utils \ + plexus-velocity/plexus-velocity \ + velocity + +%{mvn_file} :%{artifactId} %{base_name}/%{artifactId} +pushd %{artifactId} +%ant \ + -Dtest.skip=true \ + jar +popd +%mvn_artifact pom.xml +%mvn_artifact %{artifactId}/pom.xml %{artifactId}/target/%{artifactId}-%{version}.jar + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE NOTICE + +%changelog diff --git a/maven-plugin-plugin.changes b/maven-plugin-plugin.changes new file mode 100644 index 0000000..64ceb6c --- /dev/null +++ b/maven-plugin-plugin.changes @@ -0,0 +1,20 @@ +------------------------------------------------------------------- +Mon Nov 25 10:29:02 UTC 2019 - Fridrich Strba + +- Upgrade to upstream 3.6.0 + * allow building with java > 1.8 too against objectweb-asm 7.2 +- Removed patch: + * fix-getPluginsAsMap.patch + + fix is present in the updated sources + +------------------------------------------------------------------- +Sun Nov 24 17:30:49 UTC 2019 - Fridrich Strba + +- Specify maven.compiler.release to fix build with jdk9+ and newer + maven-javadoc-plugin + +------------------------------------------------------------------- +Wed Apr 3 09:16:17 UTC 2019 - Fridrich Strba + +- Initial packaging of the non-bootstrap version of + maven-plugin-plugin 3.5.1 diff --git a/maven-plugin-plugin.spec b/maven-plugin-plugin.spec new file mode 100644 index 0000000..62d3d84 --- /dev/null +++ b/maven-plugin-plugin.spec @@ -0,0 +1,118 @@ +# +# spec file for package maven-plugin-plugin +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global base_name maven-plugin-tools +Name: maven-plugin-plugin +Version: 3.6.0 +Release: 0 +Summary: Maven Plugin Plugin +License: Apache-2.0 +Group: Development/Libraries/Java +URL: http://maven.apache.org/plugin-tools/ +Source0: http://repo2.maven.org/maven2/org/apache/maven/plugin-tools/%{base_name}/%{version}/%{base_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 +BuildRequires: fdupes +BuildRequires: maven-local +BuildRequires: unzip +BuildRequires: mvn(org.apache.maven.doxia:doxia-sink-api) +BuildRequires: mvn(org.apache.maven.doxia:doxia-site-renderer) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-tools-annotations) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-tools-api) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-tools-generators) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-tools-java) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.reporting:maven-reporting-api) +BuildRequires: mvn(org.apache.maven.reporting:maven-reporting-impl) +BuildRequires: mvn(org.apache.maven.surefire:maven-surefire-common) +BuildRequires: mvn(org.apache.maven:maven-artifact:2.2.1) +BuildRequires: mvn(org.apache.maven:maven-model:2.2.1) +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.apache.maven:maven-repository-metadata) +BuildRequires: mvn(org.apache.velocity:velocity) +BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin) +BuildRequires: mvn(org.codehaus.plexus:plexus-utils) +BuildRequires: mvn(org.codehaus.plexus:plexus-velocity) +Obsoletes: %{name}-bootstrap +#!BuildRequires: maven-compiler-plugin-bootstrap +#!BuildRequires: maven-jar-plugin-bootstrap +#!BuildRequires: maven-javadoc-plugin-bootstrap +#!BuildRequires: maven-plugin-plugin-bootstrap +#!BuildRequires: maven-resources-plugin-bootstrap +#!BuildRequires: maven-surefire-plugin-bootstrap +BuildArch: noarch + +%description +The Plugin Plugin is used to create a Maven plugin descriptor for any Mojo's +found in the source tree, to include in the JAR. It is also used to generate +Xdoc files for the Mojos as well as for updating the plugin registry, the +artifact metadata and a generic help goal. + +%package javadoc +Summary: Javadoc for %{name} +Group: Development/Libraries/Java + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -n %{base_name}-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%pom_remove_plugin -r :maven-enforcer-plugin + +%pom_xpath_inject "pom:project/pom:properties" " + UTF-8 + UTF-8" + +# Remove test dependencies because tests are skipped anyways. +%pom_xpath_remove "pom:dependency[pom:scope='test']" + +# Why on the earth is this dependency there ??? +%pom_remove_dep :maven-surefire-common maven-plugin-plugin + +%pom_change_dep org.easymock:easymock:: :::test maven-plugin-tools-annotations + +%build +pushd %{name} +%{mvn_file} :%{name} %{base_name}/%{name} +%{mvn_build} -f \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} + -- -Dmaven.compiler.release=7 +%endif + +popd + +%install +pushd %{name} +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} +popd + +%files -f %{name}/.mfiles +%license LICENSE NOTICE + +%files javadoc -f %{name}/.mfiles-javadoc +%license LICENSE NOTICE + +%changelog diff --git a/maven-plugin-tools-3.6.0-source-release.zip b/maven-plugin-tools-3.6.0-source-release.zip new file mode 100644 index 0000000..977fc33 --- /dev/null +++ b/maven-plugin-tools-3.6.0-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89f924e29820991f1d0542e94c060ad42152a6fc164fe7231d03b6815a432456 +size 701732 diff --git a/maven-plugin-tools-build.tar.xz b/maven-plugin-tools-build.tar.xz new file mode 100644 index 0000000..3705cd3 --- /dev/null +++ b/maven-plugin-tools-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59e256be79c8a271ab09da3057ac76a8d5915054f1807463e3e3a701c698f589 +size 4656 diff --git a/maven-plugin-tools.changes b/maven-plugin-tools.changes new file mode 100644 index 0000000..55589f1 --- /dev/null +++ b/maven-plugin-tools.changes @@ -0,0 +1,36 @@ +------------------------------------------------------------------- +Fri May 13 09:16:46 UTC 2022 - Fridrich Strba + +- Fix build with modello 2.0.0 + +------------------------------------------------------------------- +Mon Mar 7 11:01:23 UTC 2022 - Fridrich Strba + +- Do not force building with java-1_8_0-openjdk, since the package + builds just fine with higher versions. + +------------------------------------------------------------------- +Tue May 11 15:18:26 UTC 2021 - Fridrich Strba + +- Do not build against the legacy guava20 package any more + +------------------------------------------------------------------- +Mon Nov 25 10:18:49 UTC 2019 - Fridrich Strba + +- Upgrade to upstream 3.6.0 + * allow building with java > 1.8 too against objectweb-asm 7.2 + * maven-plugin-tools-javadoc component does not exist any more + * Renamed the package of documentation to + maven-plugin-tools-javadoc since there is no name clash any + more and it allows smooth upgrade +- Removed patch: + * fix-getPluginsAsMap.patch + + fix is present in the updated sources + +------------------------------------------------------------------- +Fri Mar 29 13:22:25 UTC 2019 - Fridrich Strba + +- Initial packaging of maven-plugin-tools 3.5.1 +- Generate and customize ant build files +- Do not build maven-plugin-plugin in this spec, since it has + circular dependency on itself diff --git a/maven-plugin-tools.spec b/maven-plugin-tools.spec new file mode 100644 index 0000000..3db243c --- /dev/null +++ b/maven-plugin-tools.spec @@ -0,0 +1,277 @@ +# +# spec file for package maven-plugin-tools +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: maven-plugin-tools +Version: 3.6.0 +Release: 0 +Summary: Maven Plugin Tools +License: Apache-2.0 +Group: Development/Libraries/Java +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 +Source1: %{name}-build.tar.xz +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 +BuildRequires: ant +BuildRequires: apache-commons-cli +BuildRequires: atinject +BuildRequires: bsh2 +BuildRequires: fdupes +BuildRequires: google-guice +BuildRequires: guava +BuildRequires: java-devel >= 1.8 +BuildRequires: javapackages-local +BuildRequires: jdom2 +BuildRequires: jtidy +BuildRequires: junit +BuildRequires: maven-lib +BuildRequires: maven-reporting-api +BuildRequires: modello >= 2.0.0 +BuildRequires: objectweb-asm +BuildRequires: plexus-ant-factory +BuildRequires: plexus-archiver +BuildRequires: plexus-bsh-factory +BuildRequires: plexus-classworlds +BuildRequires: plexus-cli +BuildRequires: plexus-containers-component-annotations +BuildRequires: plexus-metadata-generator +BuildRequires: plexus-utils +BuildRequires: plexus-velocity +BuildRequires: qdox +BuildRequires: sisu-inject +BuildRequires: sisu-plexus +BuildRequires: unzip +BuildRequires: velocity +BuildRequires: xbean +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: mvn(org.apache.maven:maven-parent:pom:) +BuildArch: noarch + +%description +The Maven Plugin Tools contains the necessary tools to be able to produce Maven +Plugins in a variety of languages. + +%package -n maven-plugin-annotations +Summary: Maven Plugin Java 5 Annotations +Group: Development/Libraries/Java + +%description -n maven-plugin-annotations +This package contains Java 5 annotations to use in Mojos. + +%package annotations +Summary: Maven Plugin Tool for Annotations +Group: Development/Libraries/Java + +%description annotations +This package provides Java 5 annotation tools for use with Apache Maven. + +%package ant +Summary: Maven Plugin Tool for Ant +Group: Development/Libraries/Java + +%description ant +Descriptor extractor for plugins written in Ant. + +%package api +Summary: Maven Plugin Tools APIs +Group: Development/Libraries/Java + +%description api +The Maven Plugin Tools API provides an API to extract information from +and generate documentation for Maven Plugins. + +%package beanshell +Summary: Maven Plugin Tool for Beanshell +Group: Development/Libraries/Java + +%description beanshell +Descriptor extractor for plugins written in Beanshell. + +%package generators +Summary: Maven Plugin Tools Generators +Group: Development/Libraries/Java + +%description generators +The Maven Plugin Tools Generators provides content generation +(documentation, help) from plugin descriptor. + +%package java +Summary: Maven Plugin Tool for Java +Group: Development/Libraries/Java + +%description java +Descriptor extractor for plugins written in Java. + +%package model +Summary: Maven Plugin Metadata Model +Group: Development/Libraries/Java + +%description model +The Maven Plugin Metadata Model provides an API to play with the Metadata +model. + +%package -n maven-script-ant +Summary: Maven Ant Mojo Support +Group: Development/Libraries/Java + +%description -n maven-script-ant +This package provides %{summary}, which write Maven plugins with +Ant scripts. + +%package -n maven-script-beanshell +Summary: Maven Beanshell Mojo Support +Group: Development/Libraries/Java + +%description -n maven-script-beanshell +This package provides %{summary}, which write Maven plugins with +Beanshell scripts. + +%package javadoc +Summary: Javadoc for %{name} +Group: Development/Libraries/Java +Provides: %{name}-javadocs = %{version}-%{release} +Obsoletes: %{name}-javadocs < %{version}-%{release} + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q -a1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%pom_remove_plugin -r :maven-enforcer-plugin + +%pom_xpath_inject "pom:project/pom:properties" " + UTF-8 + UTF-8" + +# Remove test dependencies because tests are skipped anyways. +%pom_xpath_remove "pom:dependency[pom:scope='test']" + +%pom_change_dep org.easymock:easymock:: :::test maven-plugin-tools-annotations + +%{mvn_package} :maven-plugin-tools __noinstall +%{mvn_package} :maven-script __noinstall +%{mvn_package} :{*} @1 + +%build +mkdir -p lib +build-jar-repository -s lib \ + ant \ + ant-launcher \ + atinject \ + bsh2/bsh \ + commons-cli \ + guava/guava \ + guice/google-guice-no_aop \ + jdom2/jdom2 \ + jtidy \ + junit \ + maven/maven-artifact \ + maven/maven-compat \ + maven/maven-core \ + maven/maven-model \ + maven/maven-plugin-api \ + maven-reporting-api/maven-reporting-api \ + objectweb-asm/asm \ + objectweb-asm/asm-commons \ + org.eclipse.sisu.inject \ + org.eclipse.sisu.plexus \ + plexus/ant-factory \ + plexus/archiver \ + plexus/bsh-factory \ + plexus-classworlds \ + plexus/cli \ + plexus-containers/plexus-component-annotations \ + plexus-metadata-generator \ + plexus/utils \ + plexus-velocity/plexus-velocity \ + qdox \ + velocity \ + xbean/xbean-reflect + + ln -s $(xmvn-resolve com.sun:tools) lib/ + +%{ant} \ + -Dtest.skip=true \ + package javadoc + +%mvn_artifact pom.xml +%mvn_artifact maven-script/pom.xml + +mkdir -p target/site/apidocs +for i in \ + maven-plugin-annotations \ + maven-plugin-tools-annotations \ + maven-plugin-tools-api \ + maven-plugin-tools-generators \ + maven-plugin-tools-java; do + %{mvn_artifact} ${i}/pom.xml ${i}/target/${i}-%{version}.jar + if [ -d ${i}/target/site/apidocs ]; then + cp -r ${i}/target/site/apidocs target/site/apidocs/${i} + fi +done +for i in \ + maven-plugin-tools-ant \ + maven-plugin-tools-beanshell \ + maven-plugin-tools-model \ + maven-script-ant \ + maven-script-beanshell; do + %{mvn_artifact} maven-script/${i}/pom.xml maven-script/${i}/target/${i}-%{version}.jar + if [ -d maven-script/${i}/target/site/apidocs ]; then + cp -r maven-script/${i}/target/site/apidocs target/site/apidocs/${i} + fi +done + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files -n maven-plugin-annotations -f .mfiles-maven-plugin-annotations + +%files annotations -f .mfiles-maven-plugin-tools-annotations +%license LICENSE NOTICE + +%files ant -f .mfiles-maven-plugin-tools-ant + +%files api -f .mfiles-maven-plugin-tools-api +%license LICENSE NOTICE + +%files beanshell -f .mfiles-maven-plugin-tools-beanshell + +%files generators -f .mfiles-maven-plugin-tools-generators + +%files java -f .mfiles-maven-plugin-tools-java + +%files model -f .mfiles-maven-plugin-tools-model +%license LICENSE NOTICE + +%files -n maven-script-ant -f .mfiles-maven-script-ant +%license LICENSE NOTICE + +%files -n maven-script-beanshell -f .mfiles-maven-script-beanshell +%license LICENSE NOTICE + +%files javadoc -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog