Blob Blame History Raw
Name:           openprops
Version:        0.8.5
Release:        2%{?dist}
Summary:        An improved java.util.Properties from OpenJDK

Group:          Development/Libraries
License:        GPLv2 with exceptions
URL:            https://github.com/zanata/%{name}
Source0:        https://github.com/zanata/%{name}/archive/%{name}-%{version}.zip

BuildArch:      noarch

BuildRequires:  maven-local
BuildRequires:  maven-compiler-plugin
BuildRequires:  maven-install-plugin
BuildRequires:  maven-jar-plugin
BuildRequires:  maven-javadoc-plugin
BuildRequires:  maven-resources-plugin
BuildRequires:  jacoco-maven-plugin
BuildRequires:  junit

Requires:       jpackage-utils

%description
OpenProps is a tiny Java library which reads and writes .properties files
using the same code as java.util.Properties from the OpenJDK, but enhanced so
that it preserves the order of entries within the file, and it also preserves
comments in the file.
This means that a Properties editor or a file converter written to use
OpenProps won't have to lose comments or mess up the order of entries.

By using OpenJDK code, OpenProps should handle all the old corner-cases in
exactly the same way Java does.  The handling of whitespace and comments is
tested by a number of JUnit tests.  But please let me know if you find a bug!

Note the following differences from java.util.Properties:

1. preserves comments and the order of entries in the file
2. storeToXml doesn't use the Sun DTD (or any DTD) because it adds attributes
   for comments.
3. equals() and hashCode() won't work the same way as with java.util.Properties,
   because they are no longer inherited from Hashtable.
   All you get is identity equality/hashcode.

Also note that any header comment in the .properties file will be interpreted as
a comment attached to the first message.

%package javadoc
Summary:        Javadocs for %{name}
Group:          Documentation
Requires:       jpackage-utils

%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q -n %{name}-%{name}-%{version}
%pom_remove_plugin org.apache.maven.plugins:maven-gpg-plugin


%build
%mvn_build

%install
%mvn_install

%files -f .mfiles
%license COPYING.txt
%doc README.txt

%files -f .mfiles-javadoc javadoc
%license COPYING.txt


%changelog
* Tue May 29 2018 Ding-Yi Chen <dchen@redhat.com> - 0.8.5-2
- Fixed javadoc package

* Tue May 29 2018 Ding-Yi Chen <dchen@redhat.com> - 0.8.5-1
- Upstream update to 0.8.5

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Feb 11 2016 Ding-Yi Chen <dchen@redhat.com> - 0.7.1-1
- Upstream update to 0.7.1

* Wed Feb 10 2016 Ding-Yi Chen <dchen@redhat.com> - 0.7-1
- Upstream update to 0.7

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 0.6-7
- Use Requires: java-headless rebuild (#1067528)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Apr 29 2013 Patrick Huang <pahuang@redhat.com> 0.6-5
- Adapt latest java packacking guideline

* Tue Feb 19 2013 Patrcik Huang <pahuang@redhat.com> 0.6-4
- Add COPYING.txt into package and update summary and simplify file section

* Thu Feb 7 2013 Patrick Huang <pahuang@redhat.com> 0.6-3
- Update BuildRequires maven/maven-local depend on dist version

* Wed Feb 6 2013 Patrick Huang <pahuang@redhat.com> 0.6-2
- Update BuildRequires to make it work in f18 and f19

* Fri Feb 1 2013 Patrick Huang <pahuang@redhat.com> 0.6-1
- Initial RPM package