Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle plugin: "Cannot cast object" error when JAVA_TOOL_OPTIONS with proxy settings is defined #5174

Closed
ldrag opened this issue Dec 22, 2022 · 1 comment

Comments

@ldrag
Copy link

ldrag commented Dec 22, 2022

Hi, I have encountered an issue when using dependency-check-gradle plugin in version 7.4.1 with JAVA_TOOL_OPTIONS.

Steps to reproduce:

  1. Define JAVA_TOOL_OPTIONS env with value:
    "-Dhttps.proxyHost=proxy.my-domain.com -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=localhost|127.*|[::1]|*.my-domain.com"
  2. Run gradle dependencyCheckAnalyze

This results in the following error:

> Task :dependencyCheckAnalyze FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dependencyCheckAnalyze'.
> Cannot cast object 'localhost|127.*|[::1]|*.my-domain.com' with class 'java.lang.String' to class 'java.util.List'

What is interesting is that if I e.g. remove Dhttps.proxyHost and leave https.proxyPort and http.nonProxyHosts settings all seems to work fine.

I would appreciate if someone could have a look at the issue.

@jeremylong
Copy link
Collaborator

Will be fixed with 7.4.2 which should be released shortly. See dependency-check/dependency-check-gradle#298

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants