%global pom_url http://central.maven.org/maven2/org/ehcache Name: ehcache Version: 3.1.3 Release: 1%{?dist} Summary: Java in-process cache License: ASL 2.0 URL: http://www.ehcache.org/ Source0: https://github.com/ehcache/ehcache3/archive/v%{version}/%{name}-%{version}.tar.gz # Unavailable gradle plugin: # com.github.jengelman.gradle.plugins:shadow; # com.github.jacobono.jaxb. # Switch to Maven Source1: %{pom_url}/modules/%{name}-107/%{version}/%{name}-107-%{version}.pom Source2: %{pom_url}/modules/%{name}-api/%{version}/%{name}-api-%{version}.pom Source3: %{pom_url}/modules/%{name}-core/%{version}/%{name}-core-%{version}.pom Source4: %{pom_url}/modules/%{name}-core-spi-test/3.0.0.m3/%{name}-core-spi-test-3.0.0.m3.pom Source5: %{pom_url}/modules/%{name}-impl/%{version}/%{name}-impl-%{version}.pom Source6: %{pom_url}/modules/%{name}-spi-tester/3.0.0.m3/%{name}-spi-tester-3.0.0.m3.pom Source7: %{pom_url}/modules/%{name}-xml/%{version}/%{name}-xml-%{version}.pom Source8: %{pom_url}/%{name}-transactions/%{version}/%{name}-transactions-%{version}.pom # Source9: %%{pom_url}/%%{name}-management/%%{version}/%%{name}-management-%%{version}.pom # Source10: %%{pom_url}/modules/%%{name}-client/%%{version}/%%{name}-client-%%{version}.pom # Source11: %%{pom_url}/modules/%%{name}-common/%%{version}/%%{name}-common-%%{version}.pom # Source12: %%{pom_url}/modules/%%{name}-server/%%{version}/%%{name}-server-%%{version}.pom BuildRequires: maven-local BuildRequires: mvn(javax.transaction:jta) BuildRequires: mvn(javax.xml.bind:jaxb-api) BuildRequires: mvn(junit:junit) BuildRequires: mvn(com.google.code.findbugs:annotations) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jcache_1.0_spec) BuildRequires: mvn(org.codehaus.btm:btm) # https://gil.fedorapeople.org/ehcache-sizeof-0.3.0-1.fc24.src.rpm BuildRequires: mvn(org.ehcache:sizeof) BuildRequires: mvn(org.glassfish.jaxb:jaxb-runtime) BuildRequires: mvn(org.glassfish.jaxb:jaxb-xjc) BuildRequires: mvn(org.hamcrest:hamcrest-library) BuildRequires: mvn(org.jvnet.jaxb2.maven2:maven-jaxb22-plugin) BuildRequires: mvn(org.mockito:mockito-core) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.ow2.asm:asm-all) # BuildRequires: mvn(org.terracotta:management-registry) == 2.3.0 # https://gil.fedorapeople.org/offheap-store-2.3.1-1.fc24.src.rpm BuildRequires: mvn(org.terracotta:offheap-store) BuildRequires: mvn(org.terracotta:statistics) BuildRequires: /usr/bin/asciidoc # Missing build deps: # clustered sub modules # https://github.com/Terracotta-OSS/terracotta-apis # org.terracotta:entity-client-api:1.0.6.beta # org.terracotta:entity-server-api:1.0.6.beta # org.terracotta:entity-test-lib:1.0.6.beta2 # org.terracotta:passthrough-server:1.0.6.beta2 # org.terracotta:standard-cluster-services:1.0.6.beta # org.terracotta:offheap-resource:5.0.6.beta5 # management sub module # org.terracotta.entities:clustered-map-client:5.0.6.beta5 # org.terracotta.entities:clustered-map-server:5.0.6.beta5 # org.terracotta.management:management-entity-client:5.0.6.beta5 # org.terracotta.management:management-entity-server:5.0.6.beta5 # org.terracotta.management:monitoring-service:5.0.6.beta5 # org.terracotta.management:monitoring-service-entity:5.0.6.beta5 # https://github.com/Terracotta-OSS/terracotta-platform/ BuildArch: noarch %description Ehcache is an open source, standards-based cache that boosts performance, offloads your database, and simplifies scalability. It's the most widely used Java-based cache because it's robust, proven, full-featured, and integrates with other popular libraries and frameworks. Ehcache scales from in-process caching, all the way to mixed in-process/out-of-process deployments with terabyte-sized caches. This package provides the Core module of Ehcache 3. %package 107 Summary: Ehcache JSR-107 Provider %description 107 The JSR-107 compatibility module of Ehcache. %package api Summary: Ehcache API module %description api The API module of Ehcache. %package core-spi-test Summary: Ehcache Core SPI test module %description core-spi-test The Core SPI test module of Ehcache. %package impl Summary: Ehcache Implementation module %description impl The implementation module of Ehcache. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. #%% package management #Summary: Ehcache Management and Monitoring module #%% description management #The Management and Monitoring module of Ehcache. %package spi-tester Summary: Ehcache SPI Tester module %description spi-tester Ehcache SPI Tester module. %package transactions Summary: Ehcache transactions module %description transactions The transactions module of Ehcache. %package xml Summary: Ehcache XML Parsing module %description xml The module containing all XML parsing logic Ehcache. %prep %setup -q -n %{name}3-%{version} # Cleanup find . -name "*.jar" -print -delete cp -p %SOURCE1 107/pom.xml cp -p %SOURCE2 api/pom.xml cp -p %SOURCE3 core/pom.xml cp -p %SOURCE4 core-spi-test/pom.xml %pom_xpath_set pom:project/pom:version %{version} core-spi-test %pom_change_dep org.ehcache.modules: ::%{version} core-spi-test cp -p %SOURCE5 impl/pom.xml cp -p %SOURCE6 spi-tester/pom.xml %pom_xpath_set pom:project/pom:version %{version} spi-tester cp -p %SOURCE7 xml/pom.xml cp -p %SOURCE8 transactions/pom.xml #cp -p %%SOURCE9 management/pom.xml #cp -p %%SOURCE10 clustered/client/pom.xml #cp -p %%SOURCE11 clustered/common/pom.xml #cp -p %%SOURCE12 clustered/server/pom.xml # This is a dummy POM added just to ease building in the RPM platforms cat > pom.xml << EOF 4.0.0 org.ehcache ehcache3-project pom %{version} 107 api core core-spi-test impl spi-tester transactions xml EOF # management \ # Add OSGi support for p in 107 \ api \ core \ core-spi-test \ impl \ spi-tester \ transactions \ xml; do %pom_xpath_inject "pom:project" "bundle" ${p} %pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 ${p} " true true \${project.groupId}.${p} \${project.name} \${project.version} bundle-manifest process-classes manifest " done %if 0 %pom_add_plugin "org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:0.12.3" xml " ehcache-xml-model generate true src/main/resources ehcache-core.xsd org.ehcache.xml.model javax.xml.bind jaxb-api 2.2.11 compile org.glassfish.jaxb jaxb-runtime 2.2.11 compile org.glassfish.jaxb jaxb-xjc 2.2.11 compile " %endif # Use open source jcache %pom_change_dep javax.cache:cache-api org.apache.geronimo.specs:geronimo-jcache_1.0_spec 107 # Fix build deps %pom_change_dep org.ehcache:ehcache org.ehcache.modules:ehcache-core transactions %pom_add_dep org.ehcache.modules:ehcache-impl:'%{version}':compile transactions %pom_add_dep org.ehcache.modules:ehcache-xml:'%{version}':compile transactions %pom_add_dep com.google.code.findbugs:annotations:3.0.0:compile transactions # Fix test deps %pom_add_dep org.ehcache.modules:ehcache-core-spi-test:'%{version}':test transactions %pom_add_dep org.hamcrest:hamcrest-library:1.3:test transactions %pom_add_dep org.mockito:mockito-core:1.9.5:test transactions %pom_add_dep junit:junit:4.11:test transactions %pom_add_dep org.slf4j:slf4j-simple:1.7.7:test transactions # package edu.umd.cs.findbugs.annotations does not exist %pom_add_dep com.google.code.findbugs:annotations:3.0.0:compile impl find ./core/src/test/java -name "EhcacheManagerTest.java" -print -delete %mvn_package :ehcache3-project __noinstall %build # Generate java stuff ( cd xml/src/main/java /usr/lib/jvm/java/bin/xjc -nv -encoding UTF-8 ../resources/ehcache-core.xsd -p org.ehcache.xml.model ) %mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8 asciidoc -n -b html5 -a toc2 -a toclevels=3 -o README.html README.adoc asciidoc -n -b html5 -a toc2 -a toclevels=3 -o 107/README.html 107/README.adoc asciidoc -n -b html5 -a toc2 -a toclevels=3 -o xml/README.html xml/README.adoc %install %mvn_install %files -f .mfiles-ehcache-core %files 107 -f .mfiles-ehcache-107 %doc 107/README.html %files api -f .mfiles-ehcache-api %doc README.html %license LICENSE NOTICE %files core-spi-test -f .mfiles-ehcache-core-spi-test %files impl -f .mfiles-ehcache-impl %files javadoc -f .mfiles-javadoc %license LICENSE NOTICE #%% files management -f .mfiles-ehcache-management %files spi-tester -f .mfiles-ehcache-spi-tester %license LICENSE NOTICE %files transactions -f .mfiles-ehcache-transactions %files xml -f .mfiles-ehcache-xml %doc xml/README.html %changelog * Wed Nov 02 2016 gil cattaneo 3.1.3-1 - update to 3.1.3 * Thu Aug 25 2016 gil cattaneo 3.0.3-1 - initial rpm