File classgraph.spec of Package classgraph

#
# spec file for package classgraph
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           classgraph
Version:        4.8.180
Release:        0
Summary:        An uber-fast parallelized Java classpath scanner and module scanner
License:        MIT
Group:          Development/Libraries/Java
URL:            https://github.com/%{name}/%{name}
Source0:        %{url}/archive/refs/tags/%{name}-%{version}.tar.gz
Patch0:         classgraph-module-info.patch
BuildRequires:  java-devel >= 1.8
BuildRequires:  maven-local
BuildRequires:  mvn(io.github.toolfactory:jvm-driver)
BuildRequires:  mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildArch:      noarch

%description
ClassGraph is an uber-fast parallelized classpath scanner and module scanner
for Java, Scala, Kotlin and other JVM languages.

%package javadoc
Summary:        API documentation for %{name}
Group:          Documentation/HTML

%description javadoc
API documentation for %{name}.

%prep
%autosetup -n %{name}-%{name}-%{version} -p1

%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin :maven-javadoc-plugin

%pom_remove_dep org.eclipse.jdt:org.eclipse.jdt.annotation

%pom_xpath_set 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration/pom:source' 8
%pom_xpath_set 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration/pom:target' 8
%pom_xpath_remove 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration/pom:compilerArgs'

%{mvn_file} : %{name}

%build
%{mvn_build} -f -- -Dsource=8

%install
%mvn_install

%files -f .mfiles
%license LICENSE-ClassGraph.txt
%doc README.md

%files javadoc -f .mfiles-javadoc
%license LICENSE-ClassGraph.txt

%changelog
openSUSE Build Service is sponsored by