%global namedreltag .RELEASE %global namedversion %{version}%{?namedreltag} %global oname spring-amqp # https://bugzilla.redhat.com/show_bug.cgi?id=1231430 %bcond_with jinterface Name: springframework-amqp Version: 1.3.9 Release: 1%{?dist} Summary: Support for Spring programming model with AMQP License: ASL 2.0 URL: http://projects.spring.io/spring-amqp/ # Newer release require springframework >= 4.1.7.RELEASE Source0: https://github.com/spring-projects/spring-amqp/archive/v%{namedversion}.tar.gz # Use gradle Source1: http://repo1.maven.org/maven2/org/springframework/amqp/spring-amqp/%{namedversion}/spring-amqp-%{namedversion}.pom Source2: http://repo1.maven.org/maven2/org/springframework/amqp/spring-erlang/%{namedversion}/spring-erlang-%{namedversion}.pom Source3: http://repo1.maven.org/maven2/org/springframework/amqp/spring-rabbit/%{namedversion}/spring-rabbit-%{namedversion}.pom # rabbitmq-java-client 3.5.x support Patch0: springframework-amqp-1.3.9-amqp-client35.patch BuildRequires: maven-local BuildRequires: mvn(cglib:cglib) BuildRequires: mvn(com.fasterxml.jackson.core:jackson-core) BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) # Use rabbitmq-java-client:3.3.4 BuildRequires: mvn(com.rabbitmq:amqp-client) BuildRequires: mvn(commons-cli:commons-cli) BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(javax.annotation:jsr250-api) BuildRequires: mvn(junit:junit) BuildRequires: mvn(log4j:log4j:1.2.17) BuildRequires: mvn(org.codehaus.jackson:jackson-core-asl) BuildRequires: mvn(org.codehaus.jackson:jackson-mapper-asl) %if %{with jinterface} BuildRequires: mvn(org.erlang.otp:jinterface) %endif BuildRequires: mvn(org.hamcrest:hamcrest-all) BuildRequires: mvn(org.mockito:mockito-core) BuildRequires: mvn(org.springframework:spring-aop) BuildRequires: mvn(org.springframework:spring-beans) BuildRequires: mvn(org.springframework:spring-context) BuildRequires: mvn(org.springframework:spring-core) BuildRequires: mvn(org.springframework:spring-oxm) BuildRequires: mvn(org.springframework:spring-test) BuildRequires: mvn(org.springframework:spring-tx) BuildRequires: mvn(org.springframework.retry:spring-retry) BuildArch: noarch %description The Spring AMQP project applies core Spring concepts to the development of AMQP-based messaging solutions. It provides a "template" as a high-level abstraction for sending and receiving messages. It also provides support for Message driven POJOs with a "listener container". These libraries facilitate management of AMQP resources while promoting the use of dependency injection and declarative configuration. In all of these cases, you will see similarities to the JMS support in the Spring Framework. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{oname}-%{namedversion} find . -name "*.bat" -delete find . -name "*.class" -delete find . -name "*.jar" -delete %patch0 -p1 # This is a dummy POM added just to ease building in the RPM platforms cat > pom.xml << EOF 4.0.0 org.springframework.amqp spring-amqp-parent pom Spring AMQP - Parent %{namedversion} Spring AMQP Parent spring-amqp spring-erlang spring-rabbit EOF cp -p %{SOURCE1} %{oname}/pom.xml %if %{with jinterface} cp -p %{SOURCE2} spring-erlang/pom.xml %else %pom_disable_module spring-erlang %endif cp -p %{SOURCE3} spring-rabbit/pom.xml %pom_add_dep cglib:cglib:3.1:test spring-amqp %pom_add_dep junit:junit:4.11:test spring-amqp %pom_add_dep log4j:log4j:1.2.17:test spring-amqp %pom_add_dep org.hamcrest:hamcrest-all:1.3:test spring-amqp %pom_add_dep org.mockito:mockito-core:1.9.5:test spring-amqp %pom_add_dep org.springframework:spring-test:3.2.9.RELEASE:test spring-amqp %if %{with jinterface} %pom_add_dep commons-cli:commons-cli:1.2:test spring-rabbit %pom_add_dep junit:junit:4.11:test spring-rabbit %pom_add_dep org.hamcrest:hamcrest-all:1.3:test spring-rabbit %pom_add_dep org.mockito:mockito-core:1.9.5:test spring-rabbit %pom_add_dep org.springframework.amqp:spring-erlang:'${project.version}':test spring-rabbit %pom_add_dep org.springframework:spring-test:3.2.9.RELEASE:test spring-rabbit # unreported exception java.util.concurrent.TimeoutException; must be caught or declared to be thrown rm -r spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/CachingConnectionFactoryTests.java \ spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/AbstractConnectionFactoryTests.java \ spring-rabbit/src/test/java/org/springframework/amqp/rabbit/connection/SingleConnectionFactoryTests.java %else rm -r spring-rabbit/src/test/java/* %endif for p in %{oname} \ %if %{with jinterface} spring-erlang \ %endif spring-rabbit; do %pom_xpath_inject "pom:project" "bundle" ${p} %pom_add_plugin org.apache.felix:maven-bundle-plugin ${p} ' true SpringSource ${project.version} bundle-manifest process-classes manifest ' done %mvn_package :%{oname}-parent __noinstall %build %if %{without jinterface} opts="-f" %endif # no test deps spring-erlang %mvn_build $opts -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install %files -f .mfiles %doc src/dist/README.md %license src/dist/apache-license.txt src/dist/notice.txt %files javadoc -f .mfiles-javadoc %license src/dist/apache-license.txt src/dist/notice.txt %changelog * Wed Jun 03 2015 gil cattaneo 1.3.9-1 - update to 1.3.9.RELEASE * Wed Jun 11 2014 gil cattaneo 1.3.4-1 - initial rpm