%global hghash 0f167fd17c8c Name: oscache Version: 2.4.2 Release: 1%{?dist} Summary: High performance J2EE caching solution License: ASL 2.0 Url: https://bitbucket.org/opensymphony/oscache/ Source0: https://bitbucket.org/opensymphony/oscache/get/%{hghash}.tar.gz # add servlet 3.1 apis support Patch0: %{name}-2.4.2-servlet3.1.patch # add junit 4 support Patch1: %{name}-2.4.1-test.patch BuildRequires: maven-local BuildRequires: mvn(commons-logging:commons-logging) BuildRequires: mvn(httpunit:httpunit) BuildRequires: mvn(javax.jms:jms) BuildRequires: mvn(javax.transaction:jta) BuildRequires: mvn(javax.servlet:javax.servlet-api) BuildRequires: mvn(javax.servlet.jsp:javax.servlet.jsp-api) BuildRequires: mvn(junit:junit) BuildRequires: mvn(junitperf:junitperf) BuildRequires: mvn(org.hibernate:hibernate-core:3) BuildRequires: mvn(org.jgroups:jgroups:2) BuildArch: noarch %description OSCache solves fundamental problems for dynamic websites: + Caching Dynamic Content - Dynamic content must often be executed in some form each request, but sometimes that content doesn't change every request. Caching the whole page does not help because sections of the page change every request. OSCache solves this problem by providing a means to cache sections of JSP pages. + Caching Binary Content - Generated images and PDFs can be very costly in terms of server load. OSCache solves this problem through a Servlet 2.3 CachingFilter which can cache any URI (such as an entire page or a generated image/PDF) + Error Tolerance - If one error occurs somewhere on your dynamic page, chances are the whole page will be returned as an error, even if 95%% of the page executed correctly. OSCache solves this problem by allowing you to serve the cached content in the event of an error, and then reporting the error appropriately. %package javadoc Summary: API documentation for %{name} %description javadoc This package contains API documentation for %{name}. %prep %setup -q -n opensymphony-%{name}-%{hghash} # Cleanup find . -name '*.jar' -delete find . -name '*.class' -delete find . -name '*.bat' -delete %patch0 -p0 %patch1 -p0 %pom_remove_plugin :maven-idea-plugin %pom_remove_plugin :maven-site-plugin %pom_remove_plugin :cobertura-maven-plugin %pom_remove_plugin :maven-source-plugin %pom_xpath_remove "pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:executions" %pom_xpath_set "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:source" 1.6 %pom_xpath_set "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:target" 1.6 sed -i "s|pom.url|project.url|" pom.xml # req GroboUtils rm src/test/java/com/opensymphony/oscache/base/TestConcurrency2.java sed -i '/TestConcurrency2/d' src/test/java/com/opensymphony/oscache/base/TestCompleteBase.java %pom_remove_dep groboutils:groboutils-core sed -i "s|listenerList.add(listener.getClass(), listener);|//listenerList.add(listener.getClass(), listener);|" src/java/com/opensymphony/oscache/base/Cache.java sed -i "s|listenerList.remove(listener.getClass(), listener);|//listenerList.remove(listener.getClass(), listener);|" src/java/com/opensymphony/oscache/base/Cache.java sed -i "s|// listenerList.add(CacheEventListener.class, listener);|listenerList.add(CacheEventListener.class, listener);|" src/java/com/opensymphony/oscache/base/Cache.java sed -i "s|// listenerList.remove(CacheEventListener.class, listener);|listenerList.remove(CacheEventListener.class, listener);|" src/java/com/opensymphony/oscache/base/Cache.java %pom_xpath_set "pom:dependency[pom:groupId='javax.servlet']/pom:artifactId" javax.servlet-api %pom_xpath_set "pom:dependency[pom:groupId='javax.servlet']/pom:version" 3.1.0 %pom_add_dep javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b01 %pom_xpath_set "pom:dependency[pom:groupId='org.hibernate']/pom:artifactId" hibernate-core %pom_xpath_set "pom:dependency[pom:groupId='org.hibernate']/pom:version" 3 %pom_remove_dep jgroups:jgroups-all %pom_add_dep org.jgroups:jgroups:2 . "true" %mvn_file :%{name} %{name} %build %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install %files -f .mfiles %doc readme.txt %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Tue May 12 2015 gil cattaneo 2.4.2-1 - update to 2.4.2 * Thu Feb 12 2015 gil cattaneo 2.4.1-2 - adapt to current guideline * Tue May 29 2012 gil cattaneo 2.4.1-1 - initial rpm