%global namedreltag .Final
%global namedversion %{version}%{?namedreltag}
# Use this switch to rebuild without infinispan
# This is useful to break the infinispan circular dependency
%define with_infinispan 0
Name: infinispan
Version: 6.0.2
Release: 1%{?dist}
Summary: Data grid platform
License: LGPLv2+
URL: http://www.jboss.org/infinispan
Source0: https://github.com/infinispan/infinispan/archive/%{namedversion}.tar.gz
Patch0: 0001-Avro-1.6.2-support.patch
Patch1: 0002-ISPN-3974-Make-it-compile-with-JDK8.patch
BuildArch: noarch
BuildRequires: aesh
BuildRequires: animal-sniffer
BuildRequires: apache-commons-math
BuildRequires: apache-commons-pool
BuildRequires: avro
BuildRequires: c3p0
BuildRequires: jcip-annotations
BuildRequires: jboss-logging-tools
BuildRequires: jboss-parent
BuildRequires: jboss-marshalling
BuildRequires: jboss-naming
BuildRequires: jboss-transaction-1.1-api
BuildRequires: jgroups
BuildRequires: geronimo-jpa
BuildRequires: xstream
BuildRequires: narayana
BuildRequires: maven-local
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-plugin-exec
BuildRequires: maven-resources-plugin
BuildRequires: maven-remote-resources-plugin
BuildRequires: mojo-signatures
BuildRequires: rhq-plugin-annotations
BuildRequires: staxmapper
BuildRequires: antlr3-java
BuildRequires: maven-failsafe-plugin
BuildRequires: maven-invoker-plugin
%if 0%{?fedora} >= 21
BuildRequires: lucene3
BuildRequires: lucene3-contrib
%endif
# Require these anyhow, always
BuildRequires: lucene
BuildRequires: lucene-contrib
BuildRequires: maven-dependency-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: hibernate-search
BuildRequires: hibernate-hql
BuildRequires: protostream
BuildRequires: gnu-getopt
%if %{with_infinispan}
BuildRequires: infinispan
%endif
%description
Infinispan is an extremely scalable, highly available data grid
platform - 100% open source, and written in Java. The purpose of
Infinispan is to expose a data structure that is highly concurrent,
designed ground-up to make the most of modern multi-processor/multi-core
architectures while at the same time providing distributed cache
capabilities. At its core Infinispan exposes a Cache interface which
extends java.util.Map. It is also optionally is backed by a peer-to-peer
network architecture to distribute state efficiently around a data grid.
%package javadoc
Summary: Javadocs for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-%{namedversion}
%patch0 -p1
%patch1 -p1
# Rename the license file
cp -r license/src/main/resources/META-INF/LICENSE.txt.vm LICENSE.txt
# Disable unnecessary at this point modules
%pom_disable_module extended-statistics
%pom_disable_module tools
%pom_disable_module tree
%if 0%{?fedora} < 21
%pom_disable_module lucene/lucene-v4
%endif
%pom_disable_module server
%pom_disable_module server/core
%pom_disable_module server/memcached
%pom_disable_module server/hotrod
%pom_disable_module server/websocket
%pom_disable_module server/rest
%pom_disable_module cli/cli-server
%pom_disable_module rhq-plugin
%pom_disable_module spring
%pom_disable_module demos/gui
%pom_disable_module demos/ec2
%pom_disable_module demos/distexec
%pom_disable_module demos/ec2-ui
%pom_disable_module demos/directory
%pom_disable_module demos/lucene-directory-demo
%pom_disable_module demos/gridfs-webdav
%pom_disable_module demos/nearcache
%pom_disable_module demos/nearcache-client
%pom_disable_module cdi/extension
%pom_disable_module integrationtests/luceneintegration
%pom_disable_module remote-query/remote-query-server
%pom_disable_module persistence/leveldb
%pom_disable_module persistence/rest
%pom_disable_module server/integration
# Remove the 5.2.x migration support
rm persistence/remote/src/main/java/org/infinispan/persistence/remote/upgrade/HotRodTargetMigrator.java
%pom_remove_dep ":infinispan-adaptor52x" persistence/remote
%pom_disable_module compatibility52x
%pom_disable_module compatibility52x/adaptor52x
%pom_disable_module compatibility52x/custom52x-store
%pom_disable_module compatibility52x/cli-migrator52x
%pom_disable_module as-modules
%pom_disable_module jcache
%if !%{with_infinispan}
%pom_disable_module query
%endif
%pom_remove_dep "org.jboss.arquillian:arquillian-bom" parent/pom.xml
%pom_remove_dep "org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-bom" parent/pom.xml
%pom_remove_plugin ":maven-remote-resources-plugin" parent/pom.xml
%pom_xpath_remove "pom:dependencies/pom:dependency[pom:scope = 'test']/pom:scope" lucene/lucene-directory/pom.xml
%if 0%{?fedora} < 21
# Lucene 4 is unavailable
%pom_remove_dep ":infinispan-lucene-v4" lucene/lucene-directory/pom.xml
%pom_remove_dep ":infinispan-lucene-v4" parent/pom.xml
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-dependency-plugin']/pom:executions/pom:execution/pom:configuration/pom:artifactItems/pom:artifactIt
%endif
%pom_remove_plugin ":animal-sniffer-maven-plugin" parent/pom.xml
# Support for JGroups 3.4.0
sed -i "s|SiteUUID.getSiteName(src.getSite())|src.getSite()|" core/src/main/java/org/infinispan/xsite/BackupReceiverRepositoryImpl.java
# Use lucene3 compat package
sed -i "s|version.lucene.v3>3.6.2<|version.lucene.v3>3<|" parent/pom.xml
# TMP
sed -i "s|error|first|" lucene/lucene-directory/pom.xml
%pom_remove_dep "org.scala-lang:scala-library" server/pom.xml
%pom_remove_plugin "org.scala-tools:maven-scala-plugin" server/core/pom.xml
%pom_remove_dep "org.jboss.as:jboss-as-parent" server/integration/versions/pom.xml
%pom_remove_plugin ":animal-sniffer-maven-plugin" server/integration/versions/pom.xml
%build
%mvn_build -f
%install
%mvn_install
%files -f .mfiles
%dir %{_javadir}/%{name}
%doc LICENSE.txt README.md
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt
%changelog
* Tue Apr 08 2014 Marek Goldmann <mgoldman@redhat.com> - 6.0.2-1
- Upstream version 6.0.2.Final
- Support for Lucene 4 if available
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 6.0.1-2
- Use Requires: java-headless rebuild (#1067528)
* Mon Feb 17 2014 Marek Goldmann <mgoldman@redhat.com> - 6.0.1-1
- Upstream release 6.0.1.Final
* Thu Dec 12 2013 Marek Goldmann <mgoldman@redhat.com> - 6.0.0-1
- Upstream releae 6.0.0.Final
* Thu Oct 24 2013 Marek Goldmann <mgoldman@redhat.com> - 6.0.0-0.1.Beta2
- Upstream release 6.0.0.Beta2
* Wed Oct 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.0-5
- Rebuild to regenerate broken POMs
- Related: rhbz#1021484
* Mon Oct 21 2013 Marek Goldmann <mgoldman@redhat.com> - 5.3.0-4
- Enabled in full query module
* Thu Oct 10 2013 Marek Goldmann <mgoldman@redhat.com> - 5.3.0-3
- Enabled lucene module
* Thu Oct 10 2013 Marek Goldmann <mgoldman@redhat.com> - 5.3.0-2
- Enabled lucene-directory and lucene-v3 modules
* Thu Aug 01 2013 Marek Goldmann <mgoldman@redhat.com> - 5.3.0-1
- Upsteam release 5.3.0.Final
- New guidelines
* Wed Feb 20 2013 Ricardo Arguello <ricardo@fedoraproject.org> - 5.1.2-6
- Added apache-commons-pool dependency
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 5.1.2-4
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local
* Mon Aug 6 2012 Ricardo Arguello <ricardo@fedoraproject.org> - 5.1.2-3
- Added BR: maven-enforcer-plugin
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Mar 22 2012 Ricardo Arguello <ricardo@fedoraproject.org> 5.1.2-1
- Updated to 5.1.2 from upstream
- Use JAR filenames assigned by the build
- Add license file
* Wed Mar 7 2012 Ricardo Arguello <ricardo@fedoraproject.org> 5.1.1-2
- Cleanup of the spec file
* Tue Feb 21 2012 Marek Goldmann <mgoldman@redhat.com> 5.1.1-1
- Initial packaging