%global other_name annotations %global pkg_name java-%{other_name} Name: jetbrains-%{pkg_name} Version: 22.0.0 Release: 1%{?dist} Summary: A set of annotations used for code inspection support and code documentation License: ASL 2.0 URL: https://github.com/JetBrains/java-annotations BuildArch: noarch Source0: %{url}/archive/%{version}.tar.gz Source1: https://repo1.maven.org/maven2/org/jetbrains/%{other_name}/%{version}/%{other_name}-%{version}.pom BuildRequires: maven-local BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) %description A set of Java annotations which can be used in JVM-based languages. They serve as an additional documentation and can be interpreted by IDEs and static analysis tools to improve code analysis. %javadoc_package %prep %autosetup -n %{pkg_name}-%{version} find -type f '(' -name '*.jar' -o -name '*.class' ')' -delete cp %{SOURCE1} pom.xml %pom_xpath_inject pom:project ' UTF-8 ' %pom_add_plugin org.codehaus.mojo:build-helper-maven-plugin ' add-source generate-sources add-source common java8 module-info ' %pom_add_plugin :maven-resources-plugin ' copy-resources prepare-package copy-resources ${project.build.outputDirectory}/META-INF/versions/9 target/classes-java9 **/module-info.class ' %pom_add_plugin :maven-jar-plugin ' true ' %pom_add_plugin :maven-compiler-plugin ' default-compile target/classes **/module-info.java base-compile compile target/classes-java9 9 9 ' %build %mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %install %mvn_install %files -f .mfiles %license LICENSE.txt %doc README.md CONTRIBUTING.md CODE_OF_CONDUCT.md CHANGELOG.md %changelog * Fri Sep 17 2021 Didik Supriadi - 22.0.0-1 - Initial package