Blob Blame History Raw
%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 1

Name:             infinispan
Version:          6.0.2
Release:          8%{?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
Patch2:           infinispan-6.0.2-lucene4.10-support.patch

BuildArch:        noarch

%if %{with_infinispan}
BuildRequires:    infinispan
%endif

BuildRequires:    maven-local
BuildRequires:    mvn(c3p0:c3p0)
BuildRequires:    mvn(com.puppycrawl.tools:checkstyle)
BuildRequires:    mvn(commons-pool:commons-pool)
BuildRequires:    mvn(gnu-getopt:getopt)
BuildRequires:    mvn(log4j:log4j)
BuildRequires:    mvn(net.jcip:jcip-annotations)
BuildRequires:    mvn(org.apache.avro:avro)
BuildRequires:    mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:    mvn(org.apache.lucene:lucene-core:3)
%if 0%{?fedora} >= 23
# Require these anyhow, always
BuildRequires:    mvn(org.apache.lucene:lucene-core:4)
BuildRequires:    mvn(org.apache.lucene:lucene-analyzers-common:4)
%else
BuildRequires:    mvn(org.apache.lucene:lucene-core)
BuildRequires:    mvn(org.apache.lucene:lucene-analyzers-common)
%endif
BuildRequires:    mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires:    mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires:    mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires:    mvn(org.apache.maven.plugins:maven-failsafe-plugin)
BuildRequires:    mvn(org.codehaus.jackson:jackson-mapper-asl)
BuildRequires:    mvn(org.codehaus.mojo:exec-maven-plugin)
BuildRequires:    mvn(org.hibernate:hibernate-search-engine) >= 4.5.1-2
BuildRequires:    mvn(org.hibernate:hibernate-search-infinispan)
BuildRequires:    mvn(org.hibernate.hql:hibernate-hql-lucene)
BuildRequires:    mvn(org.hibernate.hql:hibernate-hql-parser)
BuildRequires:    mvn(org.infinispan.protostream:protostream)
BuildRequires:    mvn(org.jboss.aesh:aesh)
BuildRequires:    mvn(org.jboss.logging:jboss-logging)
BuildRequires:    mvn(org.jboss.logging:jboss-logging-processor)
BuildRequires:    mvn(org.jboss.marshalling:jboss-marshalling)
BuildRequires:    mvn(org.jboss.marshalling:jboss-marshalling-river)
BuildRequires:    mvn(org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec)
BuildRequires:    mvn(org.jgroups:jgroups)
BuildRequires:    mvn(org.osgi:org.osgi.core)


%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:          Javadoc for %{name}

%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q -n %{name}-%{namedversion}

%patch0 -p1
%patch1 -p1
%patch2 -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

# https://bugs.openjdk.java.net/browse/JDK-8067747
%pom_xpath_inject "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration" \
 "<useIncrementalCompilation>false</useIncrementalCompilation>" commons
for p in core persistence/jdbc query client/hotrod-client persistence/remote ;do
%pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin:3.0 ${p} '
<configuration>
 <useIncrementalCompilation>false</useIncrementalCompilation>
 <source>1.6</source>
 <target>1.6</target>
 <encoding>UTF-8</encoding>
</configuration>'
done

%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:artifactItem[pom:artifactId = 'infinispan-lucene-v4']" lucene/lucene-directory/pom.xml
%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
%pom_xpath_set "pom:properties/pom:version.lucene.v3" 3 parent
# Use lucene4 compat package
%pom_xpath_set "pom:properties/pom:version.lucene.v4" 4 parent

# 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
%doc README.md
%license LICENSE.txt

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

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Sep 09 2015 gil cattaneo <puntogil@libero.it> 6.0.2-7
- fix FTBFS RHBZ#1239576
- fix BR list and use BRs mvn()-like
- introduce license macro
- resolve some rpmlint problem

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jun 18 2014 Marek Goldmann <mgoldman@redhat.com> - 6.0.2-5
- Fix for builds on Fedora < 21

* Fri Jun 13 2014 Marek Goldmann <mgoldman@redhat.com> - 6.0.2-4
- Rebuild for new lucene3 build
- Remove BR on animal-sniffer and mojo-signatures, RHBZ#1097080

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Apr 17 2014 Marek Goldmann <mgoldman@redhat.com> - 6.0.2-2
- Rebuild with infinispan dependency

* 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