I have settings.xml file under ./m2 directory as well as maven conf directory (in case), but it doesn't work for me. But I am glad I have found a way and that is working for me. It looks like I have to use settingsFile attributes and point it to a settings.xml file in the artifact:dependencies element, see below
<artifact:dependencies filesetId="dependency.fileset" pomRefId="mypom" settingsFile="./apache-maven-2.2.1/conf/settings.xml" /> Regards, RJ. On Mon, May 16, 2011 at 11:04 AM, Stephen Connolly < [email protected]> wrote: > if ~/.ant/settings.xml exists it will read that > otherwise if ~/.m2/settings.xml exists it will read that > otherwise it assumes default settings.xml > > if your settings.xml has proxy details that is what it will use. > > I'd like to get the proxy settings more ant-like but too many things on my > plate (plus it should use the settings.xml if that is present, only when in > default mode should the ant proxy settings be used - that is if the proxy > support was the way I think it should be) > > -Stephen > > On 16 May 2011 15:40, Rashid Jilani <[email protected]> wrote: > > > Hi: gurus I am trying to use the Maven ant task ( > > http://maven.apache.org/ant-tasks/index.html) behind the proxy but it is > > not > > working. First of all I am not sure how the maven ant task picks the > > proxies > > settings. > > > > 1. Does it go to local maven installation and pick the settings.xml ? or > > maven-ant-tasks-2.1.3.jar contains the maven implementation itself. My > > guess > > is that maven-ant-tasks-2.1.3.jar is all you need to run Maven ant task? > > can > > some please confirms? > > > > 2. I already set both ant_opts as well as java_opts for the proxy setting > > but no luck. > > > > 3. I can run the maven ant task from the same machine with out any issues > > in > > environment with out the proxies. > > > > 4. I can run default Maven and all other software behind proxy with out > any > > issue, so I am sure my proxy setting has no issue. > > > > Any help would be appreciated. > > > > Regards, > > RJ. > > >
