Commit 890c56fe authored by Markus Koschany's avatar Markus Koschany

Import Upstream version 2.6.0

parent 8b5d9bd6
target
site-content
/.classpath
/.project
/.settings/
/bin/
.idea/
*.iml
# 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.
language: java
sudo: false
jdk:
- openjdk7
- oraclejdk8
- oraclejdk9
script:
- mvn
after_success:
- mvn clean cobertura:cobertura coveralls:report -Ptravis-cobertura
\ No newline at end of file
<!---
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 FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
|**** DO NOT EDIT DIRECTLY ****|
|**** ****|
+======================================================================+
| TEMPLATE FILE: contributing-md-template.md |
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons:contributing-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.jira.id (required, alphabetic, upper case) |
| |
| 3) Example Properties |
| |
| <properties> |
| <commons.jira.id>MATH</commons.jira.id> |
| </properties> |
| |
+======================================================================+
--->
Contributing to Apache Commons Pool
======================
You have found a bug or you have an idea for a cool new feature? Contributing code is a great way to give something back to
the open source community. Before you dig right into the code there are a few guidelines that we need contributors to
follow so that we can have a chance of keeping on top of things.
Getting Started
---------------
+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
+ Make sure you have a [GitHub account](https://github.com/signup/free).
+ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons Pool's scope.
+ Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist.
+ Clearly describe the issue including steps to reproduce when it is a bug.
+ Make sure you fill in the earliest version that you know has the issue.
+ Find the corresponding [repository on GitHub](https://github.com/apache/?query=commons-),
[fork](https://help.github.com/articles/fork-a-repo/) and check out your forked repository.
Making Changes
--------------
+ Create a _topic branch_ for your isolated work.
* Usually you should base your branch on the `master` or `trunk` branch.
* A good topic branch name can be the JIRA bug id plus a keyword, e.g. `POOL-123-InputStream`.
* If you have submitted multiple JIRA issues, try to maintain separate branches and pull requests.
+ Make commits of logical units.
* Make sure your commit messages are meaningful and in the proper format. Your commit message should contain the key of the JIRA issue.
* e.g. `POOL-123: Close input stream earlier`
+ Respect the original code style:
+ Only use spaces for indentation.
+ Create minimal diffs - disable _On Save_ actions like _Reformat Source Code_ or _Organize Imports_. If you feel the source code should be reformatted create a separate PR for this change first.
+ Check for unnecessary whitespace with `git diff` -- check before committing.
+ Make sure you have added the necessary tests for your changes, typically in `src/test/java`.
+ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.
Making Trivial Changes
----------------------
The JIRA tickets are used to generate the changelog for the next release.
For changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
In this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.
Submitting Changes
------------------
+ Sign and submit the Apache [Contributor License Agreement][cla] if you haven't already.
* Note that small patches & typical bug fixes do not require a CLA as
clause 5 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0.html#contributions)
covers them.
+ Push your changes to a topic branch in your fork of the repository.
+ Submit a _Pull Request_ to the corresponding repository in the `apache` organization.
* Verify _Files Changed_ shows only your intended changes and does not
include additional files like `target/*.class`
+ Update your JIRA ticket and include a link to the pull request in the ticket.
If you prefer to not use GitHub, then you can instead use
`git format-patch` (or `svn diff`) and attach the patch file to the JIRA issue.
Additional Resources
--------------------
+ [Contributing patches](https://commons.apache.org/patches.html)
+ [Apache Commons Pool JIRA project page][jira]
+ [Contributor License Agreement][cla]
+ [General GitHub documentation](https://help.github.com/)
+ [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ `#apache-commons` IRC channel on `irc.freenode.net`
[cla]:https://www.apache.org/licenses/#clas
[jira]:https://issues.apache.org/jira/browse/POOL
Apache Commons Pool
Copyright 2001-2015 The Apache Software Foundation
Copyright 2001-2018 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
<!---
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 FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
|**** DO NOT EDIT DIRECTLY ****|
|**** ****|
+======================================================================+
| TEMPLATE FILE: readme-md-template.md |
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons:readme-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.componentid (required, alphabetic, lower case) |
| - commons.release.version (required) |
| |
| 3) Example Properties |
| |
| <properties> |
| <commons.componentid>math</commons.componentid> |
| <commons.release.version>1.2</commons.release.version> |
| </properties> |
| |
+======================================================================+
--->
Apache Commons Pool
===================
[![Build Status](https://travis-ci.org/apache/commons-pool.svg)](https://travis-ci.org/apache/commons-pool)
[![Coverage Status](https://coveralls.io/repos/apache/commons-pool/badge.svg)](https://coveralls.io/r/apache/commons-pool)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-pool2/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-pool2/)
[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-pool2/2.6.0.svg)](https://javadoc.io/doc/org.apache.commons/commons-pool2/2.6.0)
The Apache Commons Object Pooling Library.
Documentation
-------------
More information can be found on the [Apache Commons Pool homepage](https://commons.apache.org/proper/commons-pool).
The [Javadoc](https://commons.apache.org/proper/commons-pool/javadocs/api-release) can be browsed.
Questions related to the usage of Apache Commons Pool should be posted to the [user mailing list][ml].
Where can I get the latest release?
-----------------------------------
You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-pool/download_pool.cgi).
Alternatively you can pull it from the central Maven repositories:
```xml
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.6.0</version>
</dependency>
```
Contributing
------------
We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
There are some guidelines which will make applying PRs easier for us:
+ No tabs! Please use spaces for indentation.
+ Respect the code style.
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
License
-------
This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
See the `NOTICE.txt` file for required notices and attributions.
Donations
---------
You like Apache Commons Pool? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
Additional Resources
--------------------
+ [Apache Commons Homepage](https://commons.apache.org/)
+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/POOL)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ `#apache-commons` IRC channel on `irc.freenode.org`
[ml]:https://commons.apache.org/mail-lists.html
Apache Commons Pool 2.6.0 RELEASE NOTES
The Apache Commons Pool team is pleased to announce the release of Apache Commons Pool 2.6.0.
Apache Commons Pool provides an object-pooling API and a number of object pool implementations.
Version 2 contains a completely re-written pooling implementation compared to the 1.x series.
In addition to performance and scalability improvements, version 2 includes robust instance
tracking and pool monitoring.
- Version 2.6.0 requires Java 7 or above.
- Version 2.5.0 requires Java 7 or above.
- Version 2.0 requires 6 or above.
No client code changes are required to migrate from versions 2.0-2.3 to version 2.4.3.
Users of version 1.x should consult the migration guide on the Commons Pool web site.
NOTE: The MBean interfaces (DefaultPooledObjectInfoMBean, GenericKeyedObjectPoolMXBean
and GenericKeyedObjectPoolMXBean) exist only to define the attributes and methods
that will be made available via JMX. They must not be implemented by clients as
they are subject to change between major, minor and patch version releases of
Commons Pool. Clients that implement any of these interfaces may not, therefore,
be able to upgrade to a new minor or patch release without requiring code
changes.
This is a maintenance release.
Changes in version 2.6.0 include:
Fixed Bugs:
o POOL-337: Ensure cancelled eviction tasks are removed from scheduler. Thanks to Reinald Verheij.
o POOL-338: GenericObjectPool constructor may throw an exception under OSGi. Thanks to Michael C, Gary Gregory.
o POOL-324: org.apache.commons.pool2.impl.GenericObjectPool.getFactoryType() throws java.lang.ClassCastException. Thanks to Jay Xu, Gary Gregory.
o POOL-344: Delete repeated call startEvictor. Thanks to Yulin Wang.
Changes:
o POOL-336: GenericObjectPool's borrowObject lock if create() fails with Error. Thanks to Wolfgang Glas.
o POOL-339: Update optional library cglib from 3.2.5 to 3.2.6.
o POOL-341: Update optional library asm-util from 6.0 to 6.1.1.
o POOL-342: Update optional library asm-util from 6.1.1 to 6.2.
Note that Clirr reports one warning:
"Value of field DEFAULT_EVICTION_POLICY_CLASS_NAME is no longer a compile-time constant."
The value is initialized as "public static final String DEFAULT_EVICTION_POLICY_CLASS_NAME = DefaultEvictionPolicy.class.getName();"
The value should not change from one run to the next.
For complete information on Apache Commons Pool, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons Pool website:
http://commons.apache.org/proper/commons-pool/
-----------------------------------------------------------------------------------------------
Apache Commons Pool 2.5.0 RELEASE NOTES
The Apache Commons Pool team is pleased to announce the release of Apache Commons Pool 2.5.0.
Apache Commons Pool provides an object-pooling API and a number of object pool implementations.
Version 2 contains a completely re-written pooling implementation compared to the 1.x series.
In addition to performance and scalability improvements, version 2 includes robust instance
tracking and pool monitoring. Version 2 requires JDK level 1.6 or above.
No client code changes are required to migrate from versions 2.0-2.3 to version 2.4.3.
Users of version 1.x should consult the migration guide on the Commons Pool web site.
NOTE: The MBean interfaces (DefaultPooledObjectInfoMBean, GenericKeyedObjectPoolMXBean
and GenericKeyedObjectPoolMXBean) exist only to define the attributes and methods
that will be made available via JMX. They must not be implemented by clients as
they are subject to change between major, minor and patch version releases of
Commons Pool. Clients that implement any of these interfaces may not, therefore,
be able to upgrade to a new minor or patch release without requiring code
changes.
This is a patch release, including bug fixes only.
Changes in version 2.5.0 include:
New features:
o POOL-332: ObjectPool and KeyedObject pool should extend Closeable.
o POOL-335: Make abandoned logging stack trace requirements configurable. This also reverts
the default behavior introduced by POOL-320.
Changes:
o POOL-331: Update from Java 6 to 7.
o POOL-333: Update optional dependency asm-util from 5.2 to 6.0.
o POOL-334: org.apache.commons.pool2.impl.ThrowableCallStack.Snapshot is missing serialVersionUID.
For complete information on Apache Commons Pool, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons Pool website:
http://commons.apache.org/proper/commons-pool/
-----------------------------------------------------------------------------------------------
Apache Commons Pool 2.4.3 RELEASE NOTES
The Apache Commons Pool team is pleased to announce the release of Apache Commons Pool 2.4.3.
Apache Commons Pool provides an object-pooling API and a number of object pool implementations.
Version 2 contains a completely re-written pooling implementation compared to the 1.x series.
In addition to performance and scalability improvements, version 2 includes robust instance
tracking and pool monitoring. Version 2 requires JDK level 1.6 or above.
No client code changes are required to migrate from versions 2.0-2.3 to version 2.4.3.
Users of version 1.x should consult the migration guide on the Commons Pool web site.
NOTE: The MBean interfaces (DefaultPooledObjectInfoMBean, GenericKeyedObjectPoolMXBean
and GenericKeyedObjectPoolMXBean) exist only to define the attributes and methods
that will be made available via JMX. They must not be implemented by clients as
they are subject to change between major, minor and patch version releases of
Commons Pool. Clients that implement any of these interfaces may not, therefore,
be able to upgrade to a new minor or patch release without requiring code
changes.
Changes in version 2.4.3 include:
New features:
o POOL-320: Use more efficient stack walking mechanisms for usage tracking when possible.
Fixed Bugs:
o POOL-328: Documentation with repeated words (sources, tests, and examples). Thanks to Lorenzo Solano Martinez.
o POOL-317: Correction of default value of softMinEvictableIdleTimeMillis in BaseObjectPoolConfig. Thanks to KeiichiFujino.
o POOL-309: Fix misspellings from "destory" to "destroy". Thanks to jolestar, Roopam Patekar.
o POOL-306: Ensure BaseGenericObjectPool.IdentityWrapper#equals() follows the expected
contract for equals(). Thanks to Adrian Crum.
o POOL-303: Ensure that threads do not block indefinitely if more than maxTotal
threads try to borrow an object at the same time and the factory fails to
create any objects.
o POOL-310: Ensure that threads using GKOP do not block indefinitely if more than
maxTotal threads try to borrow objects with different keys at the same
time and the factory destroys objects on return. Thanks to Ivan Iliev.
o Ensure that any class name used for evictionPolicyClassName represents a
class that implements EvictionPolicy.
o POOL-315: Add a configurable delay (default 10 seconds) to wait when shutting down
an Evictor to allow the associated thread time to complete and current
evictions and to terminate. Thanks to KeiichiFujino.
o Ensure that a call to GKOP preparePool() takes account of other threads
that might create objects concurrently, particularly the Evictor.
Changes:
o POOL-280: Small refactoring of borrowObject() to reduce code duplication. Thanks to Jacopo Cappellato.
o POOL-307: Replace inefficient use of keySet with entrySet in GKOP. Thanks to Anthony Whitford.
o POOL-322: Update optional cglib library from 3.1 to 3.2.5.
o POOL-323: Update optional OW2 ASM from 5.0.4 to 5.2.
For complete information on Apache Commons Pool, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Commons Pool website:
http://commons.apache.org/proper/commons-pool/
-----------------------------------------------------------------------------------------------
Apache Commons Pool 2.4.2 RELEASE NOTES
The Apache Commons Pool team is pleased to announce the release of Apache Commons Pool 2.4.2.
......
# 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.
##########################################################################
# Sample Ant build.properties file
#
# This setup assumes dependent jars are in a local maven 2 repository.
# However the jars are located, the properties ending in ".jar" need to
# expand to full paths to the jars.
##########################################################################
# Repository base path
repository=${user.home}/.m2/repository
# cglib
cglib.home=${repository}/cglib/cglib/3.1
cglib.jar=${cglib.home}/cglib-3.1.jar
# asm-util
asm-util.home=${repository}/org/ow2/asm/asm-util/5.0.4
asm-util.jar=${asm-util.home}/asm-util-5.0.4.jar
# asm-tree
asm-tree.home=${repository}/org/ow2/asm/asm-tree/5.0.4
asm-tree.jar=${asm-tree.home}/asm-tree-5.0.4.jar
# asm
asm.home=${repository}/org/ow2/asm/asm/5.0.4
asm.jar=${asm.home}/asm-5.0.4.jar
# JUnit
junit.home=${repository}/junit/junit/4.12
junit.jar=${junit.home}/junit-4.12.jar
hamcrest.jar=${repository}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
# Maven-generated jar to validate in test-jar target
pool.jar=./target/commons-pool2-2.4.2-SNAPSHOT.jar
<!--
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.
-->
<!-- $Id: build.xml 1693165 2015-07-28 22:13:14Z psteitz $ -->
<project name="commons-pool" default="test" basedir=".">
<target name="init">
<tstamp/>
<!-- read properties from the build.properties, if any -->
<property name="component-propfile" value="${basedir}/build.properties"/>
<property file="${component-propfile}"/>
<!-- read properties from the commons build.properties, if any -->
<property name="commons-propfile" value="${basedir}/../build.properties"/>
<property file="${commons-propfile}"/>
<!-- read properties from the ${user.home}/propfile, if any -->
<property name="user-propfile" value="${user.home}/build.properties"/>
<property file="${user-propfile}"/>
<!-- command line classpath, if any -->
<property name="cp" value=""/>
<!-- now combine the classpaths -->
<property name="classpath"
value="${cp}:${cglib.jar}:${asm.jar}:${asm-util.jar}:${asm-tree.jar}:${junit.jar}:${hamcrest.jar}"/>
<property name="name" value="commons-pool2"/>
<property name="title" value="Apache Commons Object Pooling Package"/>
<property name="version" value="2.4.2"/>
<property name="package" value="org.apache.commons.pool2.*"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="src.java.dir" value="${src.dir}/main/java"/>
<property name="src.test.dir" value="${src.dir}/test/java"/>
<property name="src.testresources.dir" value="${src.dir}/test/resources"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<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}-${version}.jar"/>
<property name="test.failonerror" value="true" />
<property name="javadoc.dir" value="${dist.dir}/docs/api"/>
<property name="javadoc.bottom" value="&lt;small&gt;Copyright &amp;copy; 2001-2014 Apache Software Foundation. Documenation generated ${TODAY}&lt;/small&gt;."/>
<property name="javadoc.overview" value="${src.java.dir}/org/apache/commons/pool2/overview.html" />
<property name="javac.optimize" value="false"/>
<property name="javac.debug" value="true"/>
<property name="javac.deprecation" value="true"/>
<property name="javac.target.version" value="1.6"/>
<property name="javac.src.version" value="1.6"/>
</target>
<!-- ######################################################### -->
<target name="clean" depends="init" description="removes generated files">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="javadoc" depends="init" description="generates javadocs">
<mkdir dir="${javadoc.dir}"/>
<javadoc packagenames="org.*"
sourcepath="${src.java.dir}"
classpath="${classpath}"
destdir="${javadoc.dir}"
windowtitle="${title}"
doctitle="${title}"
bottom="${javadoc.bottom}"
overview="${javadoc.overview}"
public="true"
version="true"
author="true"
splitindex="false"
nodeprecated="true"
nodeprecatedlist="true"
notree="true"
noindex="false"
nohelp="true"
nonavbar="false"
serialwarn="false"
source="${javac.src.version}">
<link href="http://docs.oracle.com/javase/6/docs/api/"/>
</javadoc>
</target>
<!-- ######################################################### -->
<target name="compile" depends="init" description="compiles source files">
<mkdir dir="${build.classes.dir}"/>
<javac destdir="${build.classes.dir}"
srcdir="${src.java.dir}"
classpath="${classpath}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
optimize="${javac.optimize}"
target="${javac.target.version}"
source="${javac.src.version}"/>
</target>
<target name="compile-test" depends="compile">
<mkdir dir="${build.test-classes.dir}"/>
<javac destdir="${build.test-classes.dir}"
srcdir="${src.test.dir}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
optimize="${javac.optimize}"
target="${javac.target.version}"
source="${javac.src.version}">
<classpath>
<pathelement location="${build.classes.dir}" />
<pathelement location="${build.test-classes.dir}" />
<pathelement path="${classpath}" />
</classpath>
</javac>
</target>
<target name="test" depends="compile-test" description="runs (junit) unit tests">
<echo message="Because we need to sleep to test the eviction threads, this takes a little while (around 2 minutes)..."/>
<junit printsummary="true" showoutput="true" fork="yes" haltonerror="${test.failonerror}">
<classpath>
<pathelement location="${build.classes.dir}" />
<pathelement location="${build.test-classes.dir}" />
<pathelement path="${classpath}" />
<pathelement location="${src.testresources.dir}" />
</classpath>
<!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
<test name="${test.entry}" if="test.entry"/>
<batchtest todir="${build.dir}/ant-reports" unless="test.entry">
<fileset dir="${src.test.dir}">
<include name="**/Test*.java"/>
<exclude name="org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java"/>
<!-- abstract classes -->
<exclude name="**/TestObjectPool.java"/>
<exclude name="**/TestObjectPoolFactory.java"/>
<exclude name="**/TestKeyedObjectPool.java"/>
<exclude name="**/TestKeyedObjectPoolFactory.java"/>
</fileset>
<formatter type="plain" usefile="false"/>
</batchtest>
</junit>
</target>
<target name="test-jar" depends="compile-test" description="runs (junit) unit tests">
<echo message="Because we need to sleep to test the eviction threads, this takes a little while (around 2 minutes)..."/>
<junit printsummary="true" showoutput="true" fork="yes" haltonerror="${test.failonerror}">
<classpath>
<pathelement location="${build.test-classes.dir}" />
<pathelement path="${classpath}:${pool.jar}" />
<pathelement location="${src.testresources.dir}" />
</classpath>
<!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
<test name="${test.entry}" if="test.entry"/>
<batchtest todir="${build.dir}/ant-reports" unless="test.entry">
<fileset dir="${src.test.dir}">
<include name="**/Test*.java"/>
<exclude name="org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java"/>
<!-- abstract classes -->
<exclude name="**/TestObjectPool.java"/>
<exclude name="**/TestObjectPoolFactory.java"/>
<exclude name="**/TestKeyedObjectPool.java"/>
<exclude name="**/TestKeyedObjectPoolFactory.java"/>
</fileset>
<formatter type="plain" usefile="false"/>
</batchtest>
</junit>
</target>
<target name="build-jar" depends="compile">
<mkdir dir="${dist.dir}"/>
<jar jarfile="${dist.jar}">
<fileset dir="${build.classes.dir}"/>
<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">
<copy todir="${dist.dir}" file="${basedir}/LICENSE.txt"/>
<copy todir="${dist.dir}" file="${basedir}/NOTICE.txt"/>
<copy todir="${dist.dir}" file="${basedir}/README.txt"/>
</target>
<target name="dist" depends="build" description="gump target"/>
</project>
......@@ -27,11 +27,6 @@
<property name="localeLanguage" value="en"/>
<!-- Verify that EVERY source file has the appropriate license -->
<module name="Header">
<property name="headerFile" value="${checkstyle.header.file}"/>
</module>
<!-- No tabs allowed! -->
<module name="FileTabCharacter"/>
......
<?xml version="1.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,