Name: json-path
Version: 2.1.0
Release: 7%{?dist}
Summary: Java JsonPath implementation
# Some files in src/main/java/com/jayway/jsonassert/impl/matcher/ are licensed under BSD
License: ASL 2.0 and BSD
URL: https://github.com/jayway/JsonPath
Source0: https://github.com/jayway/JsonPath/archive/%{name}-%{version}.tar.gz
# Too many unavailable plugins for use gradle
Source1: http://central.maven.org/maven2/com/jayway/jsonpath/json-path/%{version}/json-path-%{version}.pom
Source2: http://central.maven.org/maven2/com/jayway/jsonpath/json-path-assert/%{version}/json-path-assert-%{version}.pom
# Remove json.org support
Patch0: %{name}-2.1.0-JsonOrg.patch
BuildRequires: maven-local
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind)
BuildRequires: mvn(com.google.code.gson:gson)
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(net.minidev:json-smart)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.assertj:assertj-core)
BuildRequires: mvn(org.hamcrest:hamcrest-library)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildArch: noarch
%description
Java DSL for reading and testing JSON documents.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n JsonPath-%{name}-%{version}
find -type f -name *.jar -print -delete
find -type f -name *.class -print -delete
cp -p %{SOURCE1} %{name}/pom.xml
cp -p %{SOURCE2} %{name}-assert/pom.xml
%patch0 -p1
rm -rf %{name}/src/main/java/com/jayway/jsonpath/spi/json/JsonOrg*.java \
%{name}/src/main/java/com/jayway/jsonpath/spi/mapper/JsonOrg*.java \
%{name}/src/test/java/com/jayway/jsonpath/JsonOrg*.java
%pom_remove_dep org.json:json %{name}
# This is a dummy POM added just to ease building in the RPM platforms
cat > pom.xml << EOF
4.0.0
com.jayway.jsonpath
%{name}-parent
%{version}
pom
Java JsonPath implementation
%{name}
%{name}-assert
EOF
# Add OSGi support
for p in %{name} %{name}-assert ;do
%pom_xpath_inject "pom:project" "bundle" ${p}
%pom_add_plugin "org.apache.maven.plugins:maven-jar-plugin:2.4" ${p} "
true
"
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 ${p} '
true
${project.groupId}.${project.artifactId}
${project.name}
${project.version}
bundle-manifest
process-classes
manifest
'
done
# Fix test deps
%pom_add_dep junit:junit:4.12:test %{name}
%pom_add_dep org.assertj:assertj-core:2.1.0:test %{name}
%pom_add_dep org.hamcrest:hamcrest-library:1.3:test %{name}
%pom_add_dep junit:junit:4.12:test %{name}-assert
# fix non ASCII chars
for s in %{name}/src/test/java/com/jayway/jsonpath/old/internal/ScanPathTokenTest.java;do
native2ascii -encoding UTF8 ${s} ${s}
done
%mvn_file :%{name} %{name}
%mvn_file :%{name}-assert %{name}-assert
%mvn_package :%{name}-parent __noinstall
%build
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files -f .mfiles
%doc README.md
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Thu Jul 25 2019 Fedora Release Engineering - 2.1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering - 2.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering - 2.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering - 2.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering - 2.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Jun 08 2016 gil cattaneo 2.1.0-1
- update to 2.1.0
* Thu Feb 04 2016 Fedora Release Engineering - 0.9.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Oct 17 2015 gil cattaneo 0.9.1-7
- rebuild with json-smart 1.3.2
* Wed Jun 17 2015 Fedora Release Engineering - 0.9.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Mar 13 2015 gil cattaneo 0.9.1-5
- fix Url tag
* Mon Feb 09 2015 gil cattaneo 0.9.1-4
- introduce license macro
* Thu Jun 12 2014 gil cattaneo 0.9.1-3
- fix license issues during review
* Thu Jun 12 2014 gil cattaneo 0.9.1-2
- disable failed tests on java 8
* Thu Jun 12 2014 gil cattaneo 0.9.1-1
- initial rpm