Blame SPECS/jackson-module-jaxb-annotations.spec

d0cd2c
%global pkg_name jackson-module-jaxb-annotations
d0cd2c
%{?scl:%scl_package %{pkg_name}}
d0cd2c
%{?java_common_find_provides_and_requires}
d0cd2c
Name:          %{?scl_prefix}jackson-module-jaxb-annotations
d0cd2c
Version:       2.5.0
d0cd2c
Release:       2.3%{?dist}
d0cd2c
Summary:       JAXB annotations support for Jackson (2.x)
d0cd2c
License:       ASL 2.0
d0cd2c
URL:           http://wiki.fasterxml.com/JacksonJAXBAnnotations
d0cd2c
Source0:       https://github.com/FasterXML/jackson-module-jaxb-annotations/archive/%{pkg_name}-%{version}.tar.gz
d0cd2c
d0cd2c
# Require glassfish-jaxb-api
d0cd2c
BuildRequires: %{?scl_prefix}mvn(javax.xml.bind:jaxb-api)
d0cd2c
BuildRequires: %{?scl_prefix}mvn(com.fasterxml.jackson.core:jackson-core)
d0cd2c
BuildRequires: %{?scl_prefix}mvn(com.fasterxml.jackson.core:jackson-databind)
d0cd2c
d0cd2c
# test deps
d0cd2c
BuildRequires: %{?scl_prefix_java_common}mvn(junit:junit)
d0cd2c
d0cd2c
BuildRequires: %{?scl_prefix_java_common}maven-local
d0cd2c
BuildRequires: %{?scl_prefix_maven}maven-enforcer-plugin
d0cd2c
BuildRequires: %{?scl_prefix_maven}maven-plugin-build-helper
d0cd2c
BuildRequires: %{?scl_prefix_maven}maven-plugin-bundle
d0cd2c
BuildRequires: %{?scl_prefix_maven}maven-site-plugin
d0cd2c
BuildRequires: %{?scl_prefix_maven}maven-surefire-provider-junit
d0cd2c
# bundle-plugin Requires
d0cd2c
#BuildRequires: mvn(org.sonatype.aether:aether)
d0cd2c
d0cd2c
BuildArch:     noarch
d0cd2c
d0cd2c
%description
d0cd2c
Support for using JAXB annotations as an alternative to
d0cd2c
"native" Jackson annotations, for configuring data binding.
d0cd2c
d0cd2c
%package javadoc
d0cd2c
Summary:       Javadoc for %{pkg_name}
d0cd2c
d0cd2c
%description javadoc
d0cd2c
This package contains javadoc for %{pkg_name}.
d0cd2c
d0cd2c
%prep
d0cd2c
d0cd2c
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
d0cd2c
%setup -q -n %{pkg_name}-%{pkg_name}-%{version}
d0cd2c
d0cd2c
cp -p src/main/resources/META-INF/LICENSE .
d0cd2c
cp -p src/main/resources/META-INF/NOTICE .
d0cd2c
sed -i 's/\r//' LICENSE NOTICE
d0cd2c
d0cd2c
%mvn_file : %{pkg_name}
d0cd2c
d0cd2c
%pom_remove_parent
d0cd2c
d0cd2c
%pom_xpath_inject "pom:build/pom:plugins" '
d0cd2c
        <plugin>
d0cd2c
          <groupId>org.apache.felix</groupId>
d0cd2c
          <artifactId>maven-bundle-plugin</artifactId>
d0cd2c
          <extensions>true</extensions>
d0cd2c
          <version>1.0.0</version>
d0cd2c
          <configuration>
d0cd2c
            <instructions>
d0cd2c
              <_nouses>true</_nouses>
d0cd2c
              <_removeheaders>Include-Resource,JAVA_1_3_HOME,JAVA_1_4_HOME,JAVA_1_5_HOME,JAVA_1_6_HOME,JAVA_1_7_HOME</_removeheaders>
d0cd2c
              <_versionpolicy>${osgi.versionpolicy}</_versionpolicy>
d0cd2c
              <Bundle-Name>${project.name}</Bundle-Name>
d0cd2c
              <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
d0cd2c
              <Bundle-Description>${project.description}</Bundle-Description>
d0cd2c
              <Export-Package>${osgi.export}</Export-Package>
d0cd2c
              <Private-Package>${osgi.private}</Private-Package>
d0cd2c
              <Import-Package>${osgi.import}</Import-Package>
d0cd2c
              <DynamicImport-Package>${osgi.dynamicImport}</DynamicImport-Package>
d0cd2c
              <Bundle-DocURL>${project.url}</Bundle-DocURL>
d0cd2c
              <Bundle-RequiredExecutionEnvironment>${osgi.requiredExecutionEnvironment}</Bundle-RequiredExecutionEnvironment>
d0cd2c
d0cd2c
              <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
d0cd2c
              <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
d0cd2c
              <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
d0cd2c
d0cd2c
              <Implementation-Title>${project.name}</Implementation-Title>
d0cd2c
              <Implementation-Version>${project.version}</Implementation-Version>
d0cd2c
              <Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
d0cd2c
              <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
d0cd2c
d0cd2c
              <Specification-Title>${project.name}</Specification-Title>
d0cd2c
              <Specification-Version>${project.version}</Specification-Version>
d0cd2c
              <Specification-Vendor>${project.organization.name}</Specification-Vendor>
d0cd2c
            </instructions>
d0cd2c
          </configuration>
d0cd2c
        </plugin>'
d0cd2c
d0cd2c
%pom_xpath_inject "pom:properties" '
d0cd2c
<osgi.versionpolicy>${range;[===,=+);${@}}</osgi.versionpolicy>'
d0cd2c
d0cd2c
%pom_remove_dep :jsr311-api
d0cd2c
sed -i "s/\${version\.plugin\.surefire}/2\.17/" pom.xml
d0cd2c
d0cd2c
# Avoid using the replacer-plugin
d0cd2c
%pom_remove_plugin com.google.code.maven-replacer-plugin:replacer
d0cd2c
d0cd2c
file=`find -name PackageVersion.java.in`
d0cd2c
gid=`grep "<groupId>" pom.xml | head -1 | sed 's/.*>\(.*\)<.*/\1/'`
d0cd2c
aid=`grep "<artifactId>" pom.xml | head -1 | sed 's/.*>\(.*\)<.*/\1/'`
d0cd2c
v=`grep "<version>" pom.xml | head -1 | sed 's/.*>\(.*\)<.*/\1/'`
d0cd2c
pkg=`echo ${file} | cut -d/ -f5- | rev | cut -d/ -f2- | rev | tr '/' '\.'`
d0cd2c
d0cd2c
sed -i "s/@projectversion@/${v}/
d0cd2c
        s/@projectgroupid@/${gid}/
d0cd2c
        s/@package@/${pkg}/
d0cd2c
        s/@projectartifactid@/${aid}/" ${file}
d0cd2c
d0cd2c
cp ${file} ${file%.in}
d0cd2c
d0cd2c
%{?scl:EOF}
d0cd2c
d0cd2c
%build
d0cd2c
d0cd2c
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
d0cd2c
d0cd2c
%mvn_build -- -Dmaven.test.skip=true
d0cd2c
d0cd2c
%{?scl:EOF}
d0cd2c
d0cd2c
%install
d0cd2c
d0cd2c
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
d0cd2c
%mvn_install
d0cd2c
d0cd2c
%{?scl:EOF}
d0cd2c
d0cd2c
%files -f .mfiles
d0cd2c
%doc README.md release-notes/* LICENSE NOTICE
d0cd2c
d0cd2c
%files javadoc -f .mfiles-javadoc
d0cd2c
%doc LICENSE NOTICE
d0cd2c
d0cd2c
%changelog
d0cd2c
* Thu Jul 30 2015 Roland Grunberg <rgrunber@redhat.com> - 2.5.0-2.3
d0cd2c
- Add missing osgi.versionpolicy property.
d0cd2c
d0cd2c
* Tue Jul 28 2015 Alexander Kurtakov <akurtako@redhat.com> 2.5.0-2.2
d0cd2c
- Drop provides/obsoletes outside of dts namespace.
d0cd2c
d0cd2c
* Thu Jul 02 2015 Roland Grunberg <rgrunber@redhat.com> - 2.5.0-2.1
d0cd2c
- SCL-ize.
d0cd2c
d0cd2c
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
d0cd2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d0cd2c
d0cd2c
* Sat Jan 31 2015 gil cattaneo <puntogil@libero.it> 2.5.0-1
d0cd2c
- update to 2.5.0
d0cd2c
d0cd2c
* Sat Sep 20 2014 gil cattaneo <puntogil@libero.it> 2.4.2-1
d0cd2c
- update to 2.4.2
d0cd2c
d0cd2c
* Fri Jul 04 2014 gil cattaneo <puntogil@libero.it> 2.4.1-1
d0cd2c
- update to 2.4.1
d0cd2c
d0cd2c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-5
d0cd2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d0cd2c
d0cd2c
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.2.2-4
d0cd2c
- Use Requires: java-headless rebuild (#1067528)
d0cd2c
d0cd2c
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-3
d0cd2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d0cd2c
d0cd2c
* Mon Jul 22 2013 gil cattaneo <puntogil@libero.it> 2.2.2-2
d0cd2c
- review fixes
d0cd2c
d0cd2c
* Tue Jul 16 2013 gil cattaneo <puntogil@libero.it> 2.2.2-1
d0cd2c
- 2.2.2
d0cd2c
- renamed jackson-module-jaxb-annotations
d0cd2c
d0cd2c
* Tue Jul 16 2013 gil cattaneo <puntogil@libero.it> 2.2.1-1
d0cd2c
- 2.2.1
d0cd2c
d0cd2c
* Wed Oct 24 2012 gil cattaneo <puntogil@libero.it> 2.1.0-1
d0cd2c
- update to 2.1.0
d0cd2c
- renamed jackson2-module-jaxb-annotations
d0cd2c
d0cd2c
* Thu Sep 13 2012 gil cattaneo <puntogil@libero.it> 2.0.5-1
d0cd2c
- initial rpm