package init

This commit is contained in:
zhanghua1831 2020-08-25 15:06:22 +08:00
parent c7e81f4a8d
commit 8940b48676
4 changed files with 122 additions and 0 deletions

20
proxytoys-1.0-tests.patch Normal file
View File

@ -0,0 +1,20 @@
--- proxytoys/src/test/java/com/thoughtworks/proxy/AllTests.java 2010-05-13 13:19:38.000000000 +0200
+++ proxytoys/src/test/java/com/thoughtworks/proxy/AllTests.java.test 2015-04-02 11:10:37.157147989 +0200
@@ -68,7 +68,7 @@
PoolTest.class,
PrivilegingTest.class
})
- static class CglibSuite {
+ public static class CglibSuite {
public CglibSuite() {
AbstractProxyTest.PROXY_FACTORY = new CglibProxyFactory();
}
@@ -89,7 +89,7 @@
PoolTest.class,
PrivilegingTest.class
})
- static class StandardSuite {
+ public static class StandardSuite {
public StandardSuite() {
AbstractProxyTest.PROXY_FACTORY = new StandardProxyFactory();
}

98
proxytoys.spec Normal file
View File

@ -0,0 +1,98 @@
%global githash 6f4d22725ef28f09bfd5422939b83e1865b5daef
Name: proxytoys
Version: 1.0
Release: 1
Summary: An implementation neutral API for creation of dynamic proxies
License: BSD
Url: http://proxytoys.github.io/
Source0: https://github.com/proxytoys/proxytoys/archive/%{githash}/%{name}-%{githash}.tar.gz
Patch0: proxytoys-1.0-tests.patch
BuildRequires: maven-local mvn(cglib:cglib) mvn(junit:junit)
BuildRequires: mvn(org.mockito:mockito-all) mvn(xpp3:xpp3)
BuildArch: noarch
%description
ProxyToys provides a collection of toys acting as factories for
creating "special" proxies such as:
* Decorators - for simple AOP-like chained method interception
* Delegates - for method invocation on a delegate object,
that might have different type
* Dispatcher proxy - single proxy instance dispatching method
calls to different object with separate types
* Echo proxy - for tracing method calls
* Failover objects - fails over to a next object in case of
exception
* Hot swapping proxy - allows implementation hiding that
can be swapped, and mutual dependencies
* Multicasting objects - for multicasting a method invocation
to multiple objects
* Null objects - for default implementations of classes that
do nothing at all
* Pool - for a pool implementation with proxied objects that
return automatically to the pool
%package example-code
Summary: ProxyToys Example Code
%description example-code
This package contains ProxyToys example code.
%package parent
Summary: ProxyToys parent POM
%description parent
ProxyToys parent POM.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{githash}
find -name '*.class' -delete
find -name '*.jar' -print -delete
%patch0 -p0
%pom_disable_module website
%pom_xpath_remove "pom:build/pom:extensions"
%pom_remove_plugin :xsite-maven-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :maven-source-plugin example-code
%pom_remove_plugin :maven-source-plugin %{name}
%pom_remove_plugin :cobertura-maven-plugin
%pom_remove_plugin :cobertura-maven-plugin %{name}
%pom_remove_plugin :maven-javadoc-plugin %{name}
%pom_remove_plugin :findbugs-maven-plugin %{name}
%pom_remove_plugin :javancss-maven-plugin %{name}
%pom_remove_plugin :jdepend-maven-plugin %{name}
%pom_remove_plugin :jxr-maven-plugin %{name}
%pom_remove_plugin :maven-pmd-plugin %{name}
%pom_xpath_remove "pom:dependency[pom:classifier='javadoc']"
%pom_change_dep cglib: :cglib
%pom_change_dep cglib: :cglib %{name}
%pom_xpath_set "pom:dependency[pom:groupId='cglib']/pom:optional" false %{name}
%pom_change_dep :xstream org.jvnet.hudson:
%pom_change_dep :xstream org.jvnet.hudson: %{name}
%pom_add_dep xpp3:xpp3:1.1.4c:test %{name}
%mvn_file :%{name} %{name}
%mvn_file :%{name}-example-code %{name}-example-code
%mvn_alias :%{name} "proxytoys:proxytoys"
%build
%mvn_build -sf -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files -f .mfiles-%{name}
%license LICENSE.txt
%files example-code -f .mfiles-%{name}-example-code
%license LICENSE.txt
%files parent -f .mfiles-%{name}-parent
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
* Thu Aug 20 2020 zhanghua <zhanghua40@huawei.com> - 1.0-1
- Package init

4
proxytoys.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: proxytoys/proxytoys
tag_pattern: "^"
seperator: "."