Build with module-info

This commit is contained in:
Marian Koncek 2023-02-15 14:56:28 +01:00
parent df350b96d8
commit c143d8171c

View File

@ -2,7 +2,7 @@
Name: opentest4j
Version: 1.2.0
Release: 12%{?dist}
Release: 13%{?dist}
Summary: Open Test Alliance for the JVM
License: ASL 2.0
URL: https://github.com/ota4j-team/opentest4j
@ -40,6 +40,8 @@ API documentation for %{name}.
find -name \*.jar -delete
cp -p %{SOURCE100} pom.xml
mv src/module/java/* src/main/java
%pom_add_dep junit:junit::test
%pom_xpath_inject pom:project "
@ -51,7 +53,6 @@ cp -p %{SOURCE100} pom.xml
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.opentest4j</Automatic-Module-Name>
<Implementation-Title>opentest4j</Implementation-Title>
<Implementation-Vendor>opentest4j.org</Implementation-Vendor>
<Implementation-Version>%{version}</Implementation-Version>
@ -67,6 +68,36 @@ cp -p %{SOURCE100} pom.xml
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>8</release>
<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>
</plugins>
</pluginManagement>
</build>"
@ -76,7 +107,7 @@ cp -p %{SOURCE100} pom.xml
sed -i -e '/org\.apache\.commons\.codec/d' src/test/java/org/opentest4j/AssertionFailedErrorTests.java
%build
%mvn_build -- -Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7
%mvn_build
%install
%mvn_install
@ -89,6 +120,9 @@ sed -i -e '/org\.apache\.commons\.codec/d' src/test/java/org/opentest4j/Assertio
%license LICENSE
%changelog
* Wed Feb 15 2023 Marian Koncek <mkoncek@redhat.com> - 1.2.0-13
- Build with module-info
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild