Commit Graph

807 Commits

Author SHA1 Message Date
Artem Bilan
cd73b61ffe Upgrade dependencies; prepare for release
* Make `artifactoryPublish` `dependsOn build` to ensure
that artifacts are not deployed until tests pass
2022-04-19 10:25:01 -04:00
Artem Bilan
b64577262b Remove Werror option from JavaDoc config
This option is not available in Java 11 yet
2022-03-28 11:34:16 -04:00
Artem Bilan
6d86a15221 Enforce Java with Gradle options.release = 8
* Add suppressions for JavaDoc warnings
* Fix some tests for Java 17 compatibility
2022-03-28 11:28:43 -04:00
Artem Bilan
675b3b4930 Upgrade dependencies; prepare for release 2022-03-22 14:52:15 -04:00
Artem Bilan
d79c9fdeda Revert JavaDoc options for Java 11 on CI 2022-02-22 11:43:44 -05:00
Artem Bilan
fb05c73969 Upgrade dependencies; prepare for release
* Rework `FeedInboundChannelAdapterParserTests` for Java 17 compatibility
2022-02-22 10:54:23 -05:00
Artem Bilan
6ae6f343c8 Fix typo in the build.gradle 2022-01-18 12:15:54 -05:00
Artem Bilan
b2586241f8 Upgrade dependencies; prepare for release 2022-01-18 12:12:56 -05:00
Artem Bilan
30622b285c Improve Kotlin DSL
* Add missed factories, introduced recently into Java DSL
* Add `@IntegrationDsl` - a Kotlin-specific `@DslMarker` annotation
to mark classes (including Java) which are used in Kotlin DSL as a builder pattern.
This way the scope of the builder is honored and IDE does not suggest functions from
higher lambda for builder
* Fix `element-list` reference for Dokka plugin configuration from the respective module
2021-12-21 17:21:31 -05:00
Artem Bilan
9741f7fc5f Upgrade dependencies including Gradle
* Fix warnings about doc tasks
2021-12-20 15:02:39 -05:00
Artem Bilan
9b5ebaad8b Fix MySqlContainerTest for compatibility
* Upgrade Gradle to `7.3.1`
* Upgrade Log4j to `2.16.0`
2021-12-14 14:42:11 -05:00
Artem Bilan
b424cbe171 Quote CONDITION whenever necessary for JDBC
SO: https://stackoverflow.com/questions/70286480/how-can-spring-integration-5-5-x-use-mysql-as-message-store

Turns out the condition word is reserved in many SQL DB vendors, e.g.:
https://dev.mysql.com/doc/refman/8.0/en/keywords.html

* Fix SQL scripts for quoting `CONDITION` column name for
those vendors which have it as a reserved word
* Fix `JdbcMessageStore` to have a `CONDITION` quoted to `""` by default and
replaced to "`" for MySQL
* Add `MySqlContainerTest` to test against MySQL Docker container
* Looks like quoted identifiers work well even if they are not reserved words in the SQL vendor
2021-12-14 14:17:44 -05:00
Artem Bilan
adb52baa95 Upgrade Dokka plugin to 1.5.30 for Gradle 7.3 2021-11-17 14:43:04 -05:00
Artem Bilan
f678514054 Upgrade dependencies; prepare for release 2021-11-16 14:48:42 -05:00
Artem Bilan
1341a457f0 Upgrade dependencies 2021-10-18 17:30:12 -04:00
Artem Bilan
a03af081af Upgrade to Gradle 6.9.1; fork JavaCompile
Attempt to rely on the forked process for compilation
according these docs: https://docs.gradle.org/current/userguide/performance.html#compiler_daemon
2021-10-18 11:24:31 -04:00
Artem Bilan
e7c0d8dafa GH-3432: Add MQTT v5 channel adapters (#3639)
* GH-3432: Add MQTT v5 channel adapters

Fixes https://github.com/spring-projects/spring-integration/issues/3432

* Add `optional` dependency for `org.eclipse.paho:org.eclipse.paho.mqttv5.client`
* Add `MqttProtocolErrorEvent` and emit it from the `mqttErrorOccurred()` callback of the MQTT v5 client
* Add `MqttHeaderMapper` since MQTT v5 has introduced user properties pair to transfer over the protocol
* Add `Mqttv5PahoMessageHandler` as one more extension of the `AbstractMqttMessageHandler`
* Add more convenient `MqttHeaders` constants for easier headers mapping configuration
* Ensure via `Mqttv5BackToBackTests` that MQTT v5 is supported by the provided components
* Change `pr-build-workflow.yml` to use `eclipse-mosquitto` container for testing all the MQTT interactions
* Change `cyrilix/rabbitmq-mqtt` service to the `rabbitmq:management` since RabbitMQ does not support MQTT v5

* * Handle manual acks
* Add `Mqttv5PahoMessageDrivenChannelAdapter.persistence` property

* * Add documentation
* Add `MosquittoContainerTest` for TestContainers support with Mosquitto image

* Fix language in the docs after review

Co-authored-by: Gary Russell <grussell@vmware.com>

Co-authored-by: Gary Russell <grussell@vmware.com>
2021-10-06 11:38:52 -04:00
Artem Bilan
fe57fd281c Checkstyle changes
* Upgrade to Checkstyle 9.0
* apply some JavaDocs rules
* Fix JavaDocs rules violations
* Some other minor clean up in the affected classes
2021-09-28 11:55:25 -04:00
Artem Bilan
3bfabb92ee Upgrade dependencies; prepare for release 2021-09-21 12:41:00 -04:00
Artem Bilan
0fb64f1762 Upgrade to Kotlin 1.5
* To align with the rest of Spring portfolio, based on Spring Framework 5.3.x generation,
it is better to upgrade to the Kotlin version supported by SF
* Fix  `ClassUtils.isLambda()` to treat `$inlined$` classes as Kotlin lambdas and let
Java DSL to delegate to the `LambdaMessageProcessor` for better expected type handling.
Looks like Kotlin does not carry type info in its lambdas anymore (at least for functions).
* Add `-parameters` to the compiler args for possible method argument names discovery.
Essentially realign with the rest of portfolio
* Fix Kotlin tests for deprecated API
2021-09-13 16:46:05 -04:00
Artem Bilan
39599f82db Update dependencies; prepare for release 2021-08-17 12:11:29 -04:00
Artem Bilan
ed143ba790 Upgrade dependencies; prepare for release 2021-07-20 11:45:53 -04:00
Artem Bilan
3cf1d35d52 Fix CORS registration for IntGraphController
We fail with `NoClassDefFoundError` when we use `@EnableIntegrationGraphController`
in WebFlux env without Spring MVC.
Another issue that we don't register CORS for WebFlux

* Extract top-level package protected classes for MVC and WebFlux to register CORS
in the appropriate environment according classpath
* Adjust `HttpIntegrationConfigurationInitializer` and `WebFluxIntegrationConfigurationInitializer`
for native compatibility
* Add `@Indexed` for `@MessagingGateway` for indexer support in Spring Boot and Spring Native

**Cherry-pick to `5.4.x` & `5.3.x`**
2021-07-01 14:44:03 -04:00
Gary Russell
76f77ccd2c GH-3584: Support spring-amqp 2.3.x and 2.4.x 2021-06-24 14:48:01 -04:00
Artem Bilan
19e53a9343 Upgrade dependencies; prepare for release
* Migrate `MBeanTreePollingChannelAdapterParserTests` to JUnit 5
2021-06-23 13:08:57 -04:00
Gary Russell
95fce11b0a GH-3573: Add ConsumerRecord(s) to ConversionExcep.
Resolves https://github.com/spring-projects/spring-integration/issues/3573
2021-06-03 12:47:19 -04:00
Artem Bilan
45ef6a8067 Upgrade to Spring WS 3.1.1 2021-05-18 14:53:21 -04:00
Artem Bilan
0f1e9aaf2b Some docs clean up; prepare for release 2021-05-18 13:53:45 -04:00
Alexander Pinske
996daca228 GH-3451: Use GreenMail for testing instead
Fixes https://github.com/spring-projects/spring-integration/issues/3451

The GreenMail provides a comprehensive support for e-mail scenarios
testing.

* Use GreenMail instead our own `TestMailServer` for better and broader
support
* Convert SmtpTests and Pop3Tests to GreenMail
* Document that Pop3MailReceiver does not support autoCloseFolder=false
* Pop3MailReceiver uses `folder.getMessageCount()` to determine if there
are new messages.
This count only gets updated when opening the folder.
* Use GreenMail for remaining mail tests
* convert MailTests and ImapMailReceiverTests to GreenMail
* remove duplicate mail dependencies
* route com.sun.mail logging to log4j (via jul and slf4j)
2021-05-18 12:40:46 -04:00
Artem Bilan
13005dfdcd Upgrade dependencies 2021-05-17 14:32:26 -04:00
Artem Bilan
e17f267c31 INT-2436: JMS channel: bean name for container (#3565)
JIRA: https://jira.spring.io/browse/INT-2436

The `JmsChannelFactoryBean` creates a `ListenerContainer` internally
without any `beanName` propagation.
When we rely on a default internal `Executor`, it is created with a
default thread name prefix for all the JMS channel instances.
It cause a confusion in logs

* Set `beanName` for the internal `ListenerContainer` to `this.beanName + ".container"`
making its connection with a channel it is associated with and unique thread name prefix
* Comment out `allWarningsAsErrors = true` in `build.gradle` for deprecated Kotlin
language version `1.3`.
Otherwise IDEA doesn't want to build project
2021-05-13 16:00:24 -04:00
Artem Bilan
8fd07b1a0c Revert Spring deps to SNAPSHOTs
* Optimize `InboundOneWayErrorTests` to not close ctx after each test.
Probably will affect ActiveMQ connection to avoid a race condition
when it is not started yet, but we produce a message
2021-04-15 10:53:41 -04:00
Artem Bilan
344c6bc5a0 Upgrade to S-WS-3.1.0-RC1, prepare for release 2021-04-14 21:47:13 -04:00
Artem Bilan
e901c89fef Fix Cyclomatic Complexity in Splitter
* Upgrade some dependencies
* Migrate `SplitterIntegrationTests` to JUnit 5
2021-04-14 13:50:00 -04:00
Artem Bilan
35fd9c5809 GH-3533: Register WebSocket endpoints at runtime (#3548)
* GH-3533: Register WebSocket endpoints at runtime

Fixes https://github.com/spring-projects/spring-integration/issues/3533

* Rework `WebSocketIntegrationConfigurationInitializer` to register beans functional way
to avoid reflection for Spring Native support
* Move `IntegrationServletWebSocketHandlerRegistry` into a separate file for better readability
* Implement `DestructionAwareBeanPostProcessor` for `IntegrationServletWebSocketHandlerRegistry`
to track runtime bean registrations and removals
* Introduce an `IntegrationDynamicWebSocketHandlerMapping` to manage runtime mapping
registrations and removals
* Add `servlet-api` dependency into `websocket` to be able to compile an
`IntegrationDynamicWebSocketHandlerMapping`
* Fix typo in the exception message of the `StandardIntegrationFlowRegistration`
* Start dynamically added beans together with associated `IntegrationFlow` in the
`StandardIntegrationFlowContext`
* Document new feature

* * Fix language in docs
* Don't start those `SmartLifecycle`s together with a dynamic flow
which are not `isAutoStartup()`

* * Fix `TomcatWebSocketTestServer` to configure servlet for `loadOnStartup = 1`
* Fix `WebSocketDslTests` to make `clientWebSocketContainer.setAutoStartup(true)`
2021-04-13 17:36:01 -04:00
Artem Bilan
aa32270c5b GH-3541: Properly guard when no json-path in CP (#3542)
Fixes https://github.com/spring-projects/spring-integration/issues/3541

* Fix `DefaultConfiguringBeanFactoryPostProcessor` to check for `jsonPath` bean
a `com.jayway.jsonpath.JsonPath` on CP instead of `JsonPathUtils`
which is always there since it is a part of `spring-integration-core`
* Remove `json-path` and `jackson-databind` from tests classpath
to be sure that we have coverage for the mentioned above option classpath entries
* Add `json-path` and `jackson-databind` into test classpath whenever it is necessary
2021-04-09 11:57:29 -04:00
Artem Bilan
df62147f5d Fix new Sonar smells 2021-04-07 11:37:05 -04:00
Artem Bilan
3f0c57894b GH-3502: More refactoring to avoid reflection (#3532)
* GH-3502: More refactoring to avoid reflection

Fixes https://github.com/spring-projects/spring-integration/issues/3502

* Move `ChannelInitializer` bean registration into an `AbstractIntegrationNamespaceHandler` -
it was never used for annotations and Java DSL...
* Rework `IntegrationFlows.fromSupplier()` to call a provided `Supplier` directly -
not via reflection in the `MethodInvokingMessageSource`
* Resolve new Sonar smells
* Rework `EndpointSpec` to accept an expected factory bean instance via ctor arg
instead of reflection
* Rework `Jackson2JsonObjectMapper` to use well-known module instances directly -
not via reflection from their class names

* * Revert `DefaultMethodInvokingMethodInterceptor.methodHandleCache` property definition wrap
2021-04-06 10:06:07 -04:00
Artem Bilan
50ce72884b Make Kotlin language as 1.3 for SF compatibility
* Fix Checkstyle violation
* Bring back SNAPSHOT versions for Spring deps
2021-03-26 13:05:48 -04:00
Artem Bilan
6eb0ff1f32 Upgrade dependencies; prepare for release 2021-03-17 17:44:58 -04:00
Artem Bilan
f07c44ba2d Add Publish Unit Test Results to GH Actions
* Upgrade dependencies
* Fix repos to not use superset to fail for
non-authorized artifacts

* * Revert Dokka plugin - too much JCenter deps
* Add `if: always()` for Test Results in GH Actions

* Add `https://repo.spring.io/release` for docs

* * Use `upload-artifact` action instead -
the `publish-unit-test-result-action` doesn't capture against PRs:
https://github.com/EnricoMi/publish-unit-test-result-action#support-fork-repositories
* `retention-days: 3`
2021-03-16 17:27:01 -04:00
Artem Bilan
f200849eda Move deps back to SNAPSHOTs
* Increase a `remoteTimeout` for `IpIntegrationTests.testCloseStream()`
2021-02-23 14:06:57 -05:00
Artem Bilan
6682c7db57 Increase JVM heap for test and HeapDumpOnOOMError 2021-02-23 12:30:03 -05:00
Artem Bilan
d1438e8a74 Upgrade dependencies; prepare for release
* Clean up code style in Gradle configs
* Fix JavaDoc errors
* Make JUnit 4 as `optional` dependency for `spring-integration-test-support`
* Remove redundant `javax.activation-api` from some modules
2021-02-17 16:49:52 -05:00
Artem Bilan
b1cb9069fe Add MongoDbMessageSource UPDATE option (#3493)
* Add MongoDbMessageSource UPDATE option

* Extract `AbstractMongoDbMessageSource` with common options and methods
for both `MongoDbMessageSource` and `ReactiveMongoDbMessageSource`
* Add an `updateExpression` option into MongoDb source implementations
* Implement respective `update` logic after fetching the data from the collection
* Cover both reactive and blocking updates with tests
* Add `MongoDbMessageSourceSpec` into Java DSL for MongoDb channel adapters
* Expose an `update` XML attribute for the `<int-mongo:inbound-channel-adapter>`
* Upgrade MongoDb driver for latest Spring Data compatibility
* Document a new feature
* Upgrade `mongodb.adoc` for code block switch whenever it is appropriate

* * Add a Kotlin sample for `MongoDb.outboundGateway()` DSL

* Apply suggestions from code review

Co-authored-by: Gary Russell <grussell@vmware.com>

Co-authored-by: Gary Russell <grussell@vmware.com>
2021-02-16 16:46:45 -05:00
Artem Bilan
f940196c97 Gradle config clean up
* Move all the docs related configuration into a `docs.gradle`
* Move `publish-maven.gradle` into a `/gradle` dir for consistency
* Upgrade to Kotlin `1.4.30`
* Remove redundant `repository.apache.org` since we don't manage direct dependency for Kafka Client
* Upgrade to Gradle `6.8.2`
2021-02-08 16:18:56 -05:00
Gary Russell
138695be16 GH-3490: Initial Commit for block-switch Doc Plugin
Resolves https://github.com/spring-projects/spring-integration/issues/3490

- also fix double import of `jmx.adoc`
- also fix `redis.adoc`

* Remove redundant repo in `docs.gradle`
* Use `stylesheet.css` for `asciidoctorj` plugin config
* Fix `stylesheet.css` to import `spring.css` from the same dir
since they both are copied over there into the same dir
* Fix link for JMX chapter from the `metrics.adoc`
* Fix some inconsistency in the `amqp.adoc`
2021-02-08 14:48:35 -05:00
Artem Bilan
8bff67425d Improve Sonar and Jacoco plugin configurations 2021-01-29 17:23:57 -05:00
Artem Bilan
fa4957e545 Move Spring dependencies to SNAPSHOTs 2021-01-25 17:02:58 -05:00
Artem Bilan
58ce578a10 Downgrade back to Sonar plugin 2.8
Looks the latest plugin is not compatible with latest Sonar server -
it doesn't trigger Coverage
2021-01-21 12:39:15 -05:00