Bootstrap Maven as non-modular packages
Resolves: rhbz#1951482
This commit is contained in:
parent
e0b7afa506
commit
84e699cf5c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
jsr-305-0.4.20090319.tar.xz
|
||||
/jsr-305-20130910svn.tgz
|
||||
/jsr-305-3.0.2.tar.gz
|
||||
|
18
generate-tarball.sh
Executable file
18
generate-tarball.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
name=jsr-305
|
||||
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
||||
|
||||
rm -rf "${name}-${version}"
|
||||
|
||||
git clone 'https://github.com/amaembo/jsr-305'
|
||||
pushd 'jsr-305'
|
||||
git checkout 'd7734b13c61492982784560ed5b4f4bd6cf9bb2c'
|
||||
popd
|
||||
|
||||
mv 'jsr-305' "${name}-${version}"
|
||||
|
||||
rm -f "${name}-${version}.tar.gz"
|
||||
tar -czf "${name}-${version}.tar.gz" "${name}-${version}"
|
||||
rm -rf "${name}-${version}"
|
@ -1,22 +0,0 @@
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index dcafc07..f5799e2 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -27,8 +27,15 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
- <source>1.5</source>
|
||||
- <target>1.5</target>
|
||||
+ <source>1.8</source>
|
||||
+ <target>1.8</target>
|
||||
+ </configuration>
|
||||
+ </plugin>
|
||||
+ <plugin>
|
||||
+ <groupId>org.apache.maven.plugins</groupId>
|
||||
+ <artifactId>maven-javadoc-plugin</artifactId>
|
||||
+ <configuration>
|
||||
+ <source>1.8</source>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
79
jsr-305.spec
79
jsr-305.spec
@ -1,42 +1,47 @@
|
||||
# Workaround for rhbz#1969370: __bootstrap macro is not defined in
|
||||
# CentOS Stream, See https://bugzilla.redhat.com/1969370
|
||||
%global __bootstrap ~bootstrap
|
||||
|
||||
%bcond_without bootstrap
|
||||
|
||||
Name: jsr-305
|
||||
Version: 0
|
||||
Release: 0.32.20130910svn%{?dist}
|
||||
Version: 3.0.2
|
||||
Release: 3%{?dist}
|
||||
Summary: Correctness annotations for Java code
|
||||
|
||||
# The majority of code is BSD-licensed, but some Java sources
|
||||
# are licensed under CC-BY license, see: $ grep -r Creative .
|
||||
License: BSD and CC-BY
|
||||
URL: http://jsr-305.googlecode.com/
|
||||
URL: https://code.google.com/p/jsr-305
|
||||
BuildArch: noarch
|
||||
|
||||
# There has been no official release yet. This is a snapshot of the Subversion
|
||||
# repository as of 10 Sep 2013. Use the following commands to generate the
|
||||
# tarball:
|
||||
# svn export -r 51 http://jsr-305.googlecode.com/svn/trunk jsr-305
|
||||
# tar -czvf jsr-305-20130910svn.tgz jsr-305
|
||||
Source0: jsr-305-20130910svn.tgz
|
||||
# ./generate-tarball.sh
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
# File containing URL to CC-BY license text
|
||||
Source1: NOTICE-CC-BY.txt
|
||||
|
||||
Patch0: %{name}-java8.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc documentation for %{name}
|
||||
BuildRequires: maven-local-openjdk8
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: javapackages-bootstrap
|
||||
%else
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
%endif
|
||||
|
||||
%description
|
||||
This package contains reference implementations, test cases, and other
|
||||
documents for Java Specification Request 305: Annotations for Software Defect
|
||||
Detection.
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{name}.
|
||||
%{?javadoc_package}
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
%setup -q
|
||||
cp %{SOURCE1} NOTICE-CC-BY
|
||||
%patch0 -p1
|
||||
|
||||
%pom_xpath_set "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/*" 1.6
|
||||
|
||||
sed -i 's|<groupId>com\.google\.code\.findbugs</groupId>|<groupId>org.jsr-305</groupId>|' ri/pom.xml
|
||||
sed -i 's|<artifactId>jsr305</artifactId>|<artifactId>ri</artifactId>|' ri/pom.xml
|
||||
|
||||
%mvn_file :ri %{name}
|
||||
%mvn_alias :ri com.google.code.findbugs:jsr305
|
||||
@ -45,6 +50,14 @@ cp %{SOURCE1} NOTICE-CC-BY
|
||||
# do not build sampleUses module - it causes Javadoc generation to fail
|
||||
%pom_disable_module sampleUses
|
||||
|
||||
%pom_remove_parent ri
|
||||
%pom_add_parent org.jsr-305:jsr-305:0.1-SNAPSHOT ri
|
||||
|
||||
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin ri
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin ri
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin ri
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-gpg-plugin ri
|
||||
|
||||
%build
|
||||
%mvn_build
|
||||
|
||||
@ -52,20 +65,23 @@ cp %{SOURCE1} NOTICE-CC-BY
|
||||
%mvn_install
|
||||
|
||||
%files -f .mfiles
|
||||
%doc NOTICE-CC-BY sampleUses
|
||||
%license ri/LICENSE
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%doc NOTICE-CC-BY
|
||||
%license ri/LICENSE
|
||||
%license ri/LICENSE NOTICE-CC-BY
|
||||
%doc sampleUses
|
||||
|
||||
%changelog
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0-0.32.20130910svn
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.2-3
|
||||
- Bootstrap Maven for CentOS Stream 9
|
||||
|
||||
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.2-2
|
||||
- Bootstrap build
|
||||
- Non-bootstrap build
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.31.20130910svn
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Sep 11 2020 Marian Koncek <mkoncek@redhat.com> - 3.0.2-1
|
||||
- Rebuild a properly versioned package
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.30.20130910svn
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
@ -81,9 +97,18 @@ cp %{SOURCE1} NOTICE-CC-BY
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.26.20130910svn
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sat Jan 25 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 0-0.25.20130910svn
|
||||
- Build with OpenJDK 8
|
||||
|
||||
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 0-0.24.20130910svn
|
||||
- Mass rebuild for javapackages-tools 201902
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.25.20130910svn
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 0-0.23.20130910svn
|
||||
- Mass rebuild for javapackages-tools 201901
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.24.20130910svn
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user