You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by da...@apache.org on 2010/09/22 16:58:16 UTC

svn commit: r1000018 - /incubator/aries/trunk/spi-fly/spi-fly-itests/pom.xml

Author: davidb
Date: Wed Sep 22 14:58:15 2010
New Revision: 1000018

URL: http://svn.apache.org/viewvc?rev=1000018&view=rev
Log:
[ARIES-373] antrun-setproxy.patch applied on behalf of Bartosz Kowalewski

Modified:
    incubator/aries/trunk/spi-fly/spi-fly-itests/pom.xml

Modified: incubator/aries/trunk/spi-fly/spi-fly-itests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/spi-fly/spi-fly-itests/pom.xml?rev=1000018&r1=1000017&r2=1000018&view=diff
==============================================================================
--- incubator/aries/trunk/spi-fly/spi-fly-itests/pom.xml (original)
+++ incubator/aries/trunk/spi-fly/spi-fly-itests/pom.xml Wed Sep 22 14:58:15 2010
@@ -198,9 +198,45 @@
                         </goals>
                         <configuration>
                             <tasks>
+                                <!-- Add Ant tasks from the ant-contrib jar -->
+                                <taskdef
+                                    resource="net/sf/antcontrib/antcontrib.properties" />
+
                                 <property name="output.path"
                                     location="${project.build.directory}/weaver" />
 
+                                <!-- Load contents of the settings.xml file -->
+                                <xmlproperty
+                                    file="${user.home}/.m2/settings.xml"
+                                    prefix="settingsxml" keepRoot="false" />
+                                <if>
+                                    <isset
+                                        property="settingsxml.proxies.proxy.host" />
+                                    <then>
+                                        <echo
+                                            message="Proxy settings found. Using ${settingsxml.proxies.proxy.host}:${settingsxml.proxies.proxy.port}" />
+
+                                        <!--
+                                            Please note: this is a workaround that will not
+                                            properly handle a situation when settings.xml contains
+                                            definitions of multiple proxies. Properties defined
+                                            in settings.xml should be read by the antrun plugin
+                                            and made available through Ant properties. Such brute
+                                            force workarounds like the one used here should not be
+                                            required.
+                                        -->
+                                        <!-- Proxy auth is not used. -->
+                                        <setproxy
+                                            proxyHost="${settingsxml.proxies.proxy.host}"
+                                            proxyPort="${settingsxml.proxies.proxy.port}"
+                                            nonProxyHosts="${settings.proxies.proxy.nonProxyHosts}" />
+                                    </then>
+                                    <else>
+                                        <echo
+                                            message="Proxy settings not found." />
+                                    </else>
+                                </if>
+
                                 <!-- Download Equinox Aspects feature from Eclipse Incubator. -->
                                 <get src="${equinox.aspects.url}"
                                     dest="${project.build.directory}/equinox-aspects.zip" />
@@ -255,6 +291,11 @@
                         <artifactId>ant-apache-regexp</artifactId>
                         <version>1.8.1</version>
                     </dependency>
+                    <dependency>
+                        <groupId>ant-contrib</groupId>
+                        <artifactId>ant-contrib</artifactId>
+                        <version>1.0b3</version>
+                    </dependency>
                 </dependencies>
             </plugin>
         </plugins>