Skip to content

Commit

Permalink
Added support for proxies (ceylon/ceylon-module-resolver#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
quintesse committed May 5, 2015
1 parent f9efa2f commit 3c1be3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/com/redhat/ceylon/ceylondoc/LinkRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ private boolean checkHttpUrlExist(String moduleUrl) {
Boolean result = ceylonDocTool.getModuleUrlAvailabilityCache().get(moduleUrl);
if( result == null ) {
try {
HttpURLConnection con = (HttpURLConnection) new URL(moduleUrl + "index.html").openConnection();
HttpURLConnection con = (HttpURLConnection) new URL(moduleUrl + "index.html").openConnection(DefaultToolOptions.getDefaultProxy());
con.setConnectTimeout((int) DefaultToolOptions.getDefaultTimeout());
con.setReadTimeout((int) DefaultToolOptions.getDefaultTimeout() * Constants.READ_TIMEOUT_MULTIPLIER);
con.setRequestMethod("HEAD");
Expand Down
2 changes: 1 addition & 1 deletion src/com/redhat/ceylon/compiler/ModuleDescriptorReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void debug(String str) {
private final Module moduleDescriptor;

public ModuleDescriptorReader(String moduleName, File srcDir) throws NoSuchModuleException {
RepositoryManagerBuilder builder = new RepositoryManagerBuilder(new NullLogger(), DefaultToolOptions.getDefaultOffline(), (int)DefaultToolOptions.getDefaultTimeout());
RepositoryManagerBuilder builder = new RepositoryManagerBuilder(new NullLogger(), DefaultToolOptions.getDefaultOffline(), (int)DefaultToolOptions.getDefaultTimeout(), DefaultToolOptions.getDefaultProxy());
RepositoryManager repoManager = builder.buildRepository();
VFS vfs = new VFS();
Context context = new Context(repoManager, vfs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected List<Declaration> getDecls(String resource) throws Exception {
if (!file.exists()) {
throw new RuntimeException("Unable to find resource " + name);
}
RepositoryManagerBuilder builder = new RepositoryManagerBuilder(new NullLogger(), false, 20000);
RepositoryManagerBuilder builder = new RepositoryManagerBuilder(new NullLogger(), false, 20000, java.net.Proxy.NO_PROXY);
RepositoryManager repoManager = builder.buildRepository();
VFS vfs = new VFS();
Context context = new Context(repoManager, vfs);
Expand Down

0 comments on commit 3c1be3a

Please sign in to comment.