groovy connect to proxy then download files
- by senzacionale
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')