[openprops] initial commit

Patrick Huang pahuang at fedoraproject.org
Thu Feb 21 00:45:32 UTC 2013


commit 1cb5e846bf96d945badfa0425f85f2612435d8a1
Author: Patrick Huang <pahuang at redhat.com>
Date:   Wed Feb 20 19:45:15 2013 -0500

    initial commit

 .gitignore     |    1 +
 openprops.spec |  107 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources        |    1 +
 3 files changed, 109 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f727dec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/openprops-0.6.zip
diff --git a/openprops.spec b/openprops.spec
new file mode 100644
index 0000000..8674208
--- /dev/null
+++ b/openprops.spec
@@ -0,0 +1,107 @@
+Name:           openprops
+Version:        0.6
+Release:        4%{?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:  jpackage-utils
+
+BuildRequires:  java-devel
+
+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-rpmbuild package javadoc:aggregate
+
+%install
+
+mkdir -p $RPM_BUILD_ROOT%{_javadir}
+cp -p target/%{name}*.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+
+mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -rp target/site/apidocs $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml  \
+        $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
+
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
+%check
+mvn-rpmbuild verify
+
+%files -f .mfiles
+%doc README.txt COPYING.txt
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc COPYING.txt
+
+
+%changelog
+* Tue Feb 19 2013 Patrcik Huang <pahuang at redhat.com> 0.6-4
+- Add COPYING.txt into package and update summary and simplify file section
+
+* Thu Feb 7 2013 Patrick Huang <pahuang at redhat.com> 0.6-3
+- Update BuildRequires maven/maven-local depend on dist version
+
+* Wed Feb 6 2013 Patrick Huang <pahuang at redhat.com> 0.6-2
+- Update BuildRequires to make it work in f18 and f19
+
+* Fri Feb 1 2013 Patrick Huang <pahuang at redhat.com> 0.6-1
+- Initial RPM package
diff --git a/sources b/sources
index e69de29..352731c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+76b2132d4e5757a507473f6b8688928f  openprops-0.6.zip


More information about the scm-commits mailing list