Skip to content

Conversation

Copy link

Copilot AI commented Dec 29, 2025

Updates project to target Java 17 as the minimum supported version.

Changes

  • Compiler configuration: Set maven.compiler.source and maven.compiler.target to 17
  • Enforcer plugin: Updated requireJavaVersion from 1.8.0 to 17
  • Javadoc plugin:
    • Removed deprecated additionalparam configuration
    • Updated API link to Java 17 documentation (https://docs.oracle.com/en/java/javase/17/docs/api/)

All changes confined to pom.xml. Project compiles to Java 17 bytecode and all 196 tests pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.oracle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/javadoc /usr/lib/jvm/temurin-17-jdk-amd64/bin/javadoc -J-Duser.language= -J-Duser.country= @options @packages (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Objective

Migrate the HtmlUnit-XPath project from Java 8 to Java 17.

Required Changes

1. Update pom.xml

Update the Maven compiler source and target versions:

  • Change <maven.compiler.source>8</maven.compiler.source> to <maven.compiler.source>17</maven.compiler.source> (line 23)
  • Change <maven.compiler.target>8</maven.compiler.target> to <maven.compiler.target>17</maven.compiler.target> (line 24)

2. Update Maven Enforcer Plugin

Update the required Java version in the maven-enforcer-plugin configuration:

  • Change <version>1.8.0</version> to <version>17</version> in the requireJavaVersion section (line 231)

3. Update Javadoc Plugin Configuration

Update the Javadoc links to point to Java 17 documentation:

  • Change <link>https://docs.oracle.com/javase/8/docs/api/</link> to <link>https://docs.oracle.com/en/java/javase/17/docs/api/</link> (line 113)

4. Update Javadoc Plugin Configuration (Remove deprecated parameter)

Remove the deprecated additionalparam configuration from maven-javadoc-plugin:

  • Remove line 111: <additionalparam>--allow-script-in-comments</additionalparam>
  • This parameter is no longer needed in Java 17

Files to Modify

  • pom.xml - All the changes above should be made to this file

Validation

  • Ensure the project builds successfully with JDK 17
  • Ensure all tests pass
  • Ensure Javadoc generation works correctly

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Migrate HtmlUnit-XPath project from Java 8 to Java 17 Migrate from Java 8 to Java 17 Dec 29, 2025
Copilot AI requested a review from rbri December 29, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants