Skip to content

Commit a4f49ce

Browse files
committed
update to htmlunit 3.1.0
1 parent 2bd06e5 commit a4f49ce

File tree

6 files changed

+54
-67
lines changed

6 files changed

+54
-67
lines changed

.classpath

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@
33
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
44
<classpathentry kind="output" path="target/classes"/>
55
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6-
<classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.65.1/htmlunit-2.65.1.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.65.1/htmlunit-2.65.1-sources.jar"/>
7-
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.5.13/httpmime-4.5.13.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpmime/4.5.13/httpmime-4.5.13-sources.jar"/>
8-
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13-sources.jar"/>
9-
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13-sources.jar"/>
6+
<classpathentry kind="var" path="M2_REPO/org/htmlunit/htmlunit/3.1.0/htmlunit-3.1.0.jar" sourcepath="M2_REPO/org/htmlunit/htmlunit/3.1.0/htmlunit-3.1.0-sources.jar"/>
7+
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.5.14/httpmime-4.5.14.jar"/>
8+
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14-sources.jar"/>
9+
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16-sources.jar"/>
1010
<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2-sources.jar"/>
11-
<classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.65.0/htmlunit-core-js-2.65.0-sources.jar"/>
12-
<classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/neko-htmlunit/2.65.0/neko-htmlunit-2.65.0.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/neko-htmlunit/2.65.0/neko-htmlunit-2.65.0-sources.jar"/>
13-
<classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.12.2/xercesImpl-2.12.2.jar" sourcepath="M2_REPO/xerces/xercesImpl/2.12.2/xercesImpl-2.12.2-sources.jar"/>
14-
<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01-sources.jar"/>
15-
<classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit-cssparser/1.12.0/htmlunit-cssparser-1.12.0.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit-cssparser/1.12.0/htmlunit-cssparser-1.12.0-sources.jar"/>
16-
<classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit-xpath/2.65.0/htmlunit-xpath-2.65.0.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit-xpath/2.65.0/htmlunit-xpath-2.65.0-sources.jar"/>
11+
<classpathentry kind="var" path="M2_REPO/org/htmlunit/htmlunit-core-js/3.1.0/htmlunit-core-js-3.1.0.jar"/>
12+
<classpathentry kind="var" path="M2_REPO/org/htmlunit/neko-htmlunit/3.1.0/neko-htmlunit-3.1.0.jar" sourcepath="M2_REPO/org/htmlunit/neko-htmlunit/3.1.0/neko-htmlunit-3.1.0-sources.jar"/>
13+
<classpathentry kind="var" path="M2_REPO/org/htmlunit/htmlunit-cssparser/3.1.0/htmlunit-cssparser-3.1.0.jar" sourcepath="M2_REPO/org/htmlunit/htmlunit-cssparser/3.1.0/htmlunit-cssparser-3.1.0-sources.jar"/>
14+
<classpathentry kind="var" path="M2_REPO/org/htmlunit/htmlunit-xpath/3.1.0/htmlunit-xpath-3.1.0.jar" sourcepath="M2_REPO/org/htmlunit/htmlunit-xpath/3.1.0/htmlunit-xpath-3.1.0-sources.jar"/>
1715
<classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar" sourcepath="M2_REPO/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0-sources.jar"/>
18-
<classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-text/1.9/commons-text-1.9.jar" sourcepath="M2_REPO/org/apache/commons/commons-text/1.9/commons-text-1.9-sources.jar"/>
16+
<classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-text/1.10.0/commons-text-1.10.0.jar"/>
1917
<classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.10.0/commons-io-2.10.0.jar" sourcepath="M2_REPO/commons-io/commons-io/2.10.0/commons-io-2.10.0-sources.jar"/>
2018
<classpathentry kind="var" path="M2_REPO/commons-net/commons-net/3.8.0/commons-net-3.8.0.jar" sourcepath="M2_REPO/commons-net/commons-net/3.8.0/commons-net-3.8.0-sources.jar"/>
2119
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.15/commons-codec-1.15.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.15/commons-codec-1.15-sources.jar"/>

.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>htmlunit-android</name>
3+
<name>htmlunit3-android</name>
44
<comment>A headless browser intended for use in testing web-based applications packaged for android. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
55
<projects/>
66
<buildSpec>

README.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# HtmlUnit Android package
22

3-
Version 2.67.0 / November 20, 2022
3+
Version 3.1.0 / April 17, 2023
44

55
:heart: [Sponsor](https://github.com/sponsors/rbri)
66

7-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.htmlunit/htmlunit-android/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.htmlunit/htmlunit-android)
7+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.htmlunit/htmlunit3-android/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.htmlunit/htmlunit3-android)
88

99
**Homepage**
1010

11-
[htmlunit.sourceforge.io](https://github.com/HtmlUnit/htmlunit-android)
11+
[https://github.com/HtmlUnit/htmlunit-android](https://github.com/HtmlUnit/htmlunit-android)
1212

1313
**News**
1414

@@ -22,9 +22,9 @@ Add to your `pom.xml`:
2222

2323
```xml
2424
<dependency>
25-
<groupId>net.sourceforge.htmlunit</groupId>
26-
<artifactId>htmlunit-android</artifactId>
27-
<version>2.67.0</version>
25+
<groupId>org.htmlunit</groupId>
26+
<artifactId>htmlunit3-android</artifactId>
27+
<version>3.1.0</version>
2828
</dependency>
2929
```
3030

@@ -33,7 +33,7 @@ Add to your `pom.xml`:
3333
Add to your `build.gradle`:
3434

3535
```groovy
36-
implementation group: 'net.sourceforge.htmlunit', name: 'htmlunit-android', version: '2.67.0'
36+
implementation group: 'org.htmlunit', name: 'htmlunit3-android', version: '3.1.0'
3737
```
3838

3939
Overview
@@ -44,22 +44,21 @@ But Android is a bit different because the Android SDK already includes some (ol
4444
HtmlUnit uses a more recent version HttpClient; and this is where the problem begins.
4545

4646
To solve the conflicts, this package uses [shading](https://maven.apache.org/plugins/maven-shade-plugin/) and
47-
includes the HttpClient in the jar file itself but with a modified package name. There are no changes done
48-
to the implementation.
47+
includes the HttpClient and apache commons-codec in the jar file itself but with a modified package name.
48+
There are no changes done to the implementation.
4949

5050
Or to be more detailed, this packages includes
51-
* HtmlUnit itself
52-
* htmlunit-core-js
53-
* htmlunit-cssparser
51+
* HtmlUnit itself (org.htmlunit, netscape.javascript)
52+
* htmlunit-core-js (org.htmlunit.corejs)
53+
* htmlunit-cssparser (org.htmlunit.cssparser)
54+
* htmlunit-xpath (org.htmlunit.xpath)
55+
* neko-htmlunit (org.htmlunit.cyberneko)
5456

55-
* neko-htmlunit
56-
* xml-apis/xml-apis:jar
57-
* xerces/xercesImpl
57+
* httpcomponents/httpmime:jar (shaded org.apache.http -> org.htmlunit.org.apache.http)
58+
* httpcomponents/httpclient (shaded org.apache.http -> org.htmlunit.org.apache.http)
59+
* httpcomponents/httpcore (shaded org.apache.http -> org.htmlunit.org.apache.http)
5860

59-
* httpcomponents/httpmime:jar (shaded)
60-
* httpcomponents/httpclient (shaded)
61-
* httpcomponents/httpcore (shaded)
62-
* commons-codec/commons-codec (shaded)
61+
* commons-codec/commons-codec (shaded org.apache.commons.codec -> org.htmlunit.org.apache.commons.codec)
6362

6463
All the other dependencies are still dependencies of this package (see the pom.xml for more).
6564

@@ -88,7 +87,7 @@ Add the snapshot repository and dependency to your `pom.xml`:
8887
<!-- ... -->
8988
<repository>
9089
<id>OSS Sonatype snapshots</id>
91-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
90+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
9291
<snapshots>
9392
<enabled>true</enabled>
9493
<updatePolicy>always</updatePolicy>
@@ -102,8 +101,8 @@ Add the snapshot repository and dependency to your `pom.xml`:
102101
<dependencies>
103102
<dependency>
104103
<groupId>net.sourceforge.htmlunit</groupId>
105-
<artifactId>htmlunit-android</artifactId>
106-
<version>2.68.0-SNAPSHOT</version>
104+
<artifactId>htmlunit3-android</artifactId>
105+
<version>3.2.0-SNAPSHOT</version>
107106
</dependency>
108107
<!-- ... -->
109108
</dependencies>
@@ -117,12 +116,12 @@ Add the snapshot repository and dependency to your `build.gradle`:
117116

118117
```groovy
119118
repositories {
120-
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
119+
maven { url "https://os1.oss.sonatype.org/content/repositories/snapshots" }
121120
// ...
122121
}
123122
// ...
124123
dependencies {
125-
implementation group: 'net.sourceforge.htmlunit', name: 'htmlunit-android', version: '2.68.0-SNAPSHOT'
124+
implementation group: 'org.htmlunit', name: 'htmlunit3-android', version: '3.2.0-SNAPSHOT'
126125
// ...
127126
}
128127
```

pom.xml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55

6-
<groupId>net.sourceforge.htmlunit</groupId>
7-
<artifactId>htmlunit-android</artifactId>
8-
<version>2.67.0</version>
6+
<groupId>org.htmlunit</groupId>
7+
<artifactId>htmlunit3-android</artifactId>
8+
<version>3.1.0-SNAPSHOT</version>
99

1010
<name>HtmlUnitAndroid</name>
1111
<organization>
@@ -16,7 +16,7 @@
1616
<description>
1717
A headless browser intended for use in testing web-based applications packaged for android.
1818
</description>
19-
<url>http://htmlunit.sourceforge.net</url>
19+
<url>https://www.htmlunit.org</url>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -26,7 +26,7 @@
2626
<maven.compiler.source>8</maven.compiler.source>
2727
<maven.compiler.target>8</maven.compiler.target>
2828

29-
<htmlunit.version>2.67.0</htmlunit.version>
29+
<htmlunit.version>3.1.0</htmlunit.version>
3030
<!-- overwrite the jetty version to be compatible with older android api's -->
3131
<!-- see https://github.com/HtmlUnit/htmlunit-android/issues/5 -->
3232
<jetty.version>9.4.19.v20190610</jetty.version>
@@ -42,7 +42,7 @@
4242
<archive>
4343
<manifest>
4444
<addClasspath>true</addClasspath>
45-
<mainClass>com.gargoylesoftware.htmlunit.android.Main</mainClass>
45+
<mainClass>org.htmlunit.android.Main</mainClass>
4646
</manifest>
4747
</archive>
4848
</configuration>
@@ -196,7 +196,7 @@
196196

197197
<dependencies>
198198
<dependency>
199-
<groupId>net.sourceforge.htmlunit</groupId>
199+
<groupId>org.htmlunit</groupId>
200200
<artifactId>htmlunit</artifactId>
201201
<version>${htmlunit.version}</version>
202202
</dependency>
@@ -256,18 +256,13 @@
256256
</dependencies>
257257

258258
<distributionManagement>
259-
<site>
260-
<id>htmlunit-website</id>
261-
<name>HtmlUnit WebSite - Sourceforge</name>
262-
<url>scp://shell.sourceforge.net/home/project-web/htmlunit/htdocs/</url>
263-
</site>
264259
<snapshotRepository>
265260
<id>sonatype-nexus-snapshots</id>
266-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
261+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
267262
</snapshotRepository>
268263
<repository>
269264
<id>sonatype-nexus-staging</id>
270-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
265+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
271266
</repository>
272267
</distributionManagement>
273268

src/main/java/com/gargoylesoftware/htmlunit/android/Main.java renamed to src/main/java/org/htmlunit/android/Main.java

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002-2022 Gargoyle Software Inc.
2+
* Copyright (c) 2002-2023 Gargoyle Software Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -12,13 +12,11 @@
1212
* See the License for the specific language governing permissions and
1313
* limitations under the License.
1414
*/
15-
package com.gargoylesoftware.htmlunit.android;
15+
package org.htmlunit.android;
1616

17-
import java.util.Set;
18-
19-
import com.gargoylesoftware.htmlunit.SilentCssErrorHandler;
20-
import com.gargoylesoftware.htmlunit.WebClient;
21-
import com.gargoylesoftware.htmlunit.html.HtmlPage;
17+
import org.htmlunit.SilentCssErrorHandler;
18+
import org.htmlunit.WebClient;
19+
import org.htmlunit.html.HtmlPage;
2220

2321
/**
2422
* Just a simple main class.
@@ -27,10 +25,11 @@
2725
*/
2826
public class Main {
2927
public static void main(String[] args) {
30-
final String[] tmpClassNames = { "com.gargoylesoftware.htmlunit.WebClient",
31-
"net.sourceforge.htmlunit.corejs.javascript.Function",
32-
"net.sourceforge.htmlunit.cyberneko.HTMLElements",
33-
"com.gargoylesoftware.css.parser.CSSOMParser",
28+
final String[] tmpClassNames = { "org.htmlunit.WebClient",
29+
"org.htmlunit.corejs.javascript.Function",
30+
"org.htmlunit.cyberneko.HTMLElements",
31+
"org.htmlunit.xpath.XPath",
32+
"org.htmlunit.cssparser.parser.CSSOMParser",
3433
"",
3534

3635
"org.htmlunit.org.apache.http.client.HttpClient",
@@ -79,11 +78,7 @@ public static void main(String[] args) {
7978
// // @formatter:on
8079
// System.out.println(info.toString());
8180
// }
82-
//
83-
// System.out.println(org.apache.xmlcommons.Version.getVersion());
84-
// System.out.println(org.apache.xml.serializer.Version.getVersion());
85-
// System.out.println(org.apache.xerces.impl.Version.getVersion());
86-
//
81+
8782
System.out.println();
8883
System.out.println();
8984
System.out.println("Reading https://www.wetator.org/testform/");

src/main/java/com/gargoylesoftware/htmlunit/android/VersionUtil.java renamed to src/main/java/org/htmlunit/android/VersionUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515

1616

17-
package com.gargoylesoftware.htmlunit.android;
17+
package org.htmlunit.android;
1818

1919
import java.io.InputStream;
2020
import java.net.URL;

0 commit comments

Comments
 (0)