Skip to content

Commit

Permalink
Merge branch 'spring-projects:main' into spring-projectsGH-2478
Browse files Browse the repository at this point in the history
  • Loading branch information
BenEfrati authored Dec 18, 2024
2 parents 2e93718 + d139c98 commit cb99835
Show file tree
Hide file tree
Showing 164 changed files with 1,213 additions and 911 deletions.
49 changes: 0 additions & 49 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,57 +28,8 @@ updates:
- org.hibernate.validator:hibernate-validator
- org.apache.httpcomponents.client5:httpclient5
- org.awaitility:awaitility
- org.xerial.snappy:snappy-java
- org.lz4:lz4-java
- com.github.luben:zstd-jni

- package-ecosystem: gradle
target-branch: 3.1.x
directory: /
schedule:
interval: weekly
day: saturday
ignore:
- dependency-name: '*'
update-types:
- version-update:semver-major
- version-update:semver-minor
open-pull-requests-limit: 10
labels:
- 'type: dependency-upgrade'
groups:
development-dependencies:
update-types:
- patch
patterns:
- com.gradle.*
- com.github.spotbugs
- io.spring.*
- org.ajoberstar.grgit
- org.antora
- io.micrometer:micrometer-docs-generator
- com.willowtreeapps.assertk:assertk-jvm
- org.hibernate.validator:hibernate-validator
- org.apache.httpcomponents.client5:httpclient5
- org.awaitility:awaitility
- org.xerial.snappy:snappy-java
- org.lz4:lz4-java
- com.github.luben:zstd-jni

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: saturday
labels:
- 'type: task'
groups:
development-dependencies:
patterns:
- '*'

- package-ecosystem: github-actions
target-branch: 3.1.x
directory: /
schedule:
interval: weekly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/announce-milestone-planning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:

jobs:
announce-milestone-planning:
uses: spring-io/spring-github-workflows/.github/workflows/spring-announce-milestone-planning.yml@main
uses: spring-io/spring-github-workflows/.github/workflows/spring-announce-milestone-planning.yml@v5
secrets:
SPRING_RELEASE_CHAT_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }}
2 changes: 1 addition & 1 deletion .github/workflows/auto-cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ on:

jobs:
cherry-pick-commit:
uses: spring-io/spring-github-workflows/.github/workflows/spring-cherry-pick.yml@v3
uses: spring-io/spring-github-workflows/.github/workflows/spring-cherry-pick.yml@v5
secrets:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/backport-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
backport-issue:
uses: spring-io/spring-github-workflows/.github/workflows/spring-backport-issue.yml@v3
uses: spring-io/spring-github-workflows/.github/workflows/spring-backport-issue.yml@v5
secrets:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
37 changes: 30 additions & 7 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,33 @@ concurrency:

jobs:
build-snapshot:
uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@v3
with:
gradleTasks: ${{ github.event_name == 'schedule' && '--rerun-tasks' || '' }}
secrets:
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
runs-on: ubuntu-latest
name: CI Build SNAPSHOT for ${{ github.ref_name }}
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

steps:
- name: Start RabbitMQ
uses: namoshek/rabbitmq-github-action@v1
with:
ports: '5672:5672 15672:15672 5552:5552'
plugins: rabbitmq_stream,rabbitmq_management,rabbitmq_delayed_message_exchange,rabbitmq_consistent_hash_exchange

- uses: actions/checkout@v4
with:
show-progress: false

- name: Checkout Common Repo
uses: actions/checkout@v4
with:
repository: spring-io/spring-github-workflows
path: spring-github-workflows
show-progress: false

- name: Build and Publish
timeout-minutes: 30
uses: ./spring-github-workflows/.github/actions/spring-artifactory-gradle-build
with:
gradleTasks: ${{ github.event_name == 'schedule' && '--rerun-tasks' || '' }}
artifactoryUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
artifactoryPassword: ${{ secrets.ARTIFACTORY_PASSWORD }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ permissions:
jobs:
dispatch-docs-build:
if: github.repository_owner == 'spring-projects'
uses: spring-io/spring-github-workflows/.github/workflows/spring-dispatch-docs-build.yml@v3
uses: spring-io/spring-github-workflows/.github/workflows/spring-dispatch-docs-build.yml@v5
2 changes: 1 addition & 1 deletion .github/workflows/merge-dependabot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
merge-dependabot-pr:
permissions: write-all

uses: spring-io/spring-github-workflows/.github/workflows/spring-merge-dependabot-pr.yml@main
uses: spring-io/spring-github-workflows/.github/workflows/spring-merge-dependabot-pr.yml@v5
with:
mergeArguments: --auto --squash
autoMergeSnapshots: true
2 changes: 1 addition & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ on:

jobs:
build-pull-request:
uses: spring-io/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@v3
uses: spring-io/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@v5
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
contents: write
issues: write

uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-release.yml@main
uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-release.yml@v5
secrets:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/verify-staged-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ on:


env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}

Expand Down
65 changes: 29 additions & 36 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ buildscript {
plugins {
id 'base'
id 'idea'
id 'org.ajoberstar.grgit' version '5.2.2'
id 'org.ajoberstar.grgit' version '5.3.0'
id 'io.spring.nohttp' version '0.0.11'
id 'io.spring.dependency-management' version '1.1.6' apply false
id 'org.antora' version '1.0.0'
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
id 'com.github.spotbugs' version '6.0.21'
id 'io.freefair.aggregate-javadoc' version '8.6'
id 'com.github.spotbugs' version '6.0.26'
id 'io.freefair.aggregate-javadoc' version '8.10.2'
}

description = 'Spring AMQP'
Expand All @@ -48,32 +48,28 @@ ext {
assertjVersion = '3.26.3'
assertkVersion = '0.28.1'
awaitilityVersion = '4.2.2'
commonsCompressVersion = '1.26.2'
commonsHttpClientVersion = '5.3.1'
commonsHttpClientVersion = '5.4.1'
commonsPoolVersion = '2.12.0'
hamcrestVersion = '2.2'
hibernateValidationVersion = '8.0.1.Final'
jacksonBomVersion = '2.17.2'
hamcrestVersion = '3.0'
hibernateValidationVersion = '8.0.2.Final'
jacksonBomVersion = '2.18.2'
jaywayJsonPathVersion = '2.9.0'
junit4Version = '4.13.2'
junitJupiterVersion = '5.11.0'
junitJupiterVersion = '5.11.4'
kotlinCoroutinesVersion = '1.8.1'
log4jVersion = '2.23.1'
logbackVersion = '1.5.7'
lz4Version = '1.8.0'
micrometerDocsVersion = '1.0.3'
micrometerVersion = '1.14.0-SNAPSHOT'
micrometerTracingVersion = '1.4.0-SNAPSHOT'
mockitoVersion = '5.12.0'
rabbitmqStreamVersion = '0.15.0'
rabbitmqVersion = '5.21.0'
reactorVersion = '2024.0.0-SNAPSHOT'
snappyVersion = '1.1.10.6'
springDataVersion = '2024.0.3'
springRetryVersion = '2.0.8'
springVersion = '6.2.0-SNAPSHOT'
testcontainersVersion = '1.19.8'
zstdJniVersion = '1.5.6-5'
log4jVersion = '2.24.3'
logbackVersion = '1.5.12'
micrometerDocsVersion = '1.0.4'
micrometerVersion = '1.14.2'
micrometerTracingVersion = '1.4.1'
mockitoVersion = '5.14.2'
rabbitmqStreamVersion = '0.18.0'
rabbitmqVersion = '5.22.0'
reactorVersion = '2024.0.1'
springDataVersion = '2024.1.1'
springRetryVersion = '2.0.11'
springVersion = '6.2.1'
testcontainersVersion = '1.20.4'

javaProjects = subprojects - project(':spring-amqp-bom')
}
Expand All @@ -83,11 +79,11 @@ antora {
playbook = file('src/reference/antora/antora-playbook.yml')
options = ['to-dir' : project.layout.buildDirectory.dir('site').get().toString(), clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
dependencies = [
'@antora/atlas-extension': '1.0.0-alpha.1',
'@antora/collector-extension': '1.0.0-alpha.3',
'@asciidoctor/tabs': '1.0.0-beta.3',
'@springio/antora-extensions': '1.11.1',
'@springio/asciidoctor-extensions': '1.0.0-alpha.10',
'@antora/atlas-extension': '1.0.0-alpha.2',
'@antora/collector-extension': '1.0.0-beta.3',
'@asciidoctor/tabs': '1.0.0-beta.6',
'@springio/antora-extensions': '1.14.2',
'@springio/asciidoctor-extensions': '1.0.0-alpha.14',
]
}

Expand Down Expand Up @@ -315,7 +311,7 @@ configure(javaProjects) { subproject ->

checkstyle {
configDirectory.set(rootProject.file("src/checkstyle"))
toolVersion = '10.8.0'
toolVersion = '10.18.2'
}

jar {
Expand Down Expand Up @@ -469,13 +465,10 @@ project('spring-rabbit-stream') {
testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind'
testRuntimeOnly 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
testRuntimeOnly 'com.fasterxml.jackson.module:jackson-module-kotlin'
testRuntimeOnly "org.apache.commons:commons-compress:$commonsCompressVersion"
testRuntimeOnly "org.xerial.snappy:snappy-java:$snappyVersion"
testRuntimeOnly "org.lz4:lz4-java:$lz4Version"
testRuntimeOnly "com.github.luben:zstd-jni:$zstdJniVersion"

testImplementation "org.testcontainers:rabbitmq"
testImplementation "org.testcontainers:junit-jupiter"
testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
testImplementation 'org.apache.logging.log4j:log4j-slf4j-impl'
testImplementation 'org.springframework:spring-webflux'
testImplementation 'io.micrometer:micrometer-observation-test'
testImplementation 'io.micrometer:micrometer-tracing-bridge-brave'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.2.0-SNAPSHOT
version=3.2.2-SNAPSHOT
org.gradle.jvmargs=-Xms512m -Xmx4g -Dfile.encoding=UTF-8
org.gradle.daemon=true
org.gradle.caching=true
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ pluginManagement {
}

plugins {
id 'com.gradle.develocity' version '3.17.6'
id 'io.spring.develocity.conventions' version '0.0.20'
id 'io.spring.develocity.conventions' version '0.0.22'
}

rootProject.name = 'spring-amqp-dist'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,7 @@
* Base class for builders supporting arguments.
*
* @author Gary Russell
* @author Ngoc Nhan
* @since 1.6
*
*/
Expand All @@ -36,7 +37,7 @@ public abstract class AbstractBuilder {
*/
protected Map<String, Object> getOrCreateArguments() {
if (this.arguments == null) {
this.arguments = new LinkedHashMap<String, Object>();
this.arguments = new LinkedHashMap<>();
}
return this.arguments;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,6 @@
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;


import org.springframework.lang.Nullable;
import org.springframework.util.Assert;

Expand All @@ -34,20 +33,21 @@
*
* @author Gary Russell
* @author Christian Tzolov
* @author Ngoc Nhan
* @since 1.2
*
*/
public abstract class AbstractDeclarable implements Declarable {

private final Lock lock = new ReentrantLock();
private final Lock lock = new ReentrantLock();

private boolean shouldDeclare = true;
private final Map<String, Object> arguments;

private Collection<Object> declaringAdmins = new ArrayList<Object>();
private boolean shouldDeclare = true;

private boolean ignoreDeclarationExceptions;

private final Map<String, Object> arguments;
private Collection<Object> declaringAdmins = new ArrayList<>();

public AbstractDeclarable() {
this(null);
Expand All @@ -63,7 +63,7 @@ public AbstractDeclarable(@Nullable Map<String, Object> arguments) {
this.arguments = new HashMap<>(arguments);
}
else {
this.arguments = new HashMap<String, Object>();
this.arguments = new HashMap<>();
}
}

Expand All @@ -73,7 +73,7 @@ public boolean shouldDeclare() {
}

/**
* Whether or not this object should be automatically declared
* Whether this object should be automatically declared
* by any {@code AmqpAdmin}. Default is {@code true}.
* @param shouldDeclare true or false.
*/
Expand Down Expand Up @@ -101,14 +101,14 @@ public void setIgnoreDeclarationExceptions(boolean ignoreDeclarationExceptions)
}

@Override
public void setAdminsThatShouldDeclare(Object... adminArgs) {
Collection<Object> admins = new ArrayList<Object>();
public void setAdminsThatShouldDeclare(@Nullable Object... adminArgs) {
Collection<Object> admins = new ArrayList<>();
if (adminArgs != null) {
if (adminArgs.length > 1) {
Assert.noNullElements(adminArgs, "'admins' cannot contain null elements");
}
if (adminArgs.length > 0 && !(adminArgs.length == 1 && adminArgs[0] == null)) {
admins.addAll(Arrays.asList(adminArgs));
admins = Arrays.asList(adminArgs);
}
}
this.declaringAdmins = admins;
Expand Down
Loading

0 comments on commit cb99835

Please sign in to comment.