Files
apache-commons-dbutils/apache-commons-dbutils.spec

88 lines
3.1 KiB
RPMSpec
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# spec file for package apache-commons-dbutils
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global base_name dbutils
%global short_name commons-%{base_name}
%global base_ver 1.8
%global pre_ver RC2
Name: apache-%{short_name}
Version: %{base_ver}~%{pre_ver}
Release: 0
Summary: Apache Commons DbUtils
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://commons.apache.org/proper/%{short_name}
Source0: https://github.com/apache/commons-dbutils/archive/refs/tags/%{short_name}-%{base_ver}-%{pre_ver}.tar.gz
BuildRequires: fdupes
BuildRequires: maven-local java-devel >= 1.8
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildArch: noarch
%description
The Commons DbUtils library is a small set of classes designed to make working
with JDBC easier. JDBC resource cleanup code is mundane, error prone work so
these classes abstract out all of the cleanup tasks from your code leaving you
with what you really wanted to do with JDBC in the first place: query and
update data.
Some of the advantages of using DbUtils are:
No possibility for resource leaks. Correct JDBC coding isnt difficult but
it is time-consuming and tedious. This often leads to connection leaks that
may be difficult to track down.
Cleaner, clearer persistence code. The amount of code needed to persist
data in a database is drastically reduced. The remaining code clearly
expresses your intention without being cluttered with resource cleanup.
Automatically populate JavaBean properties from ResultSets. You dont need
to manually copy column values into bean instances by calling setter methods.
Each row of the ResultSet can be represented by one fully populated bean
instance.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%autosetup -n %{short_name}-%{short_name}-%{base_ver}-%{pre_ver}
%pom_remove_plugin org.jacoco:jacoco-maven-plugin
%pom_remove_plugin org.eluder.coveralls:coveralls-maven-plugin
%pom_xpath_set pom:project/pom:properties/pom:maven.compiler.source 1.8
%pom_xpath_set pom:project/pom:properties/pom:maven.compiler.target 1.8
%{mvn_file} : %{name}
%build
%{mvn_build} -f -- -Dsource=8
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license {LICENSE,NOTICE}.txt
%doc {README,CONTRIBUTING}.md RELEASE-NOTES.txt
%files javadoc -f .mfiles-javadoc
%license {LICENSE,NOTICE}.txt
%changelog