groovy connect to proxy then download files
        Posted  
        
            by senzacionale
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by senzacionale
        
        
        
        Published on 2010-06-10T06:36:56Z
        Indexed on 
            2010/06/10
            6:43 UTC
        
        
        Read the original article
        Hit count: 245
        
groovy
i want to grab the grapes but i am behind proxy so i can not download anything. How can i connect to proxy before downloading?
import groovy.text.SimpleTemplateEngine
import java.security.MessageDigest
import org.apache.commons.cli.OptionBuilder
import org.apache.commons.cli.Options
import org.apache.commons.cli.PosixParser
import org.apache.commons.io.FileUtils
import org.apache.ivy.core.settings.IvySettings
import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser
import org.apache.tools.ant.Project
import org.apache.tools.ant.ProjectHelper
import org.apache.tools.ant.types.Path
import org.apache.commons.cli.HelpFormatter
//First grab the grapes we need for the script and create a few beans to hold some values
@Grab(group = 'org.apache.ant', module = 'ant', version = '1.7.1')
@Grab(group = 'commons-io', module = 'commons-io', version = '1.4')
@Grab(group = 'commons-cli', module = 'commons-cli', version = '1.2')
@Grab(group = 'org.apache.ivy', module = 'ivy', version = '2.1.0')
        © Stack Overflow or respective owner