Name:                 jgroups
Version:              3.6.10
Release:              6
Summary:              Toolkit for reliable messaging
License:              ASL 2.0 and LGPLv2+
BuildArch:            noarch
URL:                  http://www.jgroups.org
Source0:              https://github.com/belaban/JGroups/archive/JGroups-3.6.10.Final.tar.gz
BuildRequires:        maven-local mvn(org.apache.felix:maven-bundle-plugin) mvn(org.apache.logging.log4j:log4j-core)
BuildRequires:        mvn(org.apache.maven.plugins:maven-antrun-plugin) mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires:        mvn(org.bouncycastle:bcprov-jdk15on) mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires:        mvn(org.jboss.byteman:byteman-bmunit) mvn(org.testng:testng)

%description
JGroups is a toolkit for reliable messaging. It can be used to create clusters whose nodes can send messages to each other. The main features include:
Cluster creation and deletion. Cluster nodes can be spread across LANs or WANs
Joining and leaving of clusters
Membership detection and notification about joined/left/crashed cluster nodes
Detection and removal of crashed nodes
Sending and receiving of node-to-cluster messages (point-to-multipoint)
Sending and receiving of node-to-node messages (point-to-point)

%package              help
Summary:              Help documents for jgroups
Provides:             jgroups-javadoc = %{version}-%{release}
Obsoletes:            jgroups-javadoc < %{version}-%{release}

%description          help
The jgroups-help package conatins the API documentation for jgroups.

%prep
%autosetup -n JGroups-JGroups-3.6.10.Final -p1

for filename in *.class *.jar;do
    find . -name ${filename} -delete
done

for plugin in nexus-staging-maven-plugin maven-jar-plugin maven-source-plugin;do
    %pom_remove_plugin :${plugin}
done

%pom_xpath_inject pom:project/pom:properties '
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>'
%pom_change_dep "bouncycastle:bcprov-jdk15" "org.bouncycastle:bcprov-jdk15on:1.52"

%build
%mvn_build -f

%install
%mvn_install

%files -f .mfiles
%license LICENSE
%doc INSTALL.html README

%files help -f .mfiles-javadoc

%changelog
* Fri Dec 20 2019 liujing<liujing144@huawei.com> - 3.6.10-6
- Package init
