Using HTTP Proxy (on corporate network)

7 views
Skip to first unread message

Joacim J

unread,
Sep 26, 2014, 2:23:56 AM9/26/14
to soi-tool...@googlegroups.com
Hi,

I am trying to download dependencies when connected to corporate network but fails even if I have proxy defined in {USER_HOME}/.m2/settings.xml and as I understand SOI Toolkit downloads it's own settings.xml and override the user defined in commands.
However I got it working by adding the proxy into {M2_HOME}/config/settings.xml instead.

Is this how you do it when behind a proxy server or do you recommend another approach?

Regards
Joacim

Håkan Dahl

unread,
Sep 26, 2014, 3:39:06 AM9/26/14
to soi-tool...@googlegroups.com
Joacim,

the proxy setting is a maven installation config, soi-toolkit has nothing to do with proxy settings.
It should work with proxy-settings in USER_HOME/.m2/settings.xml (which takes precedence over M2_HOME/conf/settings.xml) as documented in:
If it doesn't work, I suspect it comes down to a problem within maven.

However, the recommended approach for build repeatability over time is to configure your local settings.xml to use a corporate maven repository (like Sonatype's Nexus) that proxies all requests and stores downloaded artifacts. That would probably move the proxy config from your settings.xml to the corporate repo configuration.

Cheers,
/Håkan

--
You received this message because you are subscribed to the Google Groups "soi-toolkit-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to soi-toolkit-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joacim J

unread,
Sep 26, 2014, 5:31:30 AM9/26/14
to soi-tool...@googlegroups.com
Hi Håkan,

Yes, in "normal" cases that works but in this case when populating local Maven repo with pom.xml downloaded here http://search.maven.org/#search|ga|1|soitoolkit-populate-local-maven-repo and execute mvn install it will download another setting.xml in 
C:\joacim\Projects\Mule\SoiToolkitSetup\target and then when the commands in /target/antrun/build-main.xml are executed e.g. 

  <echo>#######################################################################################</echo>
  <echo>Build the service description component, requires $MAVEN_HOME/bin to be in $PATH</echo>
  <echo>#######################################################################################</echo>
  <exec dir="C:\v008789\Projects\Mule\SoiToolkitSetup\target/soitoolkit-populate-local-maven-repo-sdc-schemas" executable="mvn" failonerror="true" osfamily="unix">
    <arg line="-s"/>
    <arg line="C:\joacim\Projects\Mule\SoiToolkitSetup\target/settings.xml"/>
    <arg line="install eclipse:eclipse"/>
  </exec>

it uses the downloaded settings.xml file instead of the one in {USER_HOME}/.m2

We are using Sonatype's Nexus but doesn't seem to have this proxy configuration (at least with restrictions).
Anyway, I have it working with the global config

Thanks for your reply.

Regards
Joacim
Reply all
Reply to author
Forward
0 new messages