-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenprops.spec
92 lines (69 loc) · 2.88 KB
/
openprops.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Name: openprops
Version: 0.6
Release: 5%{?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-release-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: junit
Requires: jpackage-utils
Requires: java
%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}
%build
%mvn_build
%install
%mvn_install
%files -f .mfiles
%dir %{_javadir}/%{name}
%doc README.txt COPYING.txt
%files -f .mfiles-javadoc
%doc COPYING.txt
%changelog
* 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