[FIXED JENKINS-11420] rewrote the JDK installer to avoid using HtmlUnit.
This lets us get rid of Xalan safely (as well as other often problematic
dependencies like nekohtml + Xerces combo), and reduce the dependency
footprint.
(cherry picked from commit e1691a1)
Conflicts:
changelog.html
core/pom.xml
core/src/main/java/hudson/tools/JDKInstaller.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// some times we are redirected to the SSO login page.
HtmlPagehtml = (HtmlPage) page;
URLloginUrl = page.getWebResponse().getUrl();
if (!loginUrl.getHost().equals("login.oracle.com"))
thrownewIOException("Expected to see a login page but instead saw "+loginUrl);
Stringu = getDescriptor().getUsername();
Secretp = getDescriptor().getPassword();
if (u==null || p==null) {
log.hyperlink(getCredentialPageUrl(),"Oracle now requires Oracle account to download previous versions of JDK. Please specify your Oracle account username/password.\n");
thrownewAbortException("Unable to install JDK unless a valid username/password is provided.");
}
if (totalPageCount++>16) // looping too much
thrownewIOException("Unable to find the login form in "+html.asXml());
intauthCount=0, totalPageCount=0; // counters for avoiding infinite loop
log.hyperlink(getCredentialPageUrl(),"Oracle now requires Oracle account to download previous versions of JDK. Please specify your Oracle account username/password.\n");
thrownewAbortException("Unable to install JDK unless a valid Oracle account username/password is provided in the system configuration.");