Name:           maven-scm
Version:        1.10.0
Release:        4
Summary:        Provide a common API for doing SCM operations
License:        ASL 2.0
URL:            http://maven.apache.org/scm
BuildArch:      noarch
Source0:        http://archive.apache.org/dist/maven/scm/%{name}-%{version}-source-release.zip
Patch0001:      0001-Port-maven-scm-to-latest-version-of-plexus-default.patch
Patch0002:      0002-Fix-vss-modello-config.patch
Patch0003:      0003-Port-to-current-plexus-utils.patch
BuildRequires:  maven-local mvn(commons-io:commons-io) mvn(commons-lang:commons-lang) mvn(junit:junit)
BuildRequires:  mvn(org.apache.maven:maven-compat) mvn(org.apache.maven:maven-parent:pom:)
BuildRequires:  mvn(org.apache.maven:maven-plugin-api) mvn(org.apache.maven:maven-settings:2.2.1)
BuildRequires:  mvn(org.apache.maven.plugins:maven-assembly-plugin) mvn(org.apache.maven.plugins:maven-invoker-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires:  mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires:  mvn(org.apache.maven.shared:file-management) mvn(org.codehaus.modello:modello-maven-plugin)
BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin) mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires:  mvn(org.codehaus.plexus:plexus-container-default)
BuildRequires:  mvn(org.codehaus.plexus:plexus-utils) mvn(org.eclipse.jgit:org.eclipse.jgit)
BuildRequires:  mvn(org.sonatype.plexus:plexus-sec-dispatcher)


%description
Maven SCM provides a common API for doing SCM operations.
This package Supports Maven plugins and other tools in providing them a common API for doing SCM operations.

%package test
Summary:        Test package for maven-scm
Requires:       maven-scm = %{version}-%{release}

%description test
Test package for maven-scm.

%package help
Summary:       Help document for maven-scm
Provides:      %{name}-javadoc = %{version}-%{release}
Obsoletes:     %{name}-javadoc < %{version}-%{release}

%description help
Help document formaven-scm.

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

%pom_remove_plugin org.codehaus.mojo:animal-sniffer-maven-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_change_dep -r :maven-project :maven-compat
%pom_remove_dep org.apache.maven.scm:maven-scm-provider-integrity \
                                     maven-scm-providers/maven-scm-providers-standard
%pom_disable_module maven-scm-provider-integrity maven-scm-providers
%pom_remove_dep org.apache.maven.scm:maven-scm-provider-cvsjava maven-scm-client
%pom_remove_dep org.apache.maven.scm:maven-scm-provider-cvsjava \
                                     maven-scm-providers/maven-scm-providers-standard
%pom_disable_module maven-scm-provider-cvsjava maven-scm-providers/maven-scm-providers-cvs
sed -i s/cvsjava.CvsJava/cvsexe.CvsExe/ maven-scm-client/src/main/resources/META-INF/plexus/components.xml
%pom_remove_dep org.mockito: maven-scm-providers/maven-scm-provider-jazz
%pom_remove_dep org.mockito: maven-scm-providers/maven-scm-provider-accurev

%pom_xpath_replace "pom:plugin[pom:artifactId='maven-assembly-plugin']/pom:configuration/pom:descriptorId" "
    <descriptorRefs>
      <descriptorRef>jar-with-dependencies</descriptorRef>
    </descriptorRefs>" maven-scm-client

%mvn_package :%{name}-provider-cvstest test
%mvn_package :%{name}-provider-gittest test
%mvn_package :%{name}-provider-svntest test
%mvn_package :%{name}-test test

%build
%mvn_build -f

%install
%mvn_install

%files -f .mfiles
%doc LICENSE NOTICE

%files test -f .mfiles-test

%files help -f .mfiles-javadoc

%changelog
* Fri Dec 13 2019 shijian <shijian16@huawei.com> - 1.10.0-4
- Package init
