Name:           proxool
Version:        0.9.1
Release:        24
Summary:        Connection pool library for Java
License:        ASL 2.0
URL:            http://proxool.sourceforge.net/
Source0:        proxool-proxool-659fc71.tar.gz
Source1:        proxool.pom
Patch0001:      proxool-no-embedded-cglib.patch

BuildRequires:  ant >= 0:1.7.1 ant-junit java-devel >= 0:1.6.0 javapackages-local
BuildRequires:  mvn(avalon-framework:avalon-framework-api)
BuildRequires:  mvn(avalon-framework:avalon-framework-impl)
BuildRequires:  mvn(avalon-logkit:avalon-logkit) mvn(com.puppycrawl.tools:checkstyle)
BuildRequires:  mvn(commons-collections:commons-collections) mvn(net.sf.cglib:cglib)
BuildRequires:  mvn(commons-lang:commons-lang) mvn(commons-logging:commons-logging)
BuildRequires:  mvn(dom4j:dom4j) mvn(hsqldb:hsqldb:1) mvn(javax.servlet:javax.servlet-api)
BuildRequires:  mvn(javax.transaction:jta) mvn(junit:junit) mvn(log4j:log4j:1.2.17)

BuildArch:      noarch

%description
Add connection pooling to your existing JDBC driver transparently.Compliant with the J2SE API,giving you the confidence
to develop standards. You can monitor the performance of the database Connect and listen for connection events.

%package        help
Summary:        Documentation for proxool
Provides:       %{name}-javadoc = %{version}-%{release}
Obsoletes:      %{name}-javadoc < %{version}-%{release}

%description    help
This package provides documentation for proxool.

%prep
%autosetup -n proxool-proxool-659fc71 -p1
find . -type f -a -executable -exec chmod -x {} \;
rm -rf lib jarjar

sed -i.new_checkstyle "s|com.puppycrawl.tools.checkstyle.CheckStyleTask|com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask|" build.xml
sed -i.doclint "s|public="true"|public="true" additionalparam="-Xdoclint:none"|" build.xml

%mvn_file proxool:proxool proxool

%build
CLASSPATH=$(build-classpath cglib avalon-framework glassfish-servlet-api) ant build-jar javadoc

%install
%mvn_artifact %{SOURCE1} build/%{name}-%{version}.jar
%mvn_install -J build/api

%files -f .mfiles
%doc CHANGES.txt README.txt LICENCE.txt

%files help -f .mfiles-javadoc

%changelog
* Mon Feb 21 2022 wangkai <wangkai385@huawei.com> - 0.9.1-24
- Rebuild for fix log4j1.x cves

* Fri Dec 20 2019 fengbing <fengbing7@huawei.com> - 0.9.1-23
- Package init
