You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by amaresh mourya <am...@gmail.com> on 2010/01/11 10:46:53 UTC

How to add proxy information to Wagon Manager that comes from the plexus container?

Hi All,

(Sorry for unrelated post on this list, but I tried on plexus and wagon user
list  and got no response so this is just hit and try for me, thanks if
someone can help..)

I am creating an application using plexus container and in need of adding
proxy information to wagon manager,Right now I am adding proxy this way :

NOTE : pc is plexus container
////////////////////////////

DefaultWagonManager dwm;

try {
       dwm = (DefaultWagonManager)pc.lookup(WagonManager.ROLE);
       dwm.addProxy("http",www-myhost.com,80,null,null,null);
    }
    catch (ComponentLookupException e)
    {
    }

//////////////////////////

And this way everything works fine, but wondering . is it the right way to
add proxy info to Wagon manager?
Is it possible that lookup will not always return me the Wagon manager?

Thanks,
Amaresh

Re: How to add proxy information to Wagon Manager that comes from the plexus container?

Posted by Dan Tran <da...@gmail.com>.
this may help

http://svn.codehaus.org/mojo/tags/wagon-maven-plugin-1.0-beta-2/src/main/java/org/codehaus/mojo/wagon/shared/WagonUtils.java

-D

On Mon, Jan 11, 2010 at 1:46 AM, amaresh mourya
<am...@gmail.com> wrote:
> Hi All,
>
> (Sorry for unrelated post on this list, but I tried on plexus and wagon user
> list  and got no response so this is just hit and try for me, thanks if
> someone can help..)
>
> I am creating an application using plexus container and in need of adding
> proxy information to wagon manager,Right now I am adding proxy this way :
>
> NOTE : pc is plexus container
> ////////////////////////////
>
> DefaultWagonManager dwm;
>
> try {
>       dwm = (DefaultWagonManager)pc.lookup(WagonManager.ROLE);
>       dwm.addProxy("http",www-myhost.com,80,null,null,null);
>    }
>    catch (ComponentLookupException e)
>    {
>    }
>
> //////////////////////////
>
> And this way everything works fine, but wondering . is it the right way to
> add proxy info to Wagon manager?
> Is it possible that lookup will not always return me the Wagon manager?
>
> Thanks,
> Amaresh
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org