Skip to content

Conversation

@kamilkrzywanski
Copy link
Contributor

Hello, I've refactored structure of project and bumped maven plugins.
Why?
Now it's can be build with jdk11,17 (fixed profiles)
You can run tests directly from IDE. (only with agent build with jdk 17(change target and source to 17 in pom), with 11 IJ is throwing Type 'java/io/IOException' (constant pool 55) "is not assignable to 'java/lang/Throwable"
image

@skybber skybber self-requested a review November 2, 2025 20:59
Copy link
Contributor

@skybber skybber left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good, please check the review issues.

Copy link
Contributor

@skybber skybber left a comment

Choose a reason for hiding this comment

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

Thanks, I'm not able to compile HA now:

JAVA_HOME=/usr/lib/jvm/jbrsdk-21-snapshot mvn clean package -DSpringReloadDelayMillis=800 -DSpringTestSleepTimeFactor=0.4

ends up with:

[INFO] hotswap-agent-proxy-plugin ......................... FAILURE [  0.012 s]
INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:04 min
[INFO] Finished at: 2025-11-02T22:03:08+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.p
lugins:maven-compiler-plugin:3.14.1:compile (default-compile) on project hotswap-agent-proxy-plugin: Fatal error compiling: error: option --add-exports not allowed with target 8 -> [Help 1]

@skybber
Copy link
Contributor

skybber commented Nov 2, 2025

I'm not sure if we can drop java8 support now...

@kamilkrzywanski kamilkrzywanski force-pushed the refactor_maven_2 branch 2 times, most recently from be975b4 to 6d78478 Compare November 2, 2025 22:49
@kamilkrzywanski
Copy link
Contributor Author

kamilkrzywanski commented Nov 2, 2025

Fixed — it now builds successfully with JDK 21. In fact, two tests from MyBatis are still failing, but they also failed with the previous approach. (at least on Linux Mint 22.2 Zara
Update: On Windows, these tests are green.

@skybber
Copy link
Contributor

skybber commented Nov 3, 2025

Thanks, that already looks good now, btw are you planning to continue contributing to HotswapAgent?

@skybber skybber merged commit 0076da3 into HotswapProjects:master Nov 3, 2025
@kamilkrzywanski
Copy link
Contributor Author

kamilkrzywanski commented Nov 3, 2025

I can’t promise, but I recently discovered this project, and we’ve started using it — I really like it. It works much better for large Spring monolith projects than Spring Reloaded/devtools.
At the moment, I’ve also prepared another PR to replace JMock with Mockito, if you agree.

@skybber
Copy link
Contributor

skybber commented Nov 3, 2025

It seems that JMock is being replaced by Mockito, so it’s worth making the switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants