本文整理了Java中org.codehaus.cargo.container.installer.ZipURLInstaller.setProxy()
方法的一些代码示例,展示了ZipURLInstaller.setProxy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipURLInstaller.setProxy()
方法的具体详情如下:
包路径:org.codehaus.cargo.container.installer.ZipURLInstaller
类名称:ZipURLInstaller
方法名:setProxy
[英]Sets proxy details.
[中]设置代理详细信息。
代码示例来源:origin: codehaus-cargo/cargo
/**
* Creates the {@link ZipURLInstaller} with the appropriate configuration.
* @param projectBuildDirectory Project build directory.
* @return a new instance of {@link ZipURLInstaller} configured using the attributes specified
* by the user
*/
public ZipURLInstaller createInstaller(String projectBuildDirectory)
{
String extractDir = getExtractDir();
if (extractDir == null)
{
extractDir = new File(projectBuildDirectory, EXTRACT_SUBDIRECTORY).getPath();
}
ZipURLInstaller installer = new ZipURLInstaller(getUrl(), getDownloadDir(), extractDir);
if (getProxy() != null)
{
installer.setProxy(getProxy());
}
return installer;
}
代码示例来源:origin: org.codehaus.cargo/cargo-ant
/**
* @return a new instance of {@link ZipURLInstaller} configured using the attributes specified
* by the user
*/
public ZipURLInstaller createInstaller()
{
ZipURLInstaller installer = new ZipURLInstaller(getInstallURL(), getDownloadDir(),
getExtractDir());
if (getProxy() != null)
{
installer.setProxy(getProxy());
}
return installer;
}
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* @return a new instance of {@link ZipURLInstaller} configured using the attributes specified
* by the user
*/
public ZipURLInstaller createInstaller()
{
ZipURLInstaller installer = new ZipURLInstaller(getInstallURL(), getDownloadDir(),
getExtractDir());
if (getProxy() != null)
{
installer.setProxy(getProxy());
}
return installer;
}
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* Test {@link ZipURLInstaller#install()} successful with a proxy.
* @throws Exception If anything goes wrong.
*/
public void testSuccessfulDownloadWhenProxySet() throws Exception
{
this.installer.setAntTaskFactory(
new AntTaskFactory()
{
@Override
public Task createTask(String taskName)
{
return new HarmlessGet();
}
});
Proxy proxy = new Proxy();
proxy.setHost("proxyhost");
this.installer.setProxy(proxy);
this.installer.download();
assertEquals(System.getProperty("http.proxyHost"), proxy.getHost());
}
代码示例来源:origin: codehaus-cargo/cargo
Proxy proxy = new Proxy();
proxy.setHost("proxyhost");
this.installer.setProxy(proxy);
代码示例来源:origin: codehaus-cargo/cargo
/**
* Install container using {@link ZipURLInstaller}.
* @return Location in which the container has been installed.
*/
private String installContainer()
{
ZipURLInstaller installer = new ZipURLInstaller(getTestData().installURL,
getTestData().downloadDir, getTestData().extractDir);
installer.setLogger(getLogger());
// Set up proxy
if (getTestData().proxy != null)
{
Proxy userProxy = getTestData().proxy;
userProxy.setLogger(getLogger());
installer.setProxy(userProxy);
}
installer.install();
return installer.getHome();
}
}
内容来源于网络,如有侵权,请联系作者删除!