Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to HtmlUnit 3.11.0 #30392

Closed
svschouw-bb opened this issue Apr 28, 2023 · 6 comments
Closed

Upgrade to HtmlUnit 3.11.0 #30392

svschouw-bb opened this issue Apr 28, 2023 · 6 comments
Assignees
Labels
in: test Issues in the test module type: dependency-upgrade A dependency upgrade
Milestone

Comments

@svschouw-bb
Copy link

Affects: All current spring framework versions

HtmlUnit has released version 3.0.0 on March 19. With this version the artifact has changed from org.htmlunit/htmlunit:htmlunit to org.htmlunit:htmlunit as well as all the packages have changed from com.gargoylesoftware.htmlunit.* to org.htmlunit.*. New updates only seem to be done on the 3.x line, and no longer on the 2.x line. Spring should probably be updated accordingly.

Since 3.0.0 has some incompatible changes compared to 2.70.0, this upgrade should probably not be done on a point release.

From the Spring perspective, I don't think it's much more than updating all the packages and artifact, both in code and documentation.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 28, 2023
@tedyoung
Copy link

Is there a way to create a backwards-compatible version of MockMvcWebClientBuilder that can accept either the old or new package name for HtmlUnit's WebClient?

@svschouw-bb
Copy link
Author

I'm afraid the MockMvcWebClientBuilder.build() method signature would not be compatible (it would have to either return com.gargoylesoftware.htmlunit.WebClient or org.htmlunit.WebClient). It's probably possible to create a MockMvcWebClient3Builder by just copy-pasting all relevant files. But probably the entire package will have to be copy-pasted. It might be possible to share some code if an adapter for the various HttpClient classes (like WebRequest and WebResponse) were created, but I'm not sure if that's worth it in the long run. Maybe create a org.springframework.test.web.servlet.htmlunit3 package and deprecate the old one. And in a later version delete the old one.

@snicoll
Copy link
Member

snicoll commented Oct 5, 2023

We'd have to coordinate with Spring Boot, as a move to 3.0 can only be done for 3.3 at the earliest (which means Spring Framework 6.1.x).

@jhoeller wondering if we're ok to raise the baseline for this dependency?

@jhoeller jhoeller added type: dependency-upgrade A dependency upgrade and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 21, 2023
@jhoeller jhoeller modified the milestones: General Backlog, 6.2.x Dec 21, 2023
@jhoeller jhoeller modified the milestones: 6.2.x, 6.2.0-M1 Mar 2, 2024
@tschuehly
Copy link

HtmlUnit 4 is due to be released at the beginning of April. Would be cool if we could upgrade directly to 4.0:
https://twitter.com/HtmlUnit/status/1766518473042137369?t=vTlcCbA-JTJouE15zFkcXA&s=19

@sbrannen sbrannen added the in: test Issues in the test module label Mar 10, 2024
@snicoll snicoll self-assigned this Mar 11, 2024
@snicoll snicoll changed the title Support HtmlUnit 3.1.0+ in MockMvcWebClientBuilder Upgrade to HtmlUnit 3.11.0 Mar 11, 2024
@jhoeller
Copy link
Contributor

@tschuehly I see no structural changes on HtmlUnit's main branch, just removed IE support on existing files in org.htmlunit. So it looks like we'll be fine with our present arrangement covering both 3.11 and 4.0 there. We'll see once HtmlUnit 4.0 is actually out.

@tschuehly
Copy link

@jhoeller
Great to hear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

No branches or pull requests

7 participants