apache / apache/maven-jarsigner-plugin
Proxy nonProxyHosts includes literal quote characters breaking non-proxy host matching
- Dominant language
- Java
- Stars
- 23
- Forks
- 18
- Avg merge
- 4h 23m
- Merged PRs (30d)
- 2
Description
**Affected version:** HEAD
**File:** `src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java:526-531`
The `processArchive()` method wraps the `nonProxyHosts` value in literal quote characters when constructing `-J-D` arguments for the JVM:
```java
if (StringUtils.isNotEmpty(this.settings.getActiveProxy().getNonProxyHosts())) {
additionalArguments.add("-J-Dhttp.nonProxyHosts=\""
+ this.settings.getActiveProxy().getNonProxyHosts() + "\"");
additionalArguments.add("-J-Dftp.nonProxyHosts=\""
+ this.settings.getActiveProxy().getNonProxyHosts() + "\"");
}
```
These literal `\"` characters are passed to the JVM verbatim via the `-J` argument. The resulting system property value includes the quotes, e.g., `http.nonProxyHosts` would be set to `"localhost|*.example.com"` (with quotes) instead of `localhost|*.example.com`. This causes the non-proxy host matching to fail because the host patterns include quote characters.
The fix should remove the `\"` quoting around the value.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open src/main/java/org/apache/maven/plugins/jarsigner/AbstractJarsignerMojo.java and inspect processArchive() around lines 526-531. Verify how the nonProxyHosts value becomes the -J-Dhttp.nonProxyHosts and -J-Dftp.nonProxyHosts arguments; done means the resulting system properties contain the host patterns without literal quote characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100