commit
d2480a040c
68
0001-Avoid-duplicate-MOJO-parameters.patch
Normal file
68
0001-Avoid-duplicate-MOJO-parameters.patch
Normal file
@ -0,0 +1,68 @@
|
||||
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
|
||||
|
||||
66
0002-Deal-with-nulls-from-getComment.patch
Normal file
66
0002-Deal-with-nulls-from-getComment.patch
Normal file
@ -0,0 +1,66 @@
|
||||
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
|
||||
|
||||
33
0003-Port-to-plexus-utils-3.0.24.patch
Normal file
33
0003-Port-to-plexus-utils-3.0.24.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 690138ca262b03d7e43336dd9bfee2ca0e1b03f9 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Thu, 12 May 2016 09:36:10 +0200
|
||||
Subject: [PATCH 3/3] Port to plexus-utils 3.0.24
|
||||
|
||||
---
|
||||
.../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
|
||||
|
||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# maven-plugin-tools
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
||||
# maven-plugin-tools
|
||||
|
||||
#### 介绍
|
||||
{**以下是码云平台说明,您可以替换此简介**
|
||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 码云特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
BIN
maven-plugin-tools-3.5.1-source-release.zip
Normal file
BIN
maven-plugin-tools-3.5.1-source-release.zip
Normal file
Binary file not shown.
138
maven-plugin-tools.spec
Normal file
138
maven-plugin-tools.spec
Normal file
@ -0,0 +1,138 @@
|
||||
%define shared maven-shared-plugin-tools
|
||||
|
||||
Name: maven-plugin-tools
|
||||
Version: 3.5.1
|
||||
Release: 5
|
||||
Summary: Maven Plugin Tools
|
||||
License: ASL 2.0
|
||||
URL: https://maven.apache.org/plugin-tools
|
||||
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
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: maven-local javapackages-tools qdox jtidy ant maven-doxia-sink-api
|
||||
BuildRequires: maven-doxia-sitetools maven-enforcer-plugin maven-plugin-plugin maven
|
||||
BuildRequires: maven-reporting-api maven-reporting-impl maven-surefire maven-artifact
|
||||
BuildRequires: maven-model maven-parent maven-plugin-registry bsh plexus-ant-factory
|
||||
BuildRequires: plexus-archiver plexus-containers-component-annotations modello
|
||||
BuildRequires: plexus-containers-component-metadata plexus-utils plexus-velocity
|
||||
BuildRequires: easymock objectweb-asm plexus-bsh-factory velocity maven-source-plugin
|
||||
|
||||
Provides: %{name}-ant = %{version}-%{release} %{shared}-ant = 0:%{version}-%{release}
|
||||
Obsoletes: %{name}-ant < %{version}-%{release} %{shared}-ant < 0:%{version}-%{release}
|
||||
Provides: %{name}-api = %{version}-%{release} %{shared}-api = 0:%{version}-%{release}
|
||||
Obsoletes: %{name}-api < %{version}-%{release} %{shared}-api < 0:%{version}-%{release}
|
||||
Provides: %{name}-java = %{version}-%{release} %{shared}-java = 0:%{version}-%{release}
|
||||
Obsoletes: %{name}-java < %{version}-%{release} %{shared}-java < 0:%{version}-%{release}
|
||||
Provides: %{name}-model = %{version}-%{release} %{shared}-model = 0:%{version}-%{release}
|
||||
Obsoletes: %{name}-model < %{version}-%{release} %{shared}-model < 0:%{version}-%{release}
|
||||
Provides: %{name}-javadocs = %{version}-%{release} %{name}-annotations = %{version}-%{release}
|
||||
Obsoletes: %{name}-javadocs < %{version}-%{release} %{name}-annotations < %{version}-%{release}
|
||||
Provides: %{name}-javadoc = %{version}-%{release} maven-plugin-annotations = %{version}-%{release}
|
||||
Obsoletes: %{name}-javadoc < %{version}-%{release} maven-plugin-annotations < %{version}-%{release}
|
||||
|
||||
%description
|
||||
The Maven Plugin Tools contains the necessary tools to generate rebarbative
|
||||
content like descriptor, help and documentation. In addition, it provides
|
||||
tools to write Maven Plugins in scripting languages like Ant or Beanshell.
|
||||
|
||||
|
||||
|
||||
%package -n maven-script
|
||||
Summary: script package for maven
|
||||
|
||||
Provides: maven-script = %{version}-%{release} maven-script-ant = %{version}-%{release}
|
||||
Obsoletes: maven-script < %{version}-%{release} maven-script-ant < %{version}-%{release}
|
||||
Provides: %{name}-generators = %{version}-%{release} maven-script-beanshell = %{version}-%{release}
|
||||
Obsoletes: %{name}-generators < %{version}-%{release} maven-script-beanshell = %{version}-%{release}
|
||||
Provides: %{name}-beanshell = %{version}-%{release} %{shared}-beanshell = 0:%{version}-%{release}
|
||||
Obsoletes: %{name}-beanshell < %{version}-%{release} %{shared}-beanshell < 0:%{version}-%{release}
|
||||
|
||||
%description -n maven-script
|
||||
script package for maven
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
for package in maven-plugin-plugin maven-plugin-tools-generators maven-script/maven-script-ant ;
|
||||
do
|
||||
%pom_remove_dep :maven-project ${package}
|
||||
done
|
||||
|
||||
for package1 in maven-plugin-plugin maven-script/maven-plugin-tools-ant maven-plugin-tools-api \
|
||||
maven-script/maven-plugin-tools-beanshell maven-plugin-tools-generators maven-plugin-tools-java \
|
||||
maven-script/maven-script-ant ;
|
||||
do
|
||||
%pom_remove_dep :maven-plugin-descriptor ${package1}
|
||||
done
|
||||
|
||||
%pom_remove_dep :maven-project
|
||||
%pom_remove_dep :maven-plugin-descriptor
|
||||
%pom_remove_dep :maven-plugin-registry maven-plugin-plugin
|
||||
%pom_remove_dep :maven-artifact-manager maven-plugin-plugin
|
||||
|
||||
for dep_package in maven-plugin-tools-annotations maven-plugin-tools-api \
|
||||
maven-script/maven-plugin-tools-ant maven-plugin-tools-java ;
|
||||
do
|
||||
%pom_change_dep :maven-project :maven-core ${dep_package}
|
||||
done
|
||||
|
||||
%pom_change_dep :maven-plugin-descriptor :maven-compat maven-plugin-tools-annotations
|
||||
%pom_change_dep :maven-plugin-descriptor :maven-plugin-api maven-script/maven-plugin-tools-model
|
||||
|
||||
%pom_remove_plugin :maven-enforcer-plugin
|
||||
%pom_remove_dep com.sun:tools maven-plugin-tools-javadoc
|
||||
|
||||
%pom_add_dep org.apache.maven:maven-compat
|
||||
%pom_add_dep org.apache.maven:maven-plugin-registry
|
||||
%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>"
|
||||
|
||||
%pom_xpath_remove "pom:dependency[pom:scope='test']"
|
||||
|
||||
%build
|
||||
%mvn_build -s -f
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc NOTICE
|
||||
%license LICENSE
|
||||
%{_datadir}/java/*
|
||||
%{_datadir}/javadoc/*
|
||||
%{_datadir}/maven-poms/*
|
||||
%{_datadir}/maven-metadata/*
|
||||
%exclude %{_datadir}/maven-metadata/*-script*.xml
|
||||
%exclude %{_datadir}/maven-metadata/*-beanshell.xml
|
||||
%exclude %{_datadir}/maven-metadata/*-generators.xml
|
||||
%exclude %{_datadir}/java/maven-plugin-tools/*-beanshell.jar
|
||||
%exclude %{_datadir}/java/maven-plugin-tools/*-generators.jar
|
||||
%exclude %{_datadir}/java/maven-plugin-tools/maven-script*.jar
|
||||
%exclude %{_datadir}/maven-poms/maven-plugin-tools/*-beanshell.pom
|
||||
%exclude %{_datadir}/maven-poms/maven-plugin-tools/*-generators.pom
|
||||
%exclude %{_datadir}/maven-poms/maven-plugin-tools/maven-script*.pom
|
||||
|
||||
%files -n maven-script
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/maven-metadata/*-script*.xml
|
||||
%{_datadir}/maven-metadata/*-beanshell.xml
|
||||
%{_datadir}/maven-metadata/*-generators.xml
|
||||
%{_datadir}/java/maven-plugin-tools/*-beanshell.jar
|
||||
%{_datadir}/java/maven-plugin-tools/*-generators.jar
|
||||
%{_datadir}/java/maven-plugin-tools/maven-script*.jar
|
||||
%{_datadir}/maven-poms/maven-plugin-tools/*-beanshell.pom
|
||||
%{_datadir}/maven-poms/maven-plugin-tools/*-generators.pom
|
||||
%{_datadir}/maven-poms/maven-plugin-tools/maven-script*.pom
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.5.1-5
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user