提交 7a0bd976 编写于 作者: K Kohsuke Kawaguchi

fixed JDK auto installer

上级 113c3a56
......@@ -61,6 +61,8 @@ Upcoming changes</a>
<li class=bug>
Fixed a regression in 1.462 that introduced Java6 dependency.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13659">issue 13659</a>)
<li class=bug>
Fixed JDK auto-installer
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -41,6 +41,7 @@ import hudson.util.HttpResponses;
import hudson.util.Secret;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.apache.commons.httpclient.Cookie;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethodBase;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
......@@ -370,6 +371,7 @@ public class JDKInstaller extends ToolInstaller {
int authCount=0, totalPageCount=0; // counters for avoiding infinite loop
HttpMethodBase m = new GetMethod(primary.filepath);
hc.getState().addCookie(new Cookie(".oracle.com","gpw_e24",".", "/", -1, false));
try {
while (true) {
if (totalPageCount++>16) // looping too much
......
......@@ -107,7 +107,7 @@ public class JDKInstallerTest extends HudsonTestCase {
retrieveUpdateCenterData();
JDKInstaller i = new JDKInstaller("jdk-6u13-oth-JPR@CDS-CDS_Developer", true);
JDKInstaller i = new JDKInstaller("jdk-7u3-oth-JPR", true);
StreamTaskListener listener = StreamTaskListener.fromStdout();
i.locate(listener, Platform.LINUX, CPU.i386);
i.locate(listener, Platform.WINDOWS, CPU.amd64);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册