maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <rfscho...@apache.org>
Subject Re: Using Maven's configured proxy in a plugin?
Date Mon, 21 May 2018 17:46:26 GMT
Of course :)

This is probably a good example:
https://github.com/apache/maven-javadoc-plugin/blob/master/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java#L3582

best,
Robert

On Mon, 21 May 2018 19:04:07 +0200, Mark Raynsford  
<org.apache.maven.user@io7m.com> wrote:

> I have a plugin that uses URL.openStream to load external content:
>
>   https://github.com/io7m/minisite/blob/develop/com.io7m.minisite.maven_plugin/src/main/java/com/io7m/minisite/maven_plugin/MinSiteMojo.java#L362
>
> It seems that although the Maven instance is configured to use a proxy
> in .m2/settings.xml, the plugin doesn't know about this proxy setting
> and tries to connect directly. This obviously doesn't work in the
> typical corporate firewall setting. Maven itself uses the proxy
> correctly; it downloads artifacts through the proxy as expected.
>
> Is there a way to get access to a Proxy instance configured from
> Maven's settings that I can use in the plugin?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message