Addressed proxy issues for maven in vagrant
Change-Id: Ia349bf07cf354cfa2a1efe19b85e918c22c63732
This commit is contained in:
parent
1aaa720149
commit
903c9fe5bf
|
@ -4,8 +4,8 @@
|
|||
<id>main-proxy</id>
|
||||
<active>true</active>
|
||||
<protocol>http</protocol>
|
||||
<host>proxy.bbn.hp.com</host>
|
||||
<port>8080</port>
|
||||
<host>proxy_host</host>
|
||||
<port>proxy_port</port>
|
||||
<nonProxyHosts>localhost|10.0.2.15</nonProxyHosts>
|
||||
</proxy>
|
||||
</proxies>
|
||||
|
|
|
@ -11,6 +11,13 @@ else
|
|||
echo Created .m2 directory `ls -la`
|
||||
fi
|
||||
|
||||
echo Now we need to move the settings.xml into place...
|
||||
echo Move the settings.xml into place
|
||||
|
||||
ACTUAL_PROXY=`echo ${http_proxy} | awk 'BEGIN { FS = "//"} ;{ print $2 }'`
|
||||
PROXY_HOST=`echo $ACTUAL_PROXY | awk 'BEGIN { FS = ":"} ;{ print $1 }'`
|
||||
PROXY_PORT=`echo $ACTUAL_PROXY | awk 'BEGIN { FS = ":"} ;{ print $2 }'`
|
||||
echo Assuming http proxy host = ${PROXY_HOST}, port = ${PROXY_PORT}
|
||||
sed -i "s/proxy_host/${PROXY_HOST}/g" /home/ubuntu/settings.xml
|
||||
sed -i "s/proxy_port/${PROXY_PORT}/g" /home/ubuntu/settings.xml
|
||||
cp /home/ubuntu/settings.xml /root/.m2/.
|
||||
chown root:root /root/.m2/settings.xml
|
||||
|
|
Loading…
Reference in New Issue