diff --git a/apache-commons-discovery-addosgimanifest.patch b/apache-commons-discovery-addosgimanifest.patch new file mode 100644 index 0000000000000000000000000000000000000000..e006fa3f8287de5bbfa8078db23b8c045cbe98c4 --- /dev/null +++ b/apache-commons-discovery-addosgimanifest.patch @@ -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)" + diff --git a/apache-commons-discovery-remove-unreliable-test.patch b/apache-commons-discovery-remove-unreliable-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..3aa11d6e75297960a5dbeeb394a4a596cc39d3c9 --- /dev/null +++ b/apache-commons-discovery-remove-unreliable-test.patch @@ -0,0 +1,41 @@ +From e61f06eccf6946a6dc4633fe39206d0ad427caab Mon Sep 17 00:00:00 2001 +From: Michal Srb +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 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 + diff --git a/apache-commons-discovery.spec b/apache-commons-discovery.spec new file mode 100644 index 0000000000000000000000000000000000000000..321ceb73b888de7e8c3ca56fb216037a6017e2d3 --- /dev/null +++ b/apache-commons-discovery.spec @@ -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 - 0.5-1 +- Package init diff --git a/apache-commons-discovery.yaml b/apache-commons-discovery.yaml new file mode 100644 index 0000000000000000000000000000000000000000..00bbaf050db91e87f0ad529e5c29027a1bf150ae --- /dev/null +++ b/apache-commons-discovery.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +seperator: NA diff --git a/commons-discovery-0.5-src.tar.gz b/commons-discovery-0.5-src.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..16ff97bb9c30254414ef26bd1c6d0c0dee14fe55 Binary files /dev/null and b/commons-discovery-0.5-src.tar.gz differ