You configure this for the plugin in the pom:
http://mojo.codehaus.org/jaxb2-maven-plugin/xjc-mojo.html#httpproxy

Unfortunately this has the very unfortunate effect of making the build
complicated as you certainly don't want to hardcode your creds into the
pom, but need to use properties. Which then need to be specify in
everyone's settings.xml. :-( I've run into the same problem with the
jaxws-maven-plugin.
If this param had been possible to specify from command line instead it
would be simpler. If this is something you need, please file a JIRA ticket
for this improvement. It will not solve your problem in the short term
though as a new release is not planned any time soon.

What could *possibly* work is to use the common Java http proxy system
properties. I haven't tried it so I can't tell. Without digging into the
code I can't remember if the proxy setting is controlled by the plugin
itself or/and the underlying library (jaxb-xjc). If you get this to work,
please report back in this thread to add this tip to the mailing list
archive.

/Anders


On Thu, Jul 24, 2014 at 4:21 PM, Sebastian Geiger <sbas...@gmx.net> wrote:

> Dear Maven users,
>
> sorry for bothering you. I am using the maven-jaxb2-plugin and have a
> problem with authentication. I am generating Java classes from a WSDL of
> a web service that is running on Windows and which is secured by NTLM
> authentication. I am on Linux and so I need to pass the necessary
> password and username combination somehow to maven or the plugin.
>
> I could not find any information about this in the documentation of the
> plugin.
>
> If I access the web service from my java code I can simply use a class
> that extends from java.net.Authenticator and which provides the
> necessary password and username to Java. So I believe there must be a
> way to achieve the same from Maven and with your plugin. Do you know how?
>
> Kind regards
> Sebastian
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to