Package org.apache.maven.wagon.proxy

Examples of org.apache.maven.wagon.proxy.ProxyInfo


                        {
                            SettingsDecryptionResult result =
                                settingsDecrypter.decrypt( new DefaultSettingsDecryptionRequest( proxy ) );
                            proxy = result.getProxy();

                            ProxyInfo proxyInfo = new ProxyInfo();
                            proxyInfo.setHost( proxy.getHost() );
                            // so hackish for wagon the protocol is https for site dav : dav:https://dav.codehaus.org/mojo/
                            proxyInfo.setType( protocol ); //proxy.getProtocol() );
                            proxyInfo.setPort( proxy.getPort() );
                            proxyInfo.setNonProxyHosts( proxy.getNonProxyHosts() );
                            proxyInfo.setUserName( proxy.getUsername() );
                            proxyInfo.setPassword( proxy.getPassword() );

                            getLog().debug( "found proxyInfo " + ( proxyInfo == null
                                ? "null"
                                : "host:port " + proxyInfo.getHost() + ":" + proxyInfo.getPort() + ", "
                                    + proxyInfo.getUserName() ) );

                            return proxyInfo;
                        }
                    }
                }
View Full Code Here


        }

        if ( proxy != null )
        {

            ProxyInfo proxyInfo = new ProxyInfo();
            proxyInfo.setNonProxyHosts( proxy.getNonProxyHosts() );

            // Get the host out of the JIRA URL
            URL url = null;
            try
            {
View Full Code Here

    }

    public void connect( Repository repository, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo )
        throws ConnectionException, AuthenticationException
    {
        final ProxyInfo proxy = proxyInfo;
        connect( repository, authenticationInfo, new ProxyInfoProvider()
        {
            public ProxyInfo getProxyInfo( String protocol )
            {
                if ( protocol == null || proxy == null || protocol.equalsIgnoreCase( proxy.getType() ) )
                {
                    return proxy;
                }
                else
                {
View Full Code Here

    protected ProxyInfo getProxyInfo( String protocol, String host )
    {
        if ( proxyInfoProvider != null )
        {
            ProxyInfo proxyInfo = proxyInfoProvider.getProxyInfo( protocol );
            if ( !ProxyUtils.validateNonProxyHosts( proxyInfo, host ) )
            {
                return proxyInfo;
            }
        }
View Full Code Here

    {
        boolean artifactFound = false;

        MavenJellyContext context = getProject().getContext();

        ProxyInfo proxyInfo = null;
        if ( context.getProxyHost() != null )
        {
            proxyInfo = new ProxyInfo();
            proxyInfo.setHost( context.getProxyHost() );
            try
            {
                proxyInfo.setPort( Integer.valueOf( context.getProxyPort() ).intValue() );
            }
            catch ( NumberFormatException e )
            {
                log.warn( "Ignoring invalid proxy port: '" + context.getProxyPort() + "'" );
            }
            proxyInfo.setUserName( context.getProxyUserName() );
            proxyInfo.setPassword( context.getProxyPassword() );
            proxyInfo.setNonProxyHosts( (String) context.getVariable( MavenConstants.PROXY_NONPROXYHOSTS ) );
            proxyInfo.setNtlmHost( (String) context.getVariable( MavenConstants.PROXY_NTLM_HOST ) );
            proxyInfo.setNtlmDomain( (String) context.getVariable( MavenConstants.PROXY_NTLM_DOMAIN ) );
        }

        String meterType = (String) context.getVariable( MavenConstants.DOWNLOAD_METER );
        if ( meterType == null )
        {
View Full Code Here

        {
            wagon = new FileWagon();
        }
        wagon.addTransferListener( new BootstrapDownloadMeter() );

        ProxyInfo proxyInfo = null;
        if ( proxyHost != null )
        {
            proxyInfo = new ProxyInfo();
            proxyInfo.setHost( proxyHost );
            proxyInfo.setPort( Integer.valueOf( proxyPort ).intValue() );
            proxyInfo.setUserName( proxyUserName );
            proxyInfo.setPassword( proxyPassword );
            proxyInfo.setNtlmHost( loginHost );
            proxyInfo.setNtlmDomain( loginDomain );
        }

        try
        {
            wagon.connect( repository, proxyInfo );
View Full Code Here

                wagon.addSessionListener( debug );
                wagon.addTransferListener( debug );
            }

            ProxyInfo proxyInfo = getProxyInfo( repository );

            if ( proxyInfo != null )
            {
                wagon.connect( repository, getAuthenticationInfo( id ), proxyInfo );
            }
View Full Code Here

        }
    }

    public ProxyInfo getProxy( String protocol )
    {
        ProxyInfo info = (ProxyInfo) proxies.get( protocol );
       
        if ( info != null )
        {
            getLogger().debug( "Using Proxy: " + info.getHost() );
        }
       
        return info;
    }
View Full Code Here

                          int port,
                          String username,
                          String password,
                          String nonProxyHosts )
    {
        ProxyInfo proxyInfo = new ProxyInfo();
        proxyInfo.setHost( host );
        proxyInfo.setType( protocol );
        proxyInfo.setPort( port );
        proxyInfo.setNonProxyHosts( nonProxyHosts );
        proxyInfo.setUserName( username );
        proxyInfo.setPassword( password );

        proxies.put( protocol, proxyInfo );
    }
View Full Code Here

     */
    private boolean connectToRepository( ProxyConnector connector, Wagon wagon, RemoteRepositoryContent remoteRepository )
    {
        boolean connected = false;

        ProxyInfo networkProxy = null;
        synchronized ( this.networkProxyMap )
        {
            networkProxy = (ProxyInfo) this.networkProxyMap.get( connector.getProxyId() );
        }

View Full Code Here

TOP

Related Classes of org.apache.maven.wagon.proxy.ProxyInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.