Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['11', '17', '21']
java: ['17', '21']

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ Add to your `build.gradle`:
implementation group: 'org.htmlunit', name: 'htmlunit', version: '4.21.0'
```

## Requirements

HtmlUnit requires **Java 17** or higher.

## Getting Started
You can start here:
* [Getting Started](https://www.htmlunit.org/gettingStarted.html)
Expand Down
43 changes: 27 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
<additionalparam>-Xdoclint:none</additionalparam>

<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<!-- JVM args for accessing internal Xerces classes -->
<java.exports.arg>--add-exports=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED</java.exports.arg>

<htmlunitcsp.version>4.21.0</htmlunitcsp.version>
<htmlunitcssparser.version>4.21.0</htmlunitcssparser.version>
Expand Down Expand Up @@ -90,6 +93,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>${java.exports.arg}</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -224,6 +232,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<argLine>${java.exports.arg}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -299,7 +310,7 @@
<version>3.6.3</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.8.0</version>
<version>[17,)</version>
</requireJavaVersion>
<dependencyConvergence />
</rules>
Expand Down Expand Up @@ -382,7 +393,7 @@
<exclude>**/huge/*.java</exclude>
<exclude>**/encoding/*.java</exclude>
</excludes>
<argLine>-Xms128m -Xmx1g -Dsun.reflect.noInflation=true</argLine>
<argLine>${java.exports.arg} -Xms128m -Xmx1g -Dsun.reflect.noInflation=true</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -443,7 +454,7 @@
<excludes>
<exclude>**/libraries/jquery/JQuery3x3x1Test.java</exclude>
</excludes>
<argLine>-Xms128m -Xmx512m</argLine>
<argLine>${java.exports.arg} -Xms128m -Xmx512m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -471,7 +482,7 @@
<includes>
<include>**/libraries/JQuery3x3x1Test.java</include>
</includes>
<argLine>-Xms128m -Xmx512m</argLine>
<argLine>${java.exports.arg} -Xms128m -Xmx512m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -501,7 +512,7 @@
<include>**/huge/ElementClosesElementTest.java</include>
<include>**/huge/ElementClosesElement2Test.java</include>
</includes>
<argLine>-Xms256m -Xmx512m</argLine>
<argLine>${java.exports.arg} -Xms256m -Xmx512m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -531,7 +542,7 @@
<include>**/huge/HostParentOfBTest.java</include>
<include>**/huge/HostParentOfCTest.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -560,7 +571,7 @@
<include>**/huge/HostParentOfDTest.java</include>
<include>**/huge/HostParentOfFTest.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -589,7 +600,7 @@
<include>**/huge/HostParentOfHTest.java</include>
<include>**/huge/HostParentOfITest.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -618,7 +629,7 @@
<include>**/huge/HostParentOfMTest.java</include>
<include>**/huge/HostParentOfNTest.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -646,7 +657,7 @@
<includes>
<include>**/huge/HostParentOfPTest.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -674,7 +685,7 @@
<includes>
<include>**/huge/HostParentOfSTest.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -702,7 +713,7 @@
<includes>
<include>**/huge/HostParentOfS2Test.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -731,7 +742,7 @@
<include>**/huge/HostParentOfTTest.java</include>
<include>**/huge/HostParentOfWTest.java</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down Expand Up @@ -759,7 +770,7 @@
<includes>
<include>**/encoding/**</include>
</includes>
<argLine>-Xms512m -Xmx1024m</argLine>
<argLine>${java.exports.arg} -Xms512m -Xmx1024m</argLine>
<systemPropertyVariables>
<htmlunit.maven>maven</htmlunit.maven>
</systemPropertyVariables>
Expand Down