Allow conditional building of some extra modules

This commit is contained in:
Mat Booth 2018-08-22 08:37:37 +01:00
parent f1245c587c
commit 14102b9d3c

View File

@ -1,6 +1,8 @@
%bcond_with jp_minimal
Name: jackson-modules-base
Version: 2.9.4
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Jackson modules: Base
License: ASL 2.0
URL: https://github.com/FasterXML/jackson-modules-base
@ -14,7 +16,9 @@ BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) >= %{version}
BuildRequires: mvn(com.fasterxml.jackson:jackson-base:pom:) >= %{version}
BuildRequires: mvn(com.google.code.maven-replacer-plugin:replacer)
BuildRequires: mvn(com.google.inject:guice)
%if %{without jp_minimal}
BuildRequires: mvn(com.thoughtworks.paranamer:paranamer)
%endif
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.mockito:mockito-all)
@ -51,6 +55,7 @@ annotations as an alternative to native Jackson annotations. It is most often
used to make it easier to reuse existing data beans that used with JAXB
framework to read and write XML.
%if %{without jp_minimal}
%package -n jackson-module-mrbean
Summary: Functionality for implementing interfaces and abstract types dynamically
@ -58,6 +63,7 @@ Summary: Functionality for implementing interfaces and abstract types dynamicall
Mr Bean is an extension that implements support for "POJO type materialization"
ability for databinder to construct implementation classes for Java interfaces
and abstract classes, as part of deserialization.
%endif
%package -n jackson-module-osgi
Summary: Jackson module to inject OSGI services in deserialized beans
@ -68,12 +74,14 @@ Thanks to the JacksonInject annotations, the OsgiJacksonModule will search for
the required service in the OSGI service registry and injects it in the object
while deserializing.
%if %{without jp_minimal}
%package -n jackson-module-paranamer
Summary: Jackson module that uses Paranamer to introspect names of constructor params
%description -n jackson-module-paranamer
Module that uses Paranamer library to auto-detect names of Creator
(constructor, static factory method, annotated with @JsonCreator) methods.
%endif
%package javadoc
Summary: Javadoc for %{name}
@ -103,6 +111,12 @@ cp -p mrbean/src/main/resources/META-INF/{LICENSE,NOTICE} .
# This is provided by modern JREs
%pom_remove_dep "javax.xml.bind:jaxb-api" jaxb
%if %{with jp_minimal}
# Disable modules with additional deps
%pom_disable_module paranamer
%pom_disable_module mrbean
%endif
%mvn_file ":{*}" jackson-modules/@1
%build
@ -127,22 +141,29 @@ cp -p mrbean/src/main/resources/META-INF/{LICENSE,NOTICE} .
%doc jaxb/README.md jaxb/release-notes
%license LICENSE NOTICE
%if %{without jp_minimal}
%files -n jackson-module-mrbean -f .mfiles-jackson-module-mrbean
%doc mrbean/README.md mrbean/release-notes
%license LICENSE NOTICE
%endif
%files -n jackson-module-osgi -f .mfiles-jackson-module-osgi
%doc osgi/README.md osgi/release-notes
%license LICENSE NOTICE
%if %{without jp_minimal}
%files -n jackson-module-paranamer -f .mfiles-jackson-module-paranamer
%doc paranamer/README.md paranamer/release-notes
%license LICENSE NOTICE
%endif
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog
* Wed Aug 22 2018 Mat Booth <mat.booth@redhat.com> - 2.9.4-4
- Allow conditional building of some extra modules
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild