metro-jax-ws
metro-jax-ws copied to clipboard
Consider allowing easier authentication than Xauthfile
Context
Use the com.sun.xml.ws:jaxws-maven-plugin
task to “wsimport” a WSDL file from some URL that requires authentication.
Current behavior
One needs to use something like this.
<configuration>
<wsdlUrls>https://example.com/myWSDL</wsdlUrls>
<xauthFile>WSDL_credentials.txt</xauthFile>
</configuration>
The file WSDL_credentials.txt
must contain something like (for example): https://encoded-username:encoded-password@*
.
Desired behavior
It would be great to be able to use some more common mechanism for authentication, like environment variables. Something like this would be great: provide some way to tell the plugin to first look at system properties; if this fails, look at environment variables; if this fails, look at some configuration file. (Also, the syntax of that file could be simplified, I think, though this is of lower priority.)
Rationale
When, for example, building an application on a continuous integration server, the need of generating a file with this unusual syntax and with encoded data makes it cumbersome to build. It is also very unusual, and thus does not integrate with various mechanisms that providers of CI platforms make available to ease life of developers facing the need to use secrets to authenticate to various sources (example). I had to develop and test a custom GitHub action, for example, just to build some software using this JAX-WS task.
Thanks for this useful plugin, in any case!