Oops, sorry for breaking the e-mail thread. I forgot to modify the
message before sending it and left digest related info.

2010/9/16 Bartosz Kowalewski <[email protected]>:
> Hi Stephen,
>
> Thanks a lot for help. This is definitely a workaround that solves my
> issue as I don't need to have fully fledged support for proxies. I can
> assume that there's a single <proxy> node in my settings.xml file and
> this node handles HTTP.
>
> However, after seeing all those antrun setproxy examples that were
> using 'activeProxy' as part of a property name I was hoping that
> antrun handles proxies defined in settings.xml and the antrun Mojo
> contains this line:
>
> Proxy activeProxy = org.apache.maven.settings.Settings.getActiveProxy();
>
> It seems it does not :). I've just took a quick look at antrun sources
> and I don't see org.apache.maven.settings.Settings being used there
> :).
>
> Once again, thanks for help.
>
> Bartek
>
>> From: Stephen Connolly <[email protected]>
>> To: Maven Users List <[email protected]>
>> Date: Thu, 16 Sep 2010 08:44:53 +0100
>> Subject: Re: How to make ${settings.x} style properties work?
>> http://ant.apache.org/manual/Tasks/xmlproperty.html
>>
>> <project>
>> <build>
>> <plugins>
>> <plugin>
>> <artifactId>maven-antrun-plugin</artifactId>
>> <configuration>
>> <tasks>
>> <xmlproperty file="${user.home}/.m2/settings.xml" prefix="settings"/>
>>
>> there might be a better way that would interact with the mvn -s ____ cli
>> option but that should get you at least part way functional
>>
>> On 15 September 2010 22:26, Bartosz Kowalewski <[email protected]
>>> wrote:
>>
>>> Hello,
>>>
>>> According to the POM Reference website, it is possible to access
>>> settings defined in the settings.xml file by using ${settings.x} style
>>> properties. In my pom.xml I need to access proxy settings that are
>>> required to properly configure HTTP proxy to be used by some Ant
>>> (antrun) tasks. I found some examples on the Internet and tried using
>>> Maven properties like: settings.activeProxy.port and
>>> settings.activeProxy.host. However, antrun plugin complains that these
>>> properties haven't been set. I thought that the way in which contents
>>> of the settings.xml file should be accessed might have changed since
>>> the examples with settings.activeProxy.* were created, so I tried
>>> using:
>>> - different versions of Maven (2.1.0, 2.2.1)
>>> - different properties as the real path is not
>>> settings->activeProxy->host, but settings->proxies->proxy->host; I
>>> wanted to check if a simpler path (i.e. settings.localRepository =
>>> settings->localRepository) works
>>> Both experiments were unsuccessful :(
>>>
>>> What am I doing wrong? Is it a general problem with accessing settings
>>> defined in settings.xml or is antrun that only copies Maven project
>>> properties and ignores Maven settings.xml properties? What's the
>>> easiest way to access Maven proxy settings and use these with antrun?
>>>
>>> Thanks a lot for help!
>>>
>>> Bartek
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to