Could you send me a package with the source of the core of the project 
maven-proxy ?
I can't connect to the CVS repository from my machine, and it will take me a 
long time to get all the source by HTTP.

Thanks in advance...
________________________ _ _ _
bgOnline

-----Original Message-----
From: Peter Bright [mailto:[EMAIL PROTECTED]
Sent: jeudi 10 novembre 2005 12:13
To: Maven Users List
Subject: RE: How to make a quick mirror of the repository central ?


It's pretty easy to make maven-proxy support NTLM for its own upstream proxies. 
 Whether this change breaks it in any way, I don't know; we need to be able to 
use an NTLM proxy and aren't actually bothered if it breaks non-NTLM proxies, 
and for NTLM proxies it works fine.

I built and changed maven-proxy from CVS in late July '05; I don't think it's 
changed since then so I think these changes should still be correct.  I'd give 
a diff if I had the original source lying about, but I don't, so I won't (since 
I hate fighting with cvsgrab I'm not going to redownload it):

1) Add a 'domain' property to org.apache.maven.proxy.config.ProxyConfiguration 
(so a getter, a field, an argument in the constructor).
2) Make org.apache.maven.proxy.config.PropertyLoader populate this new domain 
field:
            String propertyList = props.getProperty( "proxy.list" );
            if ( propertyList != null )
            {
                StringTokenizer tok = new StringTokenizer( propertyList, "," );
                while ( tok.hasMoreTokens() )
                {
                    String key = tok.nextToken();
                    String host = getMandatoryProperty( props, "proxy." + key + 
".host" );
                    int port = Integer.parseInt( getMandatoryProperty( props, 
"proxy." + key + ".port" ) );
                    // the username and password isn't required
                    String username = props.getProperty( "proxy." + key + 
".username" );
                    String password = props.getProperty( "proxy." + key + 
".password" );
                    String domain   = props.getProperty( "proxy." + key + 
".domain"   );
                    ProxyConfiguration pc = new ProxyConfiguration( key, host, 
port, username, password, domain );
                    rcc.addProxy( pc );
                }
            }


3) Make org.apache.maven.proxy.config.HttpRepoConfiguration use an NTCredentals 
object for its authentication:
    private HttpClient createHttpClient()
    {
        HttpClient client = new HttpClient();
        HostConfiguration hostConf = new HostConfiguration();
        ProxyConfiguration proxy = getProxy();

        if ( proxy != null )
        {
            hostConf.setProxy( proxy.getHost(), proxy.getPort() );
            client.setHostConfiguration( hostConf );
            if ( proxy.getUsername() != null )
            {
                Credentials creds = new NTCredentials( proxy.getUsername(), 
proxy.getPassword(), proxy.getHost(), proxy.getDomain() );
                client.getState().setProxyCredentials( null, null, creds );
            }
        }
        return client;
    }

I think that's it--the httpclient library knows how to speak NTLM, it's just it 
needs to get the right kind of credentials object to do so.  This change gives 
it one.  You now have an additional "domain" property for proxy auth settings, 
so populate that appropriately, and you should be good to go.

YMMV, E&OE, etc..

> -----Original Message-----
> From: Blaise Gosselin [mailto:[EMAIL PROTECTED] 
> Sent: 10 November 2005 10:10
> To: Maven Users List
> Subject: RE: How to make a quick mirror of the repository central ?
> 
> Hello Nicolas,
> 
> Thanks for your help.
> I find it quite easy to configure the maven-proxy, but I have 
> a problem with my proxy.
> In fact, I have the following exception :
> 
> 2005-11-10 10:52:23,562 [WARN ] 
> commons.httpclient.HttpMethodBase  - Credentials cannot be 
> used for NTLM authentication: 
> org.apache.commons.httpclient.UsernamePasswordCredentials
> 
> Any idea ??
> Thanks in advance.
> _______________________ _ _ _
> bgOnline
> 
> -----Original Message-----
> From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
> Sent: jeudi 10 novembre 2005 10:20
> To: Maven Users List
> Subject: Re: How to make a quick mirror of the repository central ?
> 
> 
> 
> You can use maven-proxy that can merge downloads from ibilio 
> (and get repository upgrades) and private artifacts.
> 
> This is usefull as you will get a private copy of maven repo 
> limited to the artifact you're realy using in your projects.
> 
> Blaise Gosselin a écrit :
> 
> >Hello,
> > 
> >I have to use to my own remote reopsitory, and so I'd like 
> to make a one-shot download of the central remote repository 
> of Maven2.
> >How can I do that ? Is there a way to connect by FTP to the 
> ibiblio server ?
> >Or is there a plugin in Maven2 that allows to make this ?
> >Can I use a tool like teleportpro ?
> > 
> >Does someone have an idea ?
> >Thanks in advance.
> >______________________ _ _ _
> >bgOnline
> > 
> >
> >  
> >
> 
> This message contains information that may be privileged or 
> confidential and is the property of the Capgemini Group. It 
> is intended only for the person to whom it is addressed. If 
> you are not the intended recipient,  you are not authorized 
> to read, print, retain, copy, disseminate,  distribute, or 
> use this message or any part thereof. If you receive this  
> message in error, please notify the sender immediately and 
> delete all  copies of this message.
> 
> 
> ---------------------------------------------------------------------
> 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]
> 
> 

*******************************************************************************
The information contained in this electronic message may be confidential and/or 
privileged. Any unauthorized use, dissemination, distribution, or reproduction 
is strictly prohibited. If you have received this communication in error, 
please contact the sender by reply email and destroy all copies of the original 
message.
*******************************************************************************


---------------------------------------------------------------------
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