diff --git a/rabbitmq-codegen-3.8.9.tar.gz b/rabbitmq-codegen-3.8.9.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..226792847b094bc1b36c02b0d26d71270c1da698 Binary files /dev/null and b/rabbitmq-codegen-3.8.9.tar.gz differ diff --git a/rabbitmq_v3_6_5.tar.gz b/rabbitmq-java-client-5.18.0.tar.gz similarity index 48% rename from rabbitmq_v3_6_5.tar.gz rename to rabbitmq-java-client-5.18.0.tar.gz index 4ae92cd4872517db576f86ad7b24924fe86fe1e3..8c4c8b2e5824d4b6a8c2b0093f570b1a85d5c29b 100644 Binary files a/rabbitmq_v3_6_5.tar.gz and b/rabbitmq-java-client-5.18.0.tar.gz differ diff --git a/rabbitmq-java-client.spec b/rabbitmq-java-client.spec index 554766cbcdd1f099691f24c76fdfe3d5b940db27..c67646ed4358e6b055f5e4f447256db111e82d42 100644 --- a/rabbitmq-java-client.spec +++ b/rabbitmq-java-client.spec @@ -1,92 +1,76 @@ -%bcond_without buildtex -%global jarname rabbitmq-client -%global failjava true -%global failjunit no -Name: rabbitmq-java-client -Version: 3.6.5 -Release: 3 -Summary: Java Advanced Message Queue Protocol client library -License: Apache-2.0 and GPL-2.0-or-later and MPL-1.1 -URL: http://www.rabbitmq.com/java-client.html -Source0: https://github.com/rabbitmq/rabbitmq-java-client/archive/refs/tags/rabbitmq_v3_6_5.tar.gz -Source1: https://github.com/rabbitmq/rabbitmq-codegen/archive/refs/tags/rabbitmq_v3_6_5.zip -BuildArch: noarch -BuildRequires: maven-local mvn(commons-cli:commons-cli) mvn(commons-io:commons-io) mvn(junit:junit) -BuildRequires: ant ant-junit java-headless python3-devel >= 2.6 python3-simplejson -%if 0%{?with buildtex} -BuildRequires: texi2html texlive-base -%endif -BuildRequires: rabbitmq-server hostname procps-ng -Suggests: rabbitmq-server -Suggests: activemq +%global codegen_version 3.8.9 +Name: rabbitmq-java-client +Version: 5.18.0 +Release: 1 +Summary: Java AMQP client library +License: Apache-2.0 AND GPL-2.0-or-later AND MPL-2.0 +Group: Development/Libraries/Java +URL: https://www.rabbitmq.com/java-client.html +Source0: https://github.com/rabbitmq/rabbitmq-java-client/archive/refs/tags/v%{version}.tar.gz#/rabbitmq-java-client-%{version}.tar.gz +Source1: https://github.com/rabbitmq/rabbitmq-codegen/archive/refs/tags/v%{codegen_version}.tar.gz#/rabbitmq-codegen-%{codegen_version}.tar.gz +BuildRequires: fdupes +BuildRequires: maven-local +BuildRequires: python3 +BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) +BuildRequires: mvn(org.slf4j:slf4j-api) +BuildArch: noarch + %description -The library allows Java code to interface to AMQP servers. -Please see the specification page for more information on AMQP -inter-operation and standards-conformance -You will need an AMQP server, such as our very own RabbitMQ server, -to use with the client library. - -%package doc -Summary: Documentation for %{name} -Requires: %{name} = %{version}-%{release} -%description doc -This package contains additional documentation for %{name}. +The RabbitMQ Java client library allows Java code to interface to AMQP servers. %package javadoc -Summary: Javadoc for %{name} +Summary: API documentation for %{name} +Group: Documentation/HTML + %description javadoc -This package contains javadoc for %{name}. +API documentation for %{name}. %prep -%setup -q -n %{name}-rabbitmq_v3_6_5 -cp %{SOURCE1} . -unzip rabbitmq_v3_6_5.zip -mv rabbitmq-codegen-rabbitmq_v3_6_5 codegen -find . -name "*.bat" -delete -find . -name "*.class" -delete -find . -name "*.jar" -print -delete -rm Makefile -ln -sf $(build-classpath commons-cli) lib/ -ln -sf $(build-classpath commons-io) lib/ -ln -sf $(build-classpath junit) lib/ -sed -i "s|, bundlor.do||" build.xml -sed -i "s|, test-bundlor.do||" build.xml -sed -i 's,\(\"haltOnFailureJunit\" value=\"\).*\",\1%{failjunit}\",' build.xml -sed -i 's,\(\"haltOnFailureJava\" value=\"\).*\",\1%{failjava}\",' build.xml -%mvn_file com.rabbitmq:amqp-client %{name} %{jarname} amqp-client +%setup -q -a1 + +%pom_remove_dep org.junit:junit-bom + +# Exclude optional dependencies +%pom_remove_dep io.dropwizard.metrics:metrics-core +rm -f src/main/java/com/rabbitmq/client/impl/StandardMetricsCollector.java + +%pom_remove_dep io.micrometer:micrometer-core +rm -f src/main/java/com/rabbitmq/client/impl/MicrometerMetricsCollector.java +rm -rf src/main/java/com/rabbitmq/client/observation/micrometer + +%pom_remove_dep io.opentelemetry:opentelemetry-api +rm -f src/main/java/com/rabbitmq/client/impl/OpenTelemetryMetricsCollector.java + +%pom_remove_plugin :groovy-maven-plugin +%pom_remove_plugin :maven-source-plugin +%pom_remove_plugin :keytool-maven-plugin +%pom_xpath_remove pom:project/pom:build/pom:extensions %build -%ant -Dimpl.version=%{version} -Dpython.bin=%{__python3} maven-bundle -cd doc/channels -%if 0%{?with buildtex} -find . -name \*.tex -print -exec 'texi2html {} ; pdflatex {}' \; -delete -%endif -find . -not -name channels.\* -delete +export PYTHONPATH=rabbitmq-codegen-%{codegen_version} +python3 ./codegen.py header ${PYTHONPATH}/amqp-rabbitmq-0.9.1.json src/main/java/com/rabbitmq/client/AMQP.java +python3 ./codegen.py body ${PYTHONPATH}/amqp-rabbitmq-0.9.1.json src/main/java/com/rabbitmq/client/impl/AMQImpl.java +%{mvn_build} -f -- \ + -Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \ + -DskipTests=true %install -%mvn_artifact build/bundle/amqp-client-%{version}.pom build/bundle/amqp-client-%{version}.jar -%mvn_install -J build/doc/api - -%check -ant test-jar -ant test-server -export RABBITMQ_LOG_BASE=. -export RABBITMQ_MNESIA_BASE=. -%{_prefix}/lib/rabbitmq/bin/rabbitmq-server start -detached -pgrep -cf rabbitmq_server && ant test-client -pkill -f rabbitmq_server ||: +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles -%license LICENSE* -%doc README* - -%files doc -%doc doc/* +%license LICENSE LICENSE-APACHE2 LICENSE-GPL2 LICENSE-MPL-RabbitMQ +%doc README.md %files javadoc -f .mfiles-javadoc -%license LICENSE* +%license LICENSE LICENSE-APACHE2 LICENSE-GPL2 LICENSE-MPL-RabbitMQ %changelog +* Tue Sep 23 2025 wang kun - 5.18.0-1 +- Upgrade to 5.18.1 + * Mon Nov 14 2022 Ge Wang - 3.6.5-3 - bring source file into correspondence with described in spec file diff --git a/rabbitmq_v3_6_5.zip b/rabbitmq_v3_6_5.zip deleted file mode 100644 index 5e8018851b2a2cf03987eb2dbf31201a26ec5a62..0000000000000000000000000000000000000000 Binary files a/rabbitmq_v3_6_5.zip and /dev/null differ