You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lp...@apache.org on 2023/08/20 19:57:06 UTC

[shiro] branch main updated: deps: updated htmlunit to 3.5.0

This is an automated email from the ASF dual-hosted git repository.

lprimak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro.git


The following commit(s) were added to refs/heads/main by this push:
     new 5b642095f deps: updated htmlunit to 3.5.0
     new 106c9cae4 Merge pull request #1035 from lprimak/upgrade-htmlunit
5b642095f is described below

commit 5b642095fa5328a3620bc696dbdb3ca73c59ae92
Author: lprimak <le...@flowlogix.com>
AuthorDate: Sun Aug 20 14:02:49 2023 -0500

    deps: updated htmlunit to 3.5.0
---
 integration-tests/guice3/pom.xml                   |  2 +-
 .../samples/guice/ContainerIntegrationIT.java      | 25 +++++++++++-----------
 integration-tests/guice4/pom.xml                   |  2 +-
 .../samples/guice/ContainerIntegrationIT.java      | 25 +++++++++++-----------
 integration-tests/support/pom.xml                  |  2 +-
 .../shiro/testing/web/AbstractContainerIT.java     |  2 +-
 pom.xml                                            |  4 ++--
 samples/guice/pom.xml                              |  2 +-
 .../samples/guice/ContainerIntegrationIT.java      | 25 +++++++++++-----------
 samples/servlet-plugin/pom.xml                     |  2 +-
 .../apache/shiro/test/ContainerIntegrationIT.java  | 15 ++++++-------
 samples/spring-hibernate/pom.xml                   |  2 +-
 .../shiro/samples/ContainerIntegrationIT.java      | 14 ++++++------
 samples/web/pom.xml                                |  2 +-
 .../shiro/test/WebAppContainerIntegrationIT.java   | 17 +++++++--------
 15 files changed, 67 insertions(+), 74 deletions(-)

diff --git a/integration-tests/guice3/pom.xml b/integration-tests/guice3/pom.xml
index 79aa731e0..1bac8e1b4 100644
--- a/integration-tests/guice3/pom.xml
+++ b/integration-tests/guice3/pom.xml
@@ -100,7 +100,7 @@
 			<scope>test</scope>
 		</dependency>
         <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
+            <groupId>org.htmlunit</groupId>
             <artifactId>htmlunit</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java b/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
index 2a259671a..fe9d7a150 100644
--- a/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
+++ b/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
@@ -20,15 +20,14 @@ package org.apache.shiro.samples.guice;
 
 import org.apache.shiro.testing.web.AbstractContainerIT;
 
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.WebAssert;
-import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.htmlunit.ElementNotFoundException;
+import org.htmlunit.FailingHttpStatusCodeException;
+import org.htmlunit.WebAssert;
+import org.htmlunit.html.HtmlCheckBoxInput;
+import org.htmlunit.html.HtmlForm;
+import org.htmlunit.html.HtmlPage;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -52,9 +51,9 @@ public class ContainerIntegrationIT extends AbstractContainerIT {
 
         HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
-        page = form.<HtmlInput>getInputByName("submit").click();
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
+        page = form.getInputByName("submit").click();
         // This'll throw an exception if not logged in
         page.getAnchorByHref("/logout");
     }
@@ -63,11 +62,11 @@ public class ContainerIntegrationIT extends AbstractContainerIT {
     void logInAndRememberMe() throws Exception {
         HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
         HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe");
         checkbox.setChecked(true);
-        page = form.<HtmlInput>getInputByName("submit").click();
+        page = form.getInputByName("submit").click();
         jetty.stop();
         jetty.start();
         page = webClient.getPage(getBaseUri());
diff --git a/integration-tests/guice4/pom.xml b/integration-tests/guice4/pom.xml
index 0c45c4680..51e27429a 100644
--- a/integration-tests/guice4/pom.xml
+++ b/integration-tests/guice4/pom.xml
@@ -105,7 +105,7 @@
 			<scope>test</scope>
 		</dependency>
         <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
+            <groupId>org.htmlunit</groupId>
             <artifactId>htmlunit</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java b/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
index 2a259671a..fe9d7a150 100644
--- a/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
+++ b/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
@@ -20,15 +20,14 @@ package org.apache.shiro.samples.guice;
 
 import org.apache.shiro.testing.web.AbstractContainerIT;
 
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.WebAssert;
-import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.htmlunit.ElementNotFoundException;
+import org.htmlunit.FailingHttpStatusCodeException;
+import org.htmlunit.WebAssert;
+import org.htmlunit.html.HtmlCheckBoxInput;
+import org.htmlunit.html.HtmlForm;
+import org.htmlunit.html.HtmlPage;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -52,9 +51,9 @@ public class ContainerIntegrationIT extends AbstractContainerIT {
 
         HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
-        page = form.<HtmlInput>getInputByName("submit").click();
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
+        page = form.getInputByName("submit").click();
         // This'll throw an exception if not logged in
         page.getAnchorByHref("/logout");
     }
@@ -63,11 +62,11 @@ public class ContainerIntegrationIT extends AbstractContainerIT {
     void logInAndRememberMe() throws Exception {
         HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
         HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe");
         checkbox.setChecked(true);
-        page = form.<HtmlInput>getInputByName("submit").click();
+        page = form.getInputByName("submit").click();
         jetty.stop();
         jetty.start();
         page = webClient.getPage(getBaseUri());
diff --git a/integration-tests/support/pom.xml b/integration-tests/support/pom.xml
index b1b3d62dc..d9085c681 100644
--- a/integration-tests/support/pom.xml
+++ b/integration-tests/support/pom.xml
@@ -66,7 +66,7 @@
 	    </dependency>
 
         <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
+            <groupId>org.htmlunit</groupId>
             <artifactId>htmlunit</artifactId>
         </dependency>
         <dependency>
diff --git a/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java b/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java
index 823aff047..b76a06dd4 100644
--- a/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java
+++ b/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java
@@ -20,7 +20,6 @@ package org.apache.shiro.testing.web;
 
 import org.apache.shiro.lang.codec.Base64;
 
-import com.gargoylesoftware.htmlunit.WebClient;
 import com.github.mjeanroy.junit.servers.jetty9.EmbeddedJetty;
 import com.github.mjeanroy.junit.servers.jetty.EmbeddedJettyConfiguration;
 import org.eclipse.jetty.annotations.AnnotationConfiguration;
@@ -40,6 +39,7 @@ import org.eclipse.jetty.webapp.MetaInfConfiguration;
 import org.eclipse.jetty.webapp.WebAppContext;
 import org.eclipse.jetty.webapp.WebInfConfiguration;
 import org.eclipse.jetty.webapp.WebXmlConfiguration;
+import org.htmlunit.WebClient;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
diff --git a/pom.xml b/pom.xml
index 9bd1fe8a0..2f6fff4e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -113,7 +113,7 @@
         <spring-boot.version>2.7.14</spring-boot.version>
         <guice.version>4.2.3</guice.version>
         <jaxrs.api.version>2.1.6</jaxrs.api.version>
-        <htmlunit.version>2.70.0</htmlunit.version>
+        <htmlunit.version>3.5.0</htmlunit.version>
         <bouncycastle.version>1.70</bouncycastle.version>
 
         <!-- Test 3rd-party dependencies: -->
@@ -1242,7 +1242,7 @@
                 <version>${hazelcast.version}</version>
             </dependency>
             <dependency>
-                <groupId>net.sourceforge.htmlunit</groupId>
+                <groupId>org.htmlunit</groupId>
                 <artifactId>htmlunit</artifactId>
                 <version>${htmlunit.version}</version>
             </dependency>
diff --git a/samples/guice/pom.xml b/samples/guice/pom.xml
index 3262723df..3f6bccd03 100644
--- a/samples/guice/pom.xml
+++ b/samples/guice/pom.xml
@@ -87,7 +87,7 @@
 	    </dependency>
 
         <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
+            <groupId>org.htmlunit</groupId>
             <artifactId>htmlunit</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java b/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
index 8d76d2d91..d7bb94ebd 100644
--- a/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
+++ b/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java
@@ -18,16 +18,15 @@
  */
 package org.apache.shiro.samples.guice;
 
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.WebAssert;
-import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import org.apache.shiro.testing.web.AbstractContainerIT;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.htmlunit.ElementNotFoundException;
+import org.htmlunit.FailingHttpStatusCodeException;
+import org.htmlunit.WebAssert;
+import org.htmlunit.html.HtmlCheckBoxInput;
+import org.htmlunit.html.HtmlForm;
+import org.htmlunit.html.HtmlPage;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -51,9 +50,9 @@ public class ContainerIntegrationIT extends AbstractContainerIT {
 
         HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
-        page = form.<HtmlInput>getInputByName("submit").click();
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
+        page = form.getInputByName("submit").click();
         // This'll throw an exception if not logged in
         page.getAnchorByHref("/logout");
     }
@@ -62,11 +61,11 @@ public class ContainerIntegrationIT extends AbstractContainerIT {
     void logInAndRememberMe() throws Exception {
         HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
         HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe");
         checkbox.setChecked(true);
-        page = form.<HtmlInput>getInputByName("submit").click();
+        page = form.getInputByName("submit").click();
         jetty.stop();
         jetty.start();
         page = webClient.getPage(getBaseUri());
diff --git a/samples/servlet-plugin/pom.xml b/samples/servlet-plugin/pom.xml
index 5088e3f35..de83d018e 100644
--- a/samples/servlet-plugin/pom.xml
+++ b/samples/servlet-plugin/pom.xml
@@ -111,7 +111,7 @@
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
+            <groupId>org.htmlunit</groupId>
             <artifactId>htmlunit</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java b/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java
index be78865e8..60d3666be 100644
--- a/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java
+++ b/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java
@@ -18,14 +18,13 @@
  */
 package org.apache.shiro.test;
 
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import org.apache.shiro.testing.web.AbstractContainerIT;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.htmlunit.ElementNotFoundException;
+import org.htmlunit.FailingHttpStatusCodeException;
+import org.htmlunit.html.HtmlForm;
+import org.htmlunit.html.HtmlPage;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -49,9 +48,9 @@ public class ContainerIntegrationIT extends AbstractContainerIT {
 
         HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
-        page = form.<HtmlInput>getInputByName("submit").click();
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
+        page = form.getInputByName("submit").click();
         // This'll throw an exception if not logged in
         page.getAnchorByHref("/logout");
     }
diff --git a/samples/spring-hibernate/pom.xml b/samples/spring-hibernate/pom.xml
index 7bfe6b251..b0f34b7e7 100644
--- a/samples/spring-hibernate/pom.xml
+++ b/samples/spring-hibernate/pom.xml
@@ -108,7 +108,7 @@
         </dependency>
 
         <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
+            <groupId>org.htmlunit</groupId>
             <artifactId>htmlunit</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java b/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java
index 753d270b9..6a84ccfc6 100644
--- a/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java
+++ b/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java
@@ -18,18 +18,16 @@
  */
 package org.apache.shiro.samples;
 
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import org.apache.shiro.testing.web.AbstractContainerIT;
+import org.htmlunit.ElementNotFoundException;
+import org.htmlunit.FailingHttpStatusCodeException;
+import org.htmlunit.WebClient;
+import org.htmlunit.html.HtmlForm;
+import org.htmlunit.html.HtmlInput;
+import org.htmlunit.html.HtmlPage;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-
 import java.io.IOException;
-import java.net.MalformedURLException;
 
 
 public class ContainerIntegrationIT extends AbstractContainerIT {
diff --git a/samples/web/pom.xml b/samples/web/pom.xml
index f771559c7..3bb6caad4 100644
--- a/samples/web/pom.xml
+++ b/samples/web/pom.xml
@@ -82,7 +82,7 @@
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
+            <groupId>org.htmlunit</groupId>
             <artifactId>htmlunit</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java b/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java
index 31dd4e177..e17e8147f 100644
--- a/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java
+++ b/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java
@@ -18,15 +18,14 @@
  */
 package org.apache.shiro.test;
 
-import com.gargoylesoftware.htmlunit.ElementNotFoundException;
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import org.apache.shiro.testing.web.AbstractContainerIT;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.htmlunit.ElementNotFoundException;
+import org.htmlunit.FailingHttpStatusCodeException;
+import org.htmlunit.WebClient;
+import org.htmlunit.html.HtmlForm;
+import org.htmlunit.html.HtmlPage;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -52,9 +51,9 @@ public class WebAppContainerIntegrationIT extends AbstractContainerIT {
 
         HtmlPage page = webClient.getPage(getTlsBaseUri() + "login.jsp");
         HtmlForm form = page.getFormByName("loginform");
-        form.<HtmlInput>getInputByName("username").setValueAttribute("root");
-        form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
-        page = form.<HtmlInput>getInputByName("submit").click();
+        form.getInputByName("username").setValueAttribute("root");
+        form.getInputByName("password").setValueAttribute("secret");
+        page = form.getInputByName("submit").click();
         // This'll throw an exception if not logged in
         page.getAnchorByHref("/logout");
     }