%global githash 4820aae4183d28c1c14bfdca8255cb4a414d2803
Name: jsontools
Version: 1.7
Release: 1%{?dist}
Summary: Java Tools for the JSON Format
License: LGPLv2+
#URL: http://sourceforge.net/projects/jsontools.berlios/
URL: https://github.com/bfrancojr/Java-JSON-Tools
Source0: https://github.com/bfrancojr/Java-JSON-Tools/archive/%{githash}/Java-JSON-Tools-%{githash}.tar.gz
BuildRequires: maven-local
BuildRequires: mvn(antlr:antlr)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(log4j:log4j:1.2.17)
BuildRequires: mvn(org.codehaus.mojo:antlr-maven-plugin)
BuildArch: noarch
%description
Java Tools for the JSON Format. It consists of the core
which is relatively independent on third party jars and
optional parts which might introduce transitive dependencies.
%package core
Summary: Java JSON Tools - Core
%description core
Java JSON Tools core library.
%package log4j
Summary: Java JSON Tools - Log4J
Requires: mvn(log4j:log4j:1.2.17)
%description log4j
Java JSON Tools Log4J library.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n Java-JSON-Tools-%{githash}
%pom_remove_plugin :maven-antlr-plugin %{name}-core
%pom_add_plugin org.codehaus.mojo:antlr-maven-plugin %{name}-core "
json.g
generate
"
%pom_xpath_set "pom:project/pom:version" %{version}
%pom_xpath_set "pom:project/pom:version" %{version} %{name}-log4j
%pom_change_dep :log4j ::1.2.17 %{name}-log4j
%pom_change_dep :%{name}-core ::%{version} %{name}-log4j
%mvn_file :%{name}-core %{name}-core
%mvn_file :%{name}-log4j %{name}-log4j
%build
%mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files -f .mfiles-%{name}
%doc README
%license %{name}-core/LICENSE.txt
%files core -f .mfiles-%{name}-core
%license %{name}-core/LICENSE.txt
%files log4j -f .mfiles-%{name}-log4j
%license %{name}-log4j/LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license %{name}-core/LICENSE.txt
%changelog
* Mon Mar 16 2015 gil cattaneo 1.7-1
- initial rpm