update to 1.6 [release 1.6-1mamba;Fri Aug 26 2022]

This commit is contained in:
Silvan Calarco 2024-01-05 20:28:07 +01:00
parent e2df21a0ec
commit 46516c2507
5 changed files with 15 additions and 508 deletions

View File

@ -1,58 +0,0 @@
--- build.xml 2010-09-05 21:20:34.000000000 +0200
+++ build.xml-gil 2011-02-28 00:29:13.000000000 +0100
@@ -51,6 +51,7 @@
<property name="build.test-classes.dir" value="${build.dir}/test-classes"/>
<property name="dist.dir" value="${basedir}/dist"/>
<property name="dist.jar" value="${dist.dir}/${name}.jar"/>
+ <property name="j2se.api" value="http://java.sun.com/j2se/1.4.2/docs/api"/>
<property name="test.failonerror" value="true" />
@@ -94,7 +95,7 @@
nonavbar="false"
serialwarn="false"
source="${javac.src.version}">
- <link href="http://java.sun.com/j2se/1.4.2/docs/api"/>
+ <link href="${j2se.api}"/>
</javadoc>
</target>
@@ -155,25 +156,23 @@
<target name="build-jar" depends="compile">
<mkdir dir="${dist.dir}"/>
- <jar jarfile="${dist.jar}">
- <fileset dir="${build.classes.dir}"/>
+ <jar jarfile="${dist.jar}"
+ compress="true"
+ index="false"
+ manifest="${build.classes.dir}/META-INF/MANIFEST.MF"
+ excludes="**/*.html">
+ <fileset dir="${build.classes.dir}">
+ <include name="org/apache/commons/pool/**"/>
+ <include name="META-INF/LICENSE.txt"/>
+ <include name="META-INF/NOTICE.txt"/>
+ <include name="META-INF/maven/commons-pool/commons-pool/pom.properties"/>
+ <include name="META-INF/maven/commons-pool/commons-pool/pom.xml"/>
+ </fileset>
<metainf dir="${basedir}" includes="LICENSE.txt,NOTICE.txt"/>
- <manifest>
- <attribute name="Built-By" value="${user.name}"/>
- <attribute name="Package" value="${package}"/>
- <attribute name="Extension-Name" value="${name}"/>
- <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
- <attribute name="Specification-Title" value="${title}"/>
- <attribute name="Implementation-Version" value="${version}"/>
- <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
- <attribute name="X-Compile-Source-JDK" value="${javac.src.version}"/>
- <attribute name="X-Compile-Target-JDK" value="${javac.target.version}"/>
-
- </manifest>
</jar>
</target>
- <target name="build" depends="clean,build-jar,javadoc">
+ <target name="build" depends="build-jar,javadoc">
<copy todir="${dist.dir}" file="${basedir}/LICENSE.txt"/>
<copy todir="${dist.dir}" file="${basedir}/NOTICE.txt"/>
<copy todir="${dist.dir}" file="${basedir}/README.txt"/>

View File

@ -1,44 +1,19 @@
%define maven 0
%if %maven
%define target_dir target
%define api_dir %target_dir/site/apidocs
%else
%define target_dir dist
%define api_dir %target_dir/docs/api
%endif
Name: apache-commons-pool Name: apache-commons-pool
Version: 1.5.5 Version: 1.6
Release: 1mamba Release: 1mamba
Summary: Jakarta Commons Pool Package Summary: Jakarta Commons Pool Package
Group: Development/Libraries/Java Group: Development/Libraries/Java
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: gil <puntogil@libero.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://commons.apache.org/pool/ URL: https://commons.apache.org/proper/commons-pool/
Source0: http://www.apache.org/dist/jakarta/commons/pool/source/commons-pool-%{version}-src.tar.gz Source0: https://archive.apache.org/dist/commons/pool/binaries/commons-pool-%{version}-bin.tar.gz
Source1: maven2-2.2.0-settings.xml
Source2: commons-pool-1.5.5-autogeneratedfiles.tar.gz
Source3: jakarta-commons-pool-1.3-tomcat5-build.xml
Patch0: jakarta-commons-pool-1.3-build.patch
Patch1: apache-commons-pool-1.5.5-build_xml.patch
License: Apache Software License 2.0 License: Apache Software License 2.0
BuildRequires: apache-ant ## AUTOBUILDREQ-BEGIN
%if %maven ## AUTOBUILDREQ-END
BuildRequires: apache-maven2 BuildRequires: javapackages
BuildRequires: apache-maven2-ant-plugin Requires: javapackages
BuildRequires: apache-maven2-compiler-plugin Obsoletes: apache-commons-pool-tomcat5 < 1.6
BuildRequires: apache-maven2-install-plugin
BuildRequires: apache-maven2-jar-plugin
BuildRequires: apache-maven2-javadoc-plugin
BuildRequires: apache-maven2-source-plugin
#BuildRequires: felix maven-bundle-plugin
%endif
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRequires: java-openjdk
BuildRequires: java-openjdk-javadoc
Obsoletes: apache-commons-pool-tomcat5
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
Pool provides an Object-pooling API, with three major aspects: Pool provides an Object-pooling API, with three major aspects:
@ -48,85 +23,18 @@ Pool provides an Object-pooling API, with three major aspects:
2. A toolkit for creating modular object pools. 2. A toolkit for creating modular object pools.
3. Several general purpose pool implementations. 3. Several general purpose pool implementations.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
Jakarta Commons Pool Package.
This package contains javadoc for %{name}
%prep %prep
%setup -q -n commons-pool-%{version}
%setup -q -n commons-pool-%{version}-src
for j in $(find . -name "*.jar"); do
rm -rf $j
done
for c in $(find . -name "*.class"); do
rm -rf $c
done
%if %maven
cp %{SOURCE1} settings.xml
mkdir -p .m2/repository/JPP/maven2
sed -i -e "s|<localRepository>__INTERNAL_REPO_PLACEHOLDER__</localRepository>|<localRepository>file://`pwd`/external_repo</localRepository>|g" settings.xml
sed -i -e "s|<url>__EXTERNAL_REPOPLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
%else
tar -xf %{SOURCE2}
%patch1 -p0
#%patch
#cp %{S:3} tomcat5-build.xml
%endif
%build %build
export JAVA_HOME=/usr/lib/jvm/java
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
%if %maven
mkdir external_repo
ln -s %{_javadir} external_repo/JPP
mvn-jpp \
-e \
-s $(pwd)/settings.xml \
-Dmaven.test.failure.ignore=true \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
ant:ant org.apache.felix:maven-bundle-plugin:ant install javadoc:javadoc
%else
mkdir ./tmp
export CLASSPATH=$(build-classpath junit ant)
ant -Dname=commons-pool-%{version} -Dj2se.api=%{_javadocdir}/java dist test
# export CLASSPATH=$CLASSPATH
# ant -f tomcat5-build.xml
%endif
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}/pool mkdir -p %{buildroot}%{_javadir}/pool
install -p -m 644 %target_dir/commons-pool-%{version}.jar \ install -p -m 644 commons-pool-%{version}.jar \
%{buildroot}%{_javadir}/pool/%{name}-%{version}.jar %{buildroot}%{_javadir}/pool/%{name}-%{version}.jar
#install -p -m 644 pool-tomcat5/commons-pool-tomcat5.jar \
# %{buildroot}%{_javadir}/pool/%{name}-tomcat5-%{version}.jar
mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.pool-commons-pool.pom
%add_to_maven_depmap org.apache.commons commons-pool %{version} JPP/pool commons-pool
%add_to_maven_depmap commons-pool commons-pool %{version} JPP/pool commons-pool
( (
cd %{buildroot}%{_javadir}/pool cd %{buildroot}%{_javadir}/pool
for jar in *-%{version}*; do for jar in *-%{version}*; do
@ -141,37 +49,21 @@ install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.pool-commons-poo
done done
) )
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr %api_dir/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
#%{_bindir}/aot-compile-rpm
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_javadir}/pool/apache-commons-pool-%{version}.jar %{_javadir}/pool/apache-commons-pool-%{version}.jar
%{_javadir}/pool/apache-commons-pool.jar %{_javadir}/pool/apache-commons-pool.jar
%{_javadir}/pool/commons-pool-%{version}.jar %{_javadir}/pool/commons-pool-%{version}.jar
%{_javadir}/pool/commons-pool.jar %{_javadir}/pool/commons-pool.jar
%{_datadir}/maven2/poms %doc LICENSE.txt
%{_mavendepmapfragdir}
%doc LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog %changelog
* Fri Aug 26 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6-1mamba
- update to 1.6
* Sun Feb 27 2011 gil <puntogil@libero.it> 1.5.5-1mamba * Sun Feb 27 2011 gil <puntogil@libero.it> 1.5.5-1mamba
- update to 1.5.5 - update to 1.5.5

View File

@ -1,11 +0,0 @@
--- build.xml.orig 2006-09-25 15:20:08.000000000 -0400
+++ build.xml 2006-09-25 15:20:27.000000000 -0400
@@ -93,7 +93,7 @@
nonavbar="false"
serialwarn="false"
source="1.3">
- <link href="http://java.sun.com/j2se/1.3/docs/api"/>
+ <link href="file:///usr/share/javadoc/java"/>
</javadoc>
</target>

View File

@ -1,71 +0,0 @@
<!-- $Id: pool-tomcat5-build.xml,v 1.1 2007/03/08 19:04:41 mwringe Exp $ -->
<project name="commons-pool-tomcat5" default="build" basedir=".">
<property name="tomcat-pool.home" value="pool-tomcat5"/>
<property name="commons-pool.home" value="."/>
<property name="tomcat-pool.jar" value="commons-pool-tomcat5.jar"/>
<!-- Java Options -->
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.source" value="1.4"/>
<target name="clean">
<delete dir="${tomcat-pool.home}"/>
</target>
<target name="build">
<copy todir="${tomcat-pool.home}">
<!-- <fileset dir="${commons-collections.home}" >
<include name="**/collections/CursorableLinkedList.java" />
<include name="**/collections/KeyValue.java" />
<include name="**/collections/LRUMap.java" />
<include name="**/collections/SequencedHashMap.java" />
</fileset> -->
<fileset dir="${commons-pool.home}">
<include name="**/*.java" />
<exclude name="**/Stack*.java" />
<exclude name="**/SoftReferenceObjectPool.java" />
<exclude name="**/test/**" />
</fileset>
<!-- <fileset dir="${commons-dbcp.home}">
<include name="**/*.java" />
<exclude name="**/test/**" />
<exclude name="${tomcat-dbcp.home}/**"/>
</fileset> -->
</copy>
<replace dir="${tomcat-pool.home}/src/java/org/apache/commons">
<replacefilter token="return UnmodifiableList.decorate(l);"
value="return l;" />
<replacefilter token="import org.apache.commons.collections.list.UnmodifiableList;"
value=" " />
</replace>
<replace dir="${tomcat-pool.home}/src/java/org/apache/commons" >
<replacefilter token="org.apache.commons"
value="org.apache.tomcat.dbcp" />
</replace>
<mkdir dir="${tomcat-pool.home}/src/java/org/apache/tomcat/dbcp" />
<move todir="${tomcat-pool.home}/src/java/org/apache/tomcat/dbcp">
<fileset dir="${tomcat-pool.home}/src/java/org/apache/commons" />
</move>
<mkdir dir="${tomcat-pool.home}/classes"/>
<javac destdir="${tomcat-pool.home}/classes"
optimize="off"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
sourcepath="${tomcat-pool.home}/src/java"
srcdir="${tomcat-pool.home}/src/java" >
<include name="**" />
</javac>
<jar destfile="${tomcat-pool.home}/${tomcat-pool.jar}"
index="true">
<fileset dir="${tomcat-pool.home}/classes">
<include name="**/*.class" />
<include name="**/*.properties" />
</fileset>
</jar>
</target>
</project>

View File

@ -1,245 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
| This is the configuration file for Maven. It can be specified at two levels:
|
| 1. User Level. This settings.xml file provides configuration for a single user,
| and is normally provided in $HOME/.m2/settings.xml.
|
| NOTE: This location can be overridden with the system property:
|
| -Dorg.apache.maven.user-settings=/path/to/user/settings.xml
|
| 2. Global Level. This settings.xml file provides configuration for all maven
| users on a machine (assuming they're all using the same maven
| installation). It's normally provided in
| ${maven.home}/conf/settings.xml.
|
| NOTE: This location can be overridden with the system property:
|
| -Dorg.apache.maven.global-settings=/path/to/global/settings.xml
|
| The sections in this sample file are intended to give you a running start at
| getting the most out of your Maven installation. Where appropriate, the default
| values (values used when the setting is not specified) are provided.
|
|-->
<settings xmlns="http://maven.apache.org/settings/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository-->
<localRepository>__INTERNAL_REPO_PLACEHOLDER__</localRepository>
<!-- interactiveMode
| This will determine whether maven prompts you when it needs input. If set to false,
| maven will use a sensible default value, perhaps based on some other setting, for
| the parameter in question.
|
| Default: true
<interactiveMode>true</interactiveMode>
-->
<!-- offline
| Determines whether maven should attempt to connect to the network when executing a build.
| This will have an effect on artifact downloads, artifact deployment, and others.
|
| Default: false
<offline>false</offline>
-->
<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
| specification in this list marked as active will be used.
|-->
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>
<!-- servers
| This is a list of authentication profiles, keyed by the server-id used within the system.
| Authentication profiles can be used whenever maven must make a connection to a remote server.
|-->
<servers>
<!-- server
| Specifies the authentication information to use when connecting to a particular server, identified by
| a unique name within the system (referred to by the 'id' attribute below).
|
| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
| used together.
|
<server>
<id>deploymentRepo</id>
<username>repouser</username>
<password>repopwd</password>
</server>
-->
<!-- Another sample, using keys to authenticate.
<server>
<id>siteServer</id>
<privateKey>/path/to/private/key</privateKey>
<passphrase>optional; leave empty if not used.</passphrase>
</server>
-->
</servers>
<!-- mirrors
| This is a list of mirrors to be used in downloading artifacts from remote repositories.
|
| It works like this: a POM may declare a repository to use in resolving certain artifacts.
| However, this repository may have problems with heavy traffic at times, so people have mirrored
| it to several places.
|
| That repository definition will have a unique id, so we can create a mirror reference for that
| repository, to be used as an alternate download site. The mirror site will be the preferred
| server for that repository.
|-->
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
-->
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>__EXTERNAL_REPO_PLACEHOLDER__</url>
</mirror>
</mirrors>
<!-- profiles
| This is a list of profiles which can be activated in a variety of ways, and which can modify
| the build process. Profiles provided in the settings.xml are intended to provide local machine-
| specific paths and repository locations which allow the build to work in the local environment.
|
| For example, if you have an integration testing plugin - like cactus - that needs to know where
| your Tomcat instance is installed, you can provide a variable here such that the variable is
| dereferenced during the build process to configure the cactus plugin.
|
| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
| section of this document (settings.xml) - will be discussed later. Another way essentially
| relies on the detection of a system property, either matching a particular value for the property,
| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
| Finally, the list of active profiles can be specified directly from the command line.
|
| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
| repositories, plugin repositories, and free-form properties to be used as configuration
| variables for plugins in the POM.
|
|-->
<profiles>
<!-- profile
| Specifies a set of introductions to the build process, to be activated using one or more of the
| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
| or the command line, profiles have to have an ID that is unique.
|
| An encouraged best practice for profile identification is to use a consistent naming convention
| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
| This will make it more intuitive to understand what the set of introduced profiles is attempting
| to accomplish, particularly when you only have a list of profile id's for debug.
|
| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
<profile>
<id>jdk-1.4</id>
<activation>
<jdk>1.4</jdk>
</activation>
<repositories>
<repository>
<id>jdk14</id>
<name>Repository for JDK 1.4 builds</name>
<url>http://www.myhost.com/maven/jdk14</url>
<layout>default</layout>
<snapshotPolicy>always</snapshotPolicy>
</repository>
</repositories>
</profile>
-->
<!--
| Here is another profile, activated by the system property 'target-env' with a value of 'dev',
| which provides a specific path to the Tomcat instance. To use this, your plugin configuration
| might hypothetically look like:
|
| ...
| <plugin>
| <groupId>org.myco.myplugins</groupId>
| <artifactId>myplugin</artifactId>
|
| <configuration>
| <tomcatLocation>${tomcatPath}</tomcatLocation>
| </configuration>
| </plugin>
| ...
|
| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
| anything, you could just leave off the <value/> inside the activation-property.
|
<profile>
<id>env-dev</id>
<activation>
<property>
<name>target-env</name>
<value>dev</value>
</property>
</activation>
<properties>
<tomcatPath>/path/to/tomcat/instance</tomcatPath>
</properties>
</profile>
-->
</profiles>
<!-- activeProfiles
| List of profiles that are active for all builds.
|
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
-->
</settings>