File maven-resolver-supplier-mvn4.spec of Package maven-resolver

#
# spec file for package maven-resolver-supplier-mvn4
#
# 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/
#


%define base_name maven-resolver
%define fragment_name supplier-mvn4
%define _buildshell /bin/bash
Name:           %{base_name}-%{fragment_name}
Version:        2.0.10
Release:        0
Summary:        Maven Artifact Resolver Instance Supplier Maven3
License:        Apache-2.0
Group:          Development/Libraries/Java
URL:            https://maven.apache.org/resolver/
Source0:        https://archive.apache.org/dist/maven/resolver/%{base_name}-%{version}-source-release.zip
Source1:        %{base_name}-build.tar.xz
BuildRequires:  %{base_name}-api
BuildRequires:  %{base_name}-connector-basic
BuildRequires:  %{base_name}-impl
BuildRequires:  %{base_name}-named-locks
BuildRequires:  %{base_name}-spi
BuildRequires:  %{base_name}-transport-apache
BuildRequires:  %{base_name}-transport-file
BuildRequires:  %{base_name}-util
BuildRequires:  ant
BuildRequires:  fdupes
BuildRequires:  java-devel >= 17
BuildRequires:  javapackages-local >= 6
BuildRequires:  maven-lib
BuildRequires:  unzip
BuildRequires:  xmvn-install
BuildRequires:  xmvn-resolve
BuildRequires:  mvn(org.apache.maven:maven-parent:pom:)
BuildArch:      noarch

%description
A helper module to provide RepositorySystem instances.

Apache Maven Artifact Resolver is a library for working with artifact
repositories and dependency resolution. Maven Artifact Resolver deals with the
specification of local repository, remote repository, developer workspaces,
artifact transports and artifact resolution.

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

%description    javadoc
This package provides %{summary}.

%prep
%setup -q -n %{base_name}-%{version} -a1

%pom_remove_dep :jetty-bom

%{mvn_package} :%{base_name} __noinstall

%{mvn_file} :{*} %{base_name}/@1

%build
mkdir -p lib
build-jar-repository -s lib \
    maven/maven-model-builder \
    maven/maven-resolver-provider \
    maven-resolver/maven-resolver-api \
    maven-resolver/maven-resolver-connector-basic \
    maven-resolver/maven-resolver-impl \
    maven-resolver/maven-resolver-named-locks \
    maven-resolver/maven-resolver-spi \
    maven-resolver/maven-resolver-transport-apache \
    maven-resolver/maven-resolver-transport-file \
    maven-resolver/maven-resolver-util

%{ant} -f %{base_name}-%{fragment_name} \
%if %{without tests}
  -Dtest.skip=true \
%endif
  package javadoc

%{mvn_artifact} pom.xml

%{mvn_artifact} \
    %{base_name}-%{fragment_name}/pom.xml \
    %{base_name}-%{fragment_name}/target/%{base_name}-%{fragment_name}-%{version}.jar

%install
%mvn_install -J %{base_name}-%{fragment_name}/target/site/apidocs
%fdupes -s %{buildroot}%{_javadocdir}

%files -f .mfiles
%license LICENSE NOTICE

%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE

%changelog
openSUSE Build Service is sponsored by