%global short_name commons-jcs %global namedreltag -beta-1 %global namedversion %{version}%{?namedreltag} # Unavailable deps %bcond_with jcache Name: apache-commons-jcs Version: 2.0 Release: 0.1.beta.1%{?dist} Summary: Apache Commons Java Caching System License: ASL 2.0 URL: http://commons.apache.org/proper/commons-jcs/ Source0: http://www.apache.org/dist/commons/jcs/source/%{short_name}-dist-%{namedversion}-src.tar.gz # Support for servlet 3.1 apis Patch0: apache-commons-jcs-2.0-beta-1-servlet.patch BuildRequires: maven-local BuildRequires: mvn(commons-dbcp:commons-dbcp) BuildRequires: mvn(commons-httpclient:commons-httpclient) BuildRequires: mvn(commons-logging:commons-logging) BuildRequires: mvn(commons-pool:commons-pool) BuildRequires: mvn(hsqldb:hsqldb:1) BuildRequires: mvn(javax.servlet:javax.servlet-api) BuildRequires: mvn(junit:junit) BuildRequires: mvn(log4j:log4j:1.2.17) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.commons:commons-collections4) BuildRequires: mvn(org.apache.commons:commons-parent:pom:) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin) BuildRequires: mvn(org.apache.velocity:velocity-tools) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.codehaus.mojo:buildnumber-maven-plugin) BuildRequires: mvn(org.hamcrest:hamcrest-library) %if %{with jcache} BuildRequires: mvn(javax.inject:javax.inject) BuildRequires: mvn(org.apache.commons:commons-lang3) BuildRequires: mvn(org.apache.derby:derby) # https://bugzilla.redhat.com/show_bug.cgi?id=1276625 BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jcache_1.0_spec) BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jcdi_1.0_spec) BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jpa_3.0_spec) BuildRequires: mvn(org.apache.geronimo.specs:specs:pom:) BuildRequires: mvn(org.apache.openjpa:openjpa-kernel) BuildRequires: mvn(org.apache.openwebbeans:openwebbeans-impl) >= 1.2.6 BuildRequires: mvn(org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec) %endif %if 0 # tck-tests deps BuildRequires: mvn(javax.cache:app-domain:1.0.0) BuildRequires: mvn(javax.cache:cache-tests:1.0.0) BuildRequires: mvn(javax.cache:cache-tests::tests:) BuildRequires: mvn(javax.cache:test-domain:1.0.0) %endif BuildArch: noarch %description Apache Commons JCS is a distributed caching system written in Java. It is intended to speed up applications by providing a means to manage cached data of various dynamic natures. Like any caching system, JCS is most useful for high read, low put applications. Latency times drop sharply and bottlenecks move away from the database in an effectively cached system. %package core Summary: Apache Commons JCS :: Core %description core Apache Commons JCS :: Core. %if %{with jcache} %package jcache Summary: Apache Commons JCS :: JCache %description jcache Apache Commons JCS :: JCache. %package jcache-extras Summary: Apache Commons JCS :: JCache Extras %description jcache-extras Apache Commons JCS :: JCache Extras. %package jcache-openjpa Summary: Apache Commons JCS :: JCache OpenJPA %description jcache-openjpa Apache Commons JCS :: JCache OpenJPA. %endif %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{short_name}-dist-%{namedversion}-src find -name "*.class" -delete find -name "*.jar" -print -delete %pom_remove_plugin :maven-javadoc-plugin %pom_remove_plugin :maven-source-plugin %pom_disable_module commons-jcs-dist %pom_disable_module commons-jcs-tck-tests %pom_change_dep -r :hsqldb :hsqldb:1 %pom_change_dep -r javax.servlet:servlet-api javax.servlet:javax.servlet-api:3.1.0 %pom_change_dep -r :log4j :log4j:1.2.17 %if %{without jcache} %pom_disable_module %{short_name}-jcache %pom_disable_module %{short_name}-jcache-extras %pom_disable_module %{short_name}-jcache-openjpa %else %patch0 -p1 %pom_change_dep -r :geronimo-atinject_1.0_spec javax.inject:javax.inject:1 %pom_change_dep -r :geronimo-interceptor_1.1_spec org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec:1.0.2.Final-SNAPSHOT %pom_change_dep -r :geronimo-servlet_3.0_spec javax.servlet:javax.servlet-api:3.1.0 %pom_change_dep -r :geronimo-jpa_2.0_spec :geronimo-jpa_3.0_spec:1.1.1 %pom_change_dep -r org.apache.openjpa:openjpa :openjpa-kernel:2.4.0 %mvn_package :%{short_name}-jcache::cdi: %{short_name}-jcache %mvn_package :%{short_name}-jcache::nocdi: %{short_name}-jcache %endif #%% mvn_package ":{*}::tests:" @1 %build # Test disabled, cause: unsupported surefire plugin configuration %mvn_build -sf %install %mvn_install %files -f .mfiles-%{short_name} %license LICENSE.txt NOTICE.txt %files core -f .mfiles-%{short_name}-core %license LICENSE.txt NOTICE.txt %if %{with jcache} %files jcache -f .mfiles-%{short_name}-jcache %license LICENSE.txt NOTICE.txt %files jcache-extras -f .mfiles-%{short_name}-jcache-extras %license LICENSE.txt NOTICE.txt %files jcache-openjpa -f .mfiles-%{short_name}-jcache-openjpa %license LICENSE.txt NOTICE.txt %endif %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %changelog * Fri Oct 30 2015 gil cattaneo 2.0-0.1.beta.1 - initial rpm