From 17ca0421e756eff6669493218dbc92b08361c60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Mon, 11 Mar 2024 11:29:15 +0100 Subject: [PATCH] Upgrade to HtmlUnit 4.2.0 and Selenium HtmlUnit 4.20 Closes gh-41178 Closes gh-41179 --- .../spring-boot-dependencies/build.gradle | 8 ++++---- .../spring-boot-docs/build.gradle | 8 ++++---- .../springmvctests/MyHtmlUnitTests.java | 4 ++-- .../springmvctests/MyHtmlUnitTests.kt | 4 ++-- .../spring-boot-test-autoconfigure/build.gradle | 6 +++--- .../web/servlet/AutoConfigureMockMvc.java | 4 ++-- .../MockMvcWebClientAutoConfiguration.java | 4 ++-- .../MockMvcWebDriverAutoConfiguration.java | 4 ++-- .../WebMvcTestWebClientIntegrationTests.java | 6 +++--- .../WebMvcTestWebDriverIntegrationTests.java | 6 +++--- ...WithAutoConfigureMockMvcIntegrationTests.java | 4 ++-- .../spring-boot-test/build.gradle | 8 ++++---- .../test/web/htmlunit/LocalHostWebClient.java | 8 ++++---- .../LocalHostWebConnectionHtmlUnitDriver.java | 4 ++-- .../web/htmlunit/LocalHostWebClientTests.java | 10 +++++----- ...ocalHostWebConnectionHtmlUnitDriverTests.java | 16 ++++++++-------- .../spring-boot-smoke-test-test/build.gradle | 4 ++-- .../web/UserVehicleControllerHtmlUnitTests.java | 6 +++--- 18 files changed, 57 insertions(+), 57 deletions(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index f6e9ca66219..a6045743cc2 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -563,8 +563,8 @@ bom { ] } } - library("HtmlUnit", "2.70.0") { - group("net.sourceforge.htmlunit") { + library("HtmlUnit", "4.2.0") { + group("org.htmlunit") { modules = [ "htmlunit" { exclude group: "commons-logging", module: "commons-logging" @@ -1826,10 +1826,10 @@ bom { releaseNotes("https://github.com/SeleniumHQ/selenium/releases/tag/selenium-{version}") } } - library("Selenium HtmlUnit", "4.13.0") { + library("Selenium HtmlUnit", "4.20.0") { group("org.seleniumhq.selenium") { modules = [ - "htmlunit-driver" + "htmlunit3-driver" ] } links { diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index ade35c5c56d..54901eb2e3b 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -80,10 +80,6 @@ dependencies { implementation("jakarta.persistence:jakarta.persistence-api") implementation("jakarta.servlet:jakarta.servlet-api") implementation("jakarta.validation:jakarta.validation-api") - implementation("net.sourceforge.htmlunit:htmlunit") { - exclude group: "commons-logging", module: "commons-logging" - exclude group: "xml-apis", module: "xml-apis" - } implementation("org.apache.httpcomponents.client5:httpclient5") implementation("org.apache.commons:commons-dbcp2") { exclude group: "commons-logging", module: "commons-logging" @@ -102,6 +98,10 @@ dependencies { exclude group: "javax.xml.bind", module: "jaxb-api" exclude group: "org.jboss.spec.javax.transaction", module: "jboss-transaction-api_1.2_spec" } + implementation("org.htmlunit:htmlunit") { + exclude group: "commons-logging", module: "commons-logging" + exclude group: "xml-apis", module: "xml-apis" + } implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") implementation("org.jooq:jooq") { exclude group: "javax.xml.bind", module: "jaxb-api" diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java index 7d16efb4833..a89a9a72f26 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java @@ -16,8 +16,8 @@ package org.springframework.boot.docs.testing.springbootapplications.springmvctests; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; +import org.htmlunit.WebClient; +import org.htmlunit.html.HtmlPage; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyHtmlUnitTests.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyHtmlUnitTests.kt index 27119f4052f..97183a3aedf 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyHtmlUnitTests.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyHtmlUnitTests.kt @@ -16,9 +16,9 @@ package org.springframework.boot.docs.features.testing.springbootapplications.springmvctests -import com.gargoylesoftware.htmlunit.WebClient -import com.gargoylesoftware.htmlunit.html.HtmlPage import org.assertj.core.api.Assertions.assertThat +import org.htmlunit.WebClient +import org.htmlunit.html.HtmlPage import org.junit.jupiter.api.Test import org.mockito.BDDMockito.given import org.springframework.beans.factory.annotation.Autowired diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index fa95eb8f65f..8d2f1cbbb9a 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -20,12 +20,12 @@ dependencies { optional("com.google.code.gson:gson") optional("com.jayway.jsonpath:json-path") optional("com.sun.xml.messaging.saaj:saaj-impl") - optional("net.sourceforge.htmlunit:htmlunit") { + optional("org.hibernate.orm:hibernate-core") + optional("org.htmlunit:htmlunit") { exclude group: "commons-logging", module: "commons-logging" } - optional("org.hibernate.orm:hibernate-core") optional("org.junit.jupiter:junit-jupiter-api") - optional("org.seleniumhq.selenium:htmlunit-driver") { + optional("org.seleniumhq.selenium:htmlunit3-driver") { exclude(group: "commons-logging", module: "commons-logging") exclude(group: "com.sun.activation", module: "jakarta.activation") } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/AutoConfigureMockMvc.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/AutoConfigureMockMvc.java index 6882f158ae9..2ed2f06d81a 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/AutoConfigureMockMvc.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/AutoConfigureMockMvc.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-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. @@ -23,7 +23,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import com.gargoylesoftware.htmlunit.WebClient; +import org.htmlunit.WebClient; import org.openqa.selenium.WebDriver; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebClientAutoConfiguration.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebClientAutoConfiguration.java index 2ac41ec3d3b..9f838bb2c4c 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebClientAutoConfiguration.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebClientAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-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. @@ -16,7 +16,7 @@ package org.springframework.boot.test.autoconfigure.web.servlet; -import com.gargoylesoftware.htmlunit.WebClient; +import org.htmlunit.WebClient; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebDriverAutoConfiguration.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebDriverAutoConfiguration.java index 202cbb0ab57..6a45c59c7b2 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebDriverAutoConfiguration.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcWebDriverAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-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. @@ -18,7 +18,7 @@ package org.springframework.boot.test.autoconfigure.web.servlet; import java.util.concurrent.Executors; -import com.gargoylesoftware.htmlunit.BrowserVersion; +import org.htmlunit.BrowserVersion; import org.openqa.selenium.WebDriver; import org.openqa.selenium.htmlunit.HtmlUnitDriver; diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebClientIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebClientIntegrationTests.java index eec09dffa28..e4d481d2954 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebClientIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebClientIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-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. @@ -16,8 +16,8 @@ package org.springframework.boot.test.autoconfigure.web.servlet.mockmvc; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; +import org.htmlunit.WebClient; +import org.htmlunit.html.HtmlPage; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebDriverIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebDriverIntegrationTests.java index 519dedc05a3..2e5a912344d 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebDriverIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWebDriverIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-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. @@ -20,7 +20,7 @@ import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; import org.openqa.selenium.By; -import org.openqa.selenium.NoSuchWindowException; +import org.openqa.selenium.NoSuchSessionException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; @@ -59,7 +59,7 @@ class WebMvcTestWebDriverIntegrationTests { this.webDriver.get("/html"); WebElement element = this.webDriver.findElement(By.tagName("body")); assertThat(element.getText()).isEqualTo("Hello"); - assertThatExceptionOfType(NoSuchWindowException.class).isThrownBy(previousWebDriver::getWindowHandle); + assertThatExceptionOfType(NoSuchSessionException.class).isThrownBy(previousWebDriver::getWindowHandle); assertThat(previousWebDriver).isNotNull().isNotSameAs(this.webDriver); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWithAutoConfigureMockMvcIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWithAutoConfigureMockMvcIntegrationTests.java index e2ce3c06322..6356e3532fc 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWithAutoConfigureMockMvcIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/WebMvcTestWithAutoConfigureMockMvcIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-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. @@ -16,7 +16,7 @@ package org.springframework.boot.test.autoconfigure.web.servlet.mockmvc; -import com.gargoylesoftware.htmlunit.WebClient; +import org.htmlunit.WebClient; import org.junit.jupiter.api.Test; import org.openqa.selenium.WebDriver; diff --git a/spring-boot-project/spring-boot-test/build.gradle b/spring-boot-project/spring-boot-test/build.gradle index 93fc006fbb9..af2a8d6ca8a 100644 --- a/spring-boot-project/spring-boot-test/build.gradle +++ b/spring-boot-project/spring-boot-test/build.gradle @@ -23,12 +23,15 @@ dependencies { optional("org.assertj:assertj-core") optional("org.hamcrest:hamcrest-core") optional("org.hamcrest:hamcrest-library") + optional("org.htmlunit:htmlunit") { + exclude(group: "commons-logging", module: "commons-logging") + } optional("org.jetbrains.kotlin:kotlin-stdlib") optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.junit.jupiter:junit-jupiter-api") optional("org.mockito:mockito-core") optional("org.skyscreamer:jsonassert") - optional("org.seleniumhq.selenium:htmlunit-driver") { + optional("org.seleniumhq.selenium:htmlunit3-driver") { exclude(group: "commons-logging", module: "commons-logging") exclude(group: "com.sun.activation", module: "jakarta.activation") } @@ -36,9 +39,6 @@ dependencies { optional("org.springframework:spring-web") optional("org.springframework:spring-webflux") optional("org.springframework.graphql:spring-graphql-test") - optional("net.sourceforge.htmlunit:htmlunit") { - exclude(group: "commons-logging", module: "commons-logging") - } testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) testImplementation("io.mockk:mockk") diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClient.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClient.java index 23ba2b19eab..47c46b477f4 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClient.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-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. @@ -18,9 +18,9 @@ package org.springframework.boot.test.web.htmlunit; import java.io.IOException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.Page; -import com.gargoylesoftware.htmlunit.WebClient; +import org.htmlunit.FailingHttpStatusCodeException; +import org.htmlunit.Page; +import org.htmlunit.WebClient; import org.springframework.core.env.Environment; import org.springframework.util.Assert; diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriver.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriver.java index f38c8ade792..60d0f7776d5 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriver.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-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. @@ -16,7 +16,7 @@ package org.springframework.boot.test.web.htmlunit.webdriver; -import com.gargoylesoftware.htmlunit.BrowserVersion; +import org.htmlunit.BrowserVersion; import org.openqa.selenium.Capabilities; import org.springframework.core.env.Environment; diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java index 938e551df85..c3299a41751 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-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. @@ -19,10 +19,10 @@ package org.springframework.boot.test.web.htmlunit; import java.io.IOException; import java.net.URL; -import com.gargoylesoftware.htmlunit.StringWebResponse; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.WebConnection; -import com.gargoylesoftware.htmlunit.WebResponse; +import org.htmlunit.StringWebResponse; +import org.htmlunit.WebClient; +import org.htmlunit.WebConnection; +import org.htmlunit.WebResponse; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriverTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriverTests.java index b9634ddc605..9b159132054 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriverTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/webdriver/LocalHostWebConnectionHtmlUnitDriverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-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. @@ -18,13 +18,13 @@ package org.springframework.boot.test.web.htmlunit.webdriver; import java.net.URL; -import com.gargoylesoftware.htmlunit.BrowserVersion; -import com.gargoylesoftware.htmlunit.TopLevelWindow; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.WebClientOptions; -import com.gargoylesoftware.htmlunit.WebConsole; -import com.gargoylesoftware.htmlunit.WebRequest; -import com.gargoylesoftware.htmlunit.WebWindow; +import org.htmlunit.BrowserVersion; +import org.htmlunit.TopLevelWindow; +import org.htmlunit.WebClient; +import org.htmlunit.WebClientOptions; +import org.htmlunit.WebConsole; +import org.htmlunit.WebRequest; +import org.htmlunit.WebWindow; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentMatcher; diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/build.gradle index 3544726c57e..26aa3fe13f5 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/build.gradle @@ -12,12 +12,12 @@ dependencies { runtimeOnly("com.h2database:h2") testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("net.sourceforge.htmlunit:htmlunit") { + testImplementation("org.htmlunit:htmlunit") { exclude group: "commons-logging", module: "commons-logging" } testImplementation("org.mockito:mockito-junit-jupiter") testImplementation("org.seleniumhq.selenium:selenium-api") - testImplementation("org.seleniumhq.selenium:htmlunit-driver") { + testImplementation("org.seleniumhq.selenium:htmlunit3-driver") { exclude group: "commons-logging", module: "commons-logging" exclude(group: "com.sun.activation", module: "jakarta.activation") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/src/test/java/smoketest/test/web/UserVehicleControllerHtmlUnitTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/src/test/java/smoketest/test/web/UserVehicleControllerHtmlUnitTests.java index 838c8df5af0..d075ef35476 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/src/test/java/smoketest/test/web/UserVehicleControllerHtmlUnitTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-test/src/test/java/smoketest/test/web/UserVehicleControllerHtmlUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-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. @@ -16,8 +16,8 @@ package smoketest.test.web; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; +import org.htmlunit.WebClient; +import org.htmlunit.html.HtmlPage; import org.junit.jupiter.api.Test; import smoketest.test.service.VehicleDetails;