Name:                jackson-databind
Version:             2.9.8
Release:             1
Summary:             General data-binding package for Jackson (2.x)
License:             ASL 2.0 and LGPLv2+
URL:                 https://github.com/FasterXML/jackson-databind/
Source0:             https://github.com/FasterXML/jackson-databind/archive/%{name}-%{version}.tar.gz
BuildRequires:       maven-local mvn(com.fasterxml.jackson.core:jackson-annotations) >= %{version}
BuildRequires:       mvn(com.fasterxml.jackson.core:jackson-core) >= %{version}
BuildRequires:       mvn(com.fasterxml.jackson:jackson-base:pom:) >= %{version}
BuildRequires:       mvn(com.google.code.maven-replacer-plugin:replacer)
BuildRequires:       mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:       mvn(org.powermock:powermock-api-mockito)
BuildRequires:       mvn(org.powermock:powermock-module-junit4)
BuildArch:           noarch
%description
The general-purpose data-binding functionality and tree-model for Jackson Data
Processor. It builds on core streaming parser/generator package, and uses
Jackson Annotations for configuration.

%package javadoc
Summary:             Javadoc for %{name}
%description javadoc
This package contains API documentation for %{name}.

%prep
%setup -q -n %{name}-%{name}-%{version}
# Remove plugins unnecessary for RPM builds
%pom_remove_plugin ":maven-enforcer-plugin"
cp -p src/main/resources/META-INF/LICENSE .
cp -p src/main/resources/META-INF/NOTICE .
sed -i 's/\r//' LICENSE NOTICE
# unavailable test deps
%pom_remove_dep javax.measure:jsr-275
rm src/test/java/com/fasterxml/jackson/databind/introspect/NoClassDefFoundWorkaroundTest.java
%pom_xpath_remove pom:classpathDependencyExcludes
# org.powermock.reflect.exceptions.FieldNotFoundException: Field 'fTestClass' was not found in class org.junit.internal.runners.MethodValidator.
rm src/test/java/com/fasterxml/jackson/databind/type/TestTypeFactoryWithClassLoader.java
# Off test that require connection with the web
rm src/test/java/com/fasterxml/jackson/databind/ser/jdk/JDKTypeSerializationTest.java \
 src/test/java/com/fasterxml/jackson/databind/deser/jdk/JDKStringLikeTypesTest.java \
 src/test/java/com/fasterxml/jackson/databind/TestJDKSerialization.java
%mvn_file : %{name}

%build
%mvn_build -- -Dmaven.test.failure.ignore=true

%install
%mvn_install

%files -f .mfiles
%doc README.md release-notes/*
%license LICENSE NOTICE

%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE

%changelog
* Fri Aug 28 2020 wutao <wutao61@huawei.com> - 2.9.8-1
- package init
