Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spring-wolf-example/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0-rc-4/apache-maven-4.0.0-rc-4-bin.zip
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Maven 4.0.0-rc-4 is not the latest release candidate; rc-5 is available.

Maven 4.0.0-rc-4 aims at being the last release candidate before Maven 4.0.0 GA. However, a new release candidate, 4.0.0-rc-5, was released on Nov 13. Note that a bug has been found in the bean configuration system where field accessibility state is cached globally. This can cause plugin configuration injection to fail when the same configuration field is accessed multiple times or in different contexts during a build. Consider updating to rc-5 or waiting for GA.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spring-wolf-example/.mvn/wrapper/maven-wrapper.properties` at line 3, Update
the Maven wrapper distribution referenced in
.mvn/wrapper/maven-wrapper.properties by changing the distributionUrl value from
apache-maven-4.0.0-rc-4 to apache-maven-4.0.0-rc-5 (i.e., point distributionUrl
to the rc-5 binary), then run the wrapper (mvn -N io.takari:maven:wrapper or
./mvnw -v) to verify the new wrapper works and update any CI cache or
documentation that references the old RC.

2 changes: 1 addition & 1 deletion spring-wolf-example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY ./src src/
RUN --mount=type=bind,source=pom.xml,target=pom.xml \
--mount=type=cache,target=/root/.m2 \
./mvnw package -DskipTests && \
mv target/$(./mvnw help:evaluate -Dexpression=project.artifactId -q -DforceStdout)-$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout).jar target/app.jar
mv target/*.jar target/app.jar
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Wildcard *.jar glob may match multiple files, causing mv to fail.

If the build produces more than one .jar in target/ (e.g., a plain archive alongside the repackaged fat JAR), mv target/*.jar target/app.jar will error out because mv cannot rename multiple source files to a single non-directory destination.

Consider being more specific, e.g., using the artifact name or ensuring only one JAR exists:

Proposed fix
-    mv target/*.jar target/app.jar
+    mv target/springwolf-example-*.jar target/app.jar
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mv target/*.jar target/app.jar
mv target/springwolf-example-*.jar target/app.jar
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spring-wolf-example/Dockerfile` at line 19, The Dockerfile uses an unsafe
glob "mv target/*.jar target/app.jar" which fails if multiple jars are produced;
change this to move a single specific artifact (e.g., the repackaged fat JAR
name such as "*-boot.jar" or your artifactId-version.jar) or programmatically
pick one jar (e.g., select the first non-original/repacked jar and rename it to
app.jar) before moving; update the mv invocation in the Dockerfile (the line
with mv target/*.jar target/app.jar) to reference the chosen single-file
selection method.


FROM package as extract

Expand Down
6 changes: 3 additions & 3 deletions spring-wolf-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.10</version>
<version>4.0.2</version>
<relativePath/>
</parent>

Expand All @@ -19,8 +19,8 @@

<properties>
<java.version>21</java.version>
<spring.boot.version>3.5.10</spring.boot.version>
<maven.plugin.version>3.15.0</maven.plugin.version>
<spring.boot.version>4.0.2</spring.boot.version>
<maven.plugin.version>4.0.0-beta-4</maven.plugin.version>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

maven-compiler-plugin 4.0.0-beta-4 2026 release status

💡 Result:

org.apache.maven.plugins:maven-compiler-plugin:4.0.0-beta-4 has been released (it’s not just planned).

  • Published to Maven Central: the 4.0.0-beta-4/ directory is present with timestamp 2026-01-27. [1]
  • Apache Maven site docs exist for 4.0.0-beta-4 (plugin report page) and the official source-release download page is live. [2][3]
  • Release process evidence: the ASF mail archive shows the maven-compiler-plugin-4.0.0-beta-4 tag activity (Jan 26–27, 2026) and the dev list thread for the [VOTE] release exists. [4][5]

Notes: it’s still a “beta” (pre-final 4.0.0) line, and the Maven 3 compatible line continues separately (e.g., 3.15.0 is also present). [1]

Sources: [1] (repo.maven.apache.org) [2] (maven.apache.org) [3] (maven.apache.org) [4] (mail-archive.com) [5] (mail-archive.com)

Citations:


🌐 Web query:

Apache Maven 4 release status February 2026

💡 Result:

As of February 17, 2026, Apache Maven 4 is not yet GA (generally available). The latest pre-release listed by the Maven project is Maven 4.0.0-rc-5, released November 13, 2025 (requires Java 17). [1][2]

For context, the latest Maven 3 GA release shown is 3.9.12 (released December 13, 2025). [1]

Sources
[1] Maven Releases History (last published 2026-02-17) — https://maven.apache.org/docs/history.html
[2] Apache Maven 4.0.0-rc-5 Release Notes — https://maven.apache.org/docs/4.0.0-rc-5/release-notes.html


🌐 Web query:

maven-compiler-plugin latest version 2026

💡 Result:

As of February 2026, the latest stable release of org.apache.maven.plugins:maven-compiler-plugin is 3.15.0 (released 2026‑02‑01). [1][2]

There is also a newer pre-release for Maven 4: 4.0.0-beta-4 (visible in Maven Central / listings), but it’s not a final/stable release. [2][3]

Maven config (stable):

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.15.0</version>
</plugin>

Sources: [1] [2] [3]


maven-compiler-plugin 4.0.0-beta-4 is a pre-release version not recommended for production.

Maven Compiler Plugin 4.0.0-beta-4 (released January 27, 2026) is a beta version designed for the upcoming Maven 4, which remains under development. As of February 2026, Maven 4 has not reached GA status (latest is 4.0.0-rc-5 from November 2025). Using beta tooling introduces build instability risks.

For production use, prefer the latest stable version 3.15.0 (released February 1, 2026), which is fully compatible with Maven 3.9.12.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spring-wolf-example/pom.xml` at line 23, The POM sets maven.plugin.version to
the pre-release "4.0.0-beta-4" which is not recommended for production; update
the maven.plugin.version property to the stable release "3.15.0" and ensure the
maven-compiler-plugin reference uses that property (search for
maven.plugin.version and the maven-compiler-plugin plugin configuration in the
POM) so the build uses the stable compiler plugin instead of the beta.

<spring.cloud.kafka>5.0.1</spring.cloud.kafka>
<lombok.version>1.18.42</lombok.version>
<springwolf.version>2.0.0</springwolf.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
import io.github.springwolf.bindings.kafka.annotations.KafkaAsyncOperationBinding;
import io.github.springwolf.core.asyncapi.annotations.AsyncListener;
import io.github.springwolf.core.asyncapi.annotations.AsyncOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;
import java.util.function.Consumer;

import static org.springframework.kafka.support.mapping.AbstractJavaTypeMapper.DEFAULT_CLASSID_FIELD_NAME;

@Slf4j
@Component
public class KafkaConsumer implements Consumer<KafkaDto> {
@Component("kafkaConsumer")
public class KafkaConsumer implements Consumer<Message<KafkaDto>> {

@KafkaAsyncOperationBinding(bindingVersion = "1.0.0")
@AsyncListener(operation = @AsyncOperation(
Expand All @@ -31,7 +31,8 @@ public class KafkaConsumer implements Consumer<KafkaDto> {
})
))
@Override
public void accept(KafkaDto kafkaDto) {
public void accept(Message<KafkaDto> message) {
var kafkaDto = message.getPayload();
log.info("receive: {}", kafkaDto.message());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class KafkaProducer {
@KafkaAsyncOperationBinding(bindingVersion = "1.0.0")
public void send(String text) {
KafkaDto message = new KafkaDto(text);
bridge.send("sendMessage-out-0", message);
bridge.send("kafkaV2Producer-out-0", message);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Binding name mismatch — producer will not route to the configured topic.

The StreamBridge.send() call uses "kafkaV2Producer-out-0" but the YAML config at spring-wolf-example/src/main/resources/application.yaml (Line 17) defines the binding as kafkaProducer-out-0. Spring Cloud Stream will not match these, so the producer will create a dynamic binding with default settings instead of using your configured destination: ${kafka.topics.simple-topic}. Messages will be sent to a topic literally named kafkaV2Producer-out-0 instead of the intended topic.

Either the code or the YAML must be updated to match:

Option A: Fix the code to match the YAML
-        bridge.send("kafkaV2Producer-out-0", message);
+        bridge.send("kafkaProducer-out-0", message);
Option B: Fix the YAML to match the code

In application.yaml:

-        kafkaProducer-out-0:
+        kafkaV2Producer-out-0:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
bridge.send("kafkaV2Producer-out-0", message);
bridge.send("kafkaProducer-out-0", message);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spring-wolf-example/src/main/java/com/io/example/producer/KafkaProducer.java`
at line 39, The StreamBridge binding name used in KafkaProducer
(bridge.send("kafkaV2Producer-out-0", message)) does not match the binding
defined in application.yaml (kafkaProducer-out-0), causing a dynamic binding and
wrong topic; fix by making the names identical — either change the KafkaProducer
call to bridge.send("kafkaProducer-out-0", message) so it uses the configured
destination (${kafka.topics.simple-topic}), or update the YAML binding key from
kafkaProducer-out-0 to kafkaV2Producer-out-0; ensure the StreamBridge binding
name exactly matches the binding id in application.yaml so the configured
destination is used.

}

}
2 changes: 1 addition & 1 deletion spring-wolf-example/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spring:
bindings:

# PRODUCER
sendMessage-out-0:
kafkaProducer-out-0:
destination: ${kafka.topics.simple-topic}

# CONSUMER
Expand Down