Enable module-info generation
This commit is contained in:
parent
2a81a876f1
commit
dcb50ee988
@ -21,7 +21,6 @@
|
||||
<module>junit-platform-console-standalone</module>
|
||||
<module>junit-platform-engine</module>
|
||||
<module>junit-platform-launcher</module>
|
||||
<module>junit-platform-reporting</module>
|
||||
<module>junit-platform-runner</module>
|
||||
<module>junit-platform-suite-api</module>
|
||||
<module>junit-platform-suite-commons</module>
|
||||
@ -32,11 +31,40 @@
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-compile</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>8</release>
|
||||
<!--
|
||||
(default-compile) for junit-jupiter module would fail because
|
||||
there are no sources to compile and therefore the plugin would
|
||||
include module-info in the first (Java 8) compile phase
|
||||
-->
|
||||
<useIncrementalCompilation>false</useIncrementalCompilation>
|
||||
<excludes>
|
||||
<exclude>**/module-info.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>module-info</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<release>9</release>
|
||||
<includes>
|
||||
<include>**/module-info.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
|
24
junit5.spec
24
junit5.spec
@ -7,7 +7,7 @@
|
||||
|
||||
Name: junit5
|
||||
Version: 5.9.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Java regression testing framework
|
||||
License: EPL-2.0
|
||||
URL: https://junit.org/junit5/
|
||||
@ -26,7 +26,6 @@ Source203: https://repo1.maven.org/maven2/org/junit/platform/junit-platform
|
||||
Source205: https://repo1.maven.org/maven2/org/junit/platform/junit-platform-launcher/%{platform_version}/junit-platform-launcher-%{platform_version}.pom
|
||||
Source206: https://repo1.maven.org/maven2/org/junit/platform/junit-platform-runner/%{platform_version}/junit-platform-runner-%{platform_version}.pom
|
||||
Source207: https://repo1.maven.org/maven2/org/junit/platform/junit-platform-suite-api/%{platform_version}/junit-platform-suite-api-%{platform_version}.pom
|
||||
Source208: https://repo1.maven.org/maven2/org/junit/platform/junit-platform-reporting/%{platform_version}/junit-platform-reporting-%{platform_version}.pom
|
||||
Source209: https://repo1.maven.org/maven2/org/junit/platform/junit-platform-testkit/%{platform_version}/junit-platform-testkit-%{platform_version}.pom
|
||||
Source210: https://repo1.maven.org/maven2/org/junit/platform/junit-platform-suite-commons/%{platform_version}/junit-platform-suite-commons-%{platform_version}.pom
|
||||
# Jupiter POMs
|
||||
@ -56,11 +55,13 @@ BuildRequires: mvn(org.opentest4j:opentest4j)
|
||||
%description
|
||||
JUnit is a popular regression testing framework for Java platform.
|
||||
|
||||
%if 0
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description javadoc
|
||||
Junit5 API documentation.
|
||||
%endif
|
||||
|
||||
%package guide
|
||||
Summary: Documentation for %{name}
|
||||
@ -71,17 +72,18 @@ JUnit 5 User Guide.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-r%{version}
|
||||
find -name \*.jar -delete
|
||||
find -name '*.jar' -delete
|
||||
|
||||
cp -p %{SOURCE100} pom.xml
|
||||
|
||||
# Module depends on open-test-reporting
|
||||
rm -r junit-platform-reporting/src/main/java/org/junit/platform/reporting/open
|
||||
|
||||
for source in $(echo %{sources} | cut -d ' ' -f3-); do
|
||||
module=${source}
|
||||
module=${module##*/}
|
||||
module=${module%%-*}
|
||||
if [ -d ${module}/src/module ]; then
|
||||
mkdir -p ${module}/src/main/java
|
||||
mv -t ${module}/src/main/java ${module}/src/module/*/module-info.java
|
||||
fi
|
||||
cp -p ${source} ${module}/pom.xml
|
||||
%pom_add_parent org.fedoraproject.xmvn.junit5:aggregator:any ${module}
|
||||
# OSGi BSN
|
||||
@ -89,7 +91,7 @@ for source in $(echo %{sources} | cut -d ' ' -f3-); do
|
||||
%pom_xpath_inject pom:project "<properties><osgi.bsn>${bsn}</osgi.bsn></properties>" ${module}
|
||||
# Incorrect scope - API guardian is just annotation, needed only during compilation
|
||||
%pom_xpath_set -f "pom:dependency[pom:artifactId='apiguardian-api']/pom:scope" provided ${module}
|
||||
%pom_xpath_set -f "pom:dependency[pom:scope='runtime']/pom:scope" "compile" ${module}
|
||||
%pom_xpath_set -f "pom:dependency[pom:scope='runtime']/pom:scope" compile ${module}
|
||||
done
|
||||
|
||||
%pom_remove_parent junit-bom
|
||||
@ -105,7 +107,8 @@ done
|
||||
%mvn_package :aggregator __noinstall
|
||||
|
||||
%build
|
||||
%mvn_build -f
|
||||
# javadoc fails: https://github.com/fedora-java/xmvn/issues/223
|
||||
%mvn_build -f -j
|
||||
|
||||
# Build docs. Ignore exit asciidoc -- it fails for some reason, but
|
||||
# still produces readable docs.
|
||||
@ -118,13 +121,18 @@ ln -s ../../javadoc/junit5 documentation/src/docs/api
|
||||
%files -f .mfiles
|
||||
%license LICENSE.md LICENSE-notice.md
|
||||
|
||||
%if 0
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE.md LICENSE-notice.md
|
||||
%endif
|
||||
|
||||
%files guide
|
||||
%doc documentation/src/docs/*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 23 2023 Marian Koncek <mkoncek@redhat.com> - 5.9.0-3
|
||||
- Enable module-info generation
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user