mojohaus / jaxb2-maven-plugin

JAXB2 Maven Plugin
https://www.mojohaus.org/jaxb2-maven-plugin/
Apache License 2.0
106 stars 77 forks source link

Fix for #60, saving proxy property values before XJC execution #122

Closed shelgen closed 5 years ago

shelgen commented 5 years ago

Fixes #60

Added a facet for saving property values, or the lack of them, before tool executions. Unfortunately the existing SystemPropertyChangeEnvironmentFacet provides no possibility of doing this if the property has no value before the tool execution.

I made use of this in AbstractJavaGeneratorMojo to save the 4 proxy property values that @efeat correctly identified as being overwritten in com.sun.tools.xjc.Options.parseArguments(String[]).

As this will clear the proxy properties after the tool execution if they were initially clear, this would solve the "loss" of nonProxyHosts due to the usage of system property overrides.