Allow building on Java 11
This commit is contained in:
parent
3185c387e1
commit
9203b010d2
31
junit.spec
31
junit.spec
@ -1,13 +1,13 @@
|
||||
Name: junit
|
||||
Epoch: 1
|
||||
Version: 4.12
|
||||
Release: 16%{?dist}
|
||||
Release: 17%{?dist}
|
||||
Summary: Java regression test package
|
||||
License: EPL-1.0
|
||||
URL: http://www.junit.org/
|
||||
BuildArch: noarch
|
||||
|
||||
# ./clean-tarball.sh %{version}
|
||||
# ./clean-tarball.sh %%{version}
|
||||
Source0: %{name}-%{version}-clean.tar.gz
|
||||
Source3: create-tarball.sh
|
||||
|
||||
@ -67,25 +67,44 @@ sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >sr
|
||||
</configuration>
|
||||
</plugin>"
|
||||
|
||||
# Use compiler release flag when building on JDK >8 for correct cross-compiling
|
||||
%pom_xpath_inject pom:profiles "
|
||||
<profile>
|
||||
<id>jdk-release-flag</id>
|
||||
<activation>
|
||||
<jdk>[9,)</jdk>
|
||||
</activation>
|
||||
<properties>
|
||||
<maven.compiler.release>\${jdkVersion}</maven.compiler.release>
|
||||
</properties>
|
||||
</profile>"
|
||||
|
||||
# Ignore test that breaks on Java 11 due to unexpected extra annotations in the JDK standard library
|
||||
sed -i -e '/providesAnnotatedMethodsSortedByName/i@Ignore' src/test/java/org/junit/runners/model/TestClassTest.java
|
||||
|
||||
%mvn_file : %{name}
|
||||
|
||||
%build
|
||||
%mvn_build
|
||||
%mvn_build -- -DjdkVersion=8
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
%files -f .mfiles
|
||||
%doc LICENSE-junit.txt README.md
|
||||
%license LICENSE-junit.txt
|
||||
%doc README.md
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%doc LICENSE-junit.txt
|
||||
%license LICENSE-junit.txt
|
||||
|
||||
%files manual
|
||||
%doc LICENSE-junit.txt
|
||||
%license LICENSE-junit.txt
|
||||
%doc doc/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 04 2020 Mat Booth <mat.booth@redhat.com> - 1:4.12-17
|
||||
- Allow building on Java 11
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-16
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user