package init
This commit is contained in:
parent
43e856c21a
commit
2d22508e70
25
apache-commons-discovery-addosgimanifest.patch
Normal file
25
apache-commons-discovery-addosgimanifest.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
--- src/conf/MANIFEST.MF.orig 2006-11-30 00:15:55.000000000 +0100
|
||||||
|
+++ src/conf/MANIFEST.MF 2009-05-27 23:35:42.000000000 +0200
|
||||||
|
@@ -6,4 +6,22 @@ Specification-Vendor: The Apache Softwar
|
||||||
|
Implementation-Title: @package@
|
||||||
|
Implementation-Vendor: The Apache Software Foundation
|
||||||
|
Implementation-Version: @version@
|
||||||
|
+Bundle-ManifestVersion: 2
|
||||||
|
+Bundle-Name: Jakarta-Commons Discovery
|
||||||
|
+Specification-Version: 1.0
|
||||||
|
+Bundle-SymbolicName: org.apache.commons.discovery
|
||||||
|
+Bundle-Version: 0.2.0.qualifier
|
||||||
|
+Bundle-Vendor: Eclipse.org
|
||||||
|
+Bundle-Localization: plugin
|
||||||
|
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
|
||||||
|
+Export-Package: org.apache.commons.discovery,
|
||||||
|
+ org.apache.commons.discovery.ant,
|
||||||
|
+ org.apache.commons.discovery.jdk,
|
||||||
|
+ org.apache.commons.discovery.log,
|
||||||
|
+ org.apache.commons.discovery.resource,
|
||||||
|
+ org.apache.commons.discovery.resource.classes,
|
||||||
|
+ org.apache.commons.discovery.resource.names,
|
||||||
|
+ org.apache.commons.discovery.tools
|
||||||
|
+Require-Bundle: org.junit;bundle-version="[3.8.0,4.0.0)";resolution:=optional
|
||||||
|
+Import-Package: org.apache.commons.logging;version="[1.0.4,2.0.0)"
|
||||||
|
|
||||||
41
apache-commons-discovery-remove-unreliable-test.patch
Normal file
41
apache-commons-discovery-remove-unreliable-test.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From e61f06eccf6946a6dc4633fe39206d0ad427caab Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Srb <msrb@redhat.com>
|
||||||
|
Date: Wed, 7 Aug 2013 07:12:16 +0200
|
||||||
|
Subject: [PATCH] Remove unreliable test
|
||||||
|
|
||||||
|
---
|
||||||
|
.../org/apache/commons/discovery/test/TestAll.java | 20 --------------------
|
||||||
|
1 file changed, 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/test/org/apache/commons/discovery/test/TestAll.java b/src/test/org/apache/commons/discovery/test/TestAll.java
|
||||||
|
index 623a6d8..fa81585 100644
|
||||||
|
--- a/src/test/org/apache/commons/discovery/test/TestAll.java
|
||||||
|
+++ b/src/test/org/apache/commons/discovery/test/TestAll.java
|
||||||
|
@@ -291,24 +291,4 @@ public class TestAll {
|
||||||
|
assertNotNull(serviceImpl);
|
||||||
|
assertEquals(TestImpl2_1.class, serviceImpl.getClass());
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- @Test
|
||||||
|
- public void findImplementationsViaService() {
|
||||||
|
- final int expectedLogImplementations = 2;
|
||||||
|
- int actualLogImplementations = 0;
|
||||||
|
-
|
||||||
|
- Enumeration<? extends Log> logImplementations = providers(newSPInterface(Log.class,
|
||||||
|
- new Class<?>[]{ String.class },
|
||||||
|
- new Object[]{ getClass().getName() }),
|
||||||
|
- null);
|
||||||
|
-
|
||||||
|
- while (logImplementations.hasMoreElements()) {
|
||||||
|
- Log log = logImplementations.nextElement();
|
||||||
|
- assertNotNull(log);
|
||||||
|
- actualLogImplementations++;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- assertEquals(expectedLogImplementations, actualLogImplementations);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
||||||
51
apache-commons-discovery.spec
Normal file
51
apache-commons-discovery.spec
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
%global base_name discovery
|
||||||
|
%global short_name commons-%{base_name}
|
||||||
|
Name: apache-%{short_name}
|
||||||
|
Version: 0.5
|
||||||
|
Release: 1
|
||||||
|
Epoch: 2
|
||||||
|
Summary: Apache Commons Discovery
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: http://commons.apache.org/discovery
|
||||||
|
Source0: http://archive.apache.org/dist/commons/discovery/source/commons-discovery-0.5-src.tar.gz
|
||||||
|
Patch0: %{name}-addosgimanifest.patch
|
||||||
|
Patch1: %{name}-remove-unreliable-test.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: maven-local mvn(commons-logging:commons-logging) mvn(junit:junit)
|
||||||
|
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
|
||||||
|
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
|
||||||
|
%description
|
||||||
|
The Discovery component is about discovering, or finding, implementations for
|
||||||
|
pluggable interfaces. Pluggable interfaces are specified with the intent that
|
||||||
|
multiple implementations are, or will be, available to provide the service
|
||||||
|
described by the interface. Discovery provides facilities for finding and
|
||||||
|
instantiating classes, and for lifecycle management of singleton (factory)
|
||||||
|
classes.
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: API documentation for %{name}
|
||||||
|
%description javadoc
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{short_name}-%{version}-src
|
||||||
|
%patch0
|
||||||
|
%patch1 -p1
|
||||||
|
%mvn_file : %{short_name} %{name}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%mvn_build -- -Dcommons.osgi.symbolicName=org.apache.commons.discovery
|
||||||
|
|
||||||
|
%install
|
||||||
|
%mvn_install
|
||||||
|
|
||||||
|
%files -f .mfiles
|
||||||
|
%doc RELEASE-NOTES.txt
|
||||||
|
%license LICENSE.txt NOTICE.txt
|
||||||
|
|
||||||
|
%files javadoc -f .mfiles-javadoc
|
||||||
|
%license LICENSE.txt NOTICE.txt
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 13 2020 chengzihan <chengzihan2@huawei.com> - 0.5-1
|
||||||
|
- Package init
|
||||||
4
apache-commons-discovery.yaml
Normal file
4
apache-commons-discovery.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: NA
|
||||||
|
src_repo: NA
|
||||||
|
tag_prefix: NA
|
||||||
|
seperator: NA
|
||||||
BIN
commons-discovery-0.5-src.tar.gz
Normal file
BIN
commons-discovery-0.5-src.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user