Skip to content

Conversation

Copy link

Copilot AI commented Dec 29, 2025

Migrates the project from JDK 8 to JDK 17 as the minimum required Java version.

Changes

  • pom.xml: Updated maven.compiler.source and maven.compiler.target to 17, enforcer plugin requirement to 17, and Javadoc API links to Java 17
  • .github/workflows/codeql.yml: Added explicit JDK 17 setup using actions/setup-java@v4 with Temurin distribution
  • README.md: Updated prerequisites to specify Java 17 or later requirement

All tests pass with the new JDK version. No code changes required for Java 17 compatibility.

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:

  • junit.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/htmlunit-csp/htmlunit-csp org.codehaus.plexus.classworlds.launcher.Launcher clean verify -DskipTests=false (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/htmlunit-csp/htmlunit-csp org.codehaus.plexus.classworlds.launcher.Launcher clean package -Dgpg.skip=true (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-csp project from its current JDK version to JDK 17.

Required Changes

1. Build Configuration

  • Update Maven pom.xml or Gradle build files to set Java source and target compatibility to version 17
  • Update maven.compiler.source and maven.compiler.target properties to 17 (if using Maven)
  • Update sourceCompatibility and targetCompatibility to 17 (if using Gradle)
  • Update any compiler plugin configurations to use Java 17

2. CI/CD Configuration

  • Update GitHub Actions workflows (.github/workflows/*.yml) to use JDK 17
  • Change java-version in setup-java actions to '17'
  • Update any other CI configuration files that specify Java versions

3. Documentation

  • Update README.md to reflect JDK 17 as the minimum requirement
  • Update any developer documentation mentioning Java version requirements
  • Update contributing guidelines if they mention Java versions

4. Code Compatibility

  • Review and update code to ensure compatibility with JDK 17
  • Remove any deprecated API usages that were removed in JDK 17
  • Consider using new JDK 17 features where appropriate (optional)
  • Ensure all dependencies are compatible with JDK 17

5. IDE Configuration

  • Update .idea or Eclipse configuration files if present to use JDK 17
  • Update any .editorconfig or similar files

6. Docker/Container Configuration

  • Update Dockerfile(s) if present to use JDK 17 base images
  • Update any container-related configuration

Acceptance Criteria

  • All build files specify JDK 17 as the source and target version
  • All CI/CD pipelines use JDK 17
  • Documentation is updated to reflect the JDK 17 requirement
  • Project builds successfully with JDK 17
  • All tests pass with JDK 17

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Update Maven compiler source and target to Java 17, update enforcer plugin requirements, update GitHub Actions workflow to use JDK 17, update Javadoc links, and update README with prerequisites

Co-authored-by: rbri <2544132+rbri@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate htmlunit-csp project to JDK 17 Migrate project to JDK 17 Dec 29, 2025
Copilot AI requested a review from rbri December 29, 2025 11:08
Copy link
Contributor

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested but this looks sane to me.

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.

3 participants