File maven-dependency-tree2.spec of Package maven-dependency-tree2
#
# spec file for package maven-dependency-tree2
#
# Copyright (c) 2024 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/
#
%global base_name maven-dependency-tree
Name: %{base_name}2
Version: 2.2
Release: 0
Summary: Maven dependency tree artifact
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://maven.apache.org/
Source0: https://repo1.maven.org/maven2/org/apache/maven/shared/%{base_name}/%{version}/%{base_name}-%{version}-source-release.zip
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: apache-commons-cli
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: maven-artifact
BuildRequires: maven-project
BuildRequires: maven-resolver-api
BuildRequires: maven-resolver-util
BuildRequires: plexus-containers-component-annotations
BuildRequires: plexus-metadata-generator
BuildRequires: plexus-utils
BuildRequires: plexus-xml
BuildRequires: sisu-plexus
BuildRequires: unzip
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
BuildRequires: mvn(org.apache.maven.shared:maven-shared-components:pom:)
BuildArch: noarch
%description
Apache Maven dependency tree artifact. Originally part of maven-shared.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{base_name}-%{version}
cp %{SOURCE1} build.xml
find -name Maven3*DependencyGraphBuilder.java -delete
%pom_remove_dep org.sonatype.aether:
%pom_add_dep org.codehaus.plexus:plexus-xml:3.0.0
%pom_remove_plugin :apache-rat-plugin
%build
mkdir -p lib
build-jar-repository -s lib \
maven/maven-project \
maven/maven-artifact-2.0.2 \
maven-resolver/maven-resolver-api \
maven-resolver/maven-resolver-util \
org.eclipse.sisu.plexus \
plexus-containers/plexus-component-annotations \
plexus/utils \
plexus/xml
%{ant} \
-Dtest.skip=true \
jar javadoc
%{mvn_compat_version} : 2.0 2.1 2.2
%{mvn_artifact} pom.xml target/%{base_name}-%{version}.jar
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE
%doc NOTICE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%doc NOTICE
%changelog