Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinston Prakash2015-04-30 00:01:02 -0400
committerWinston Prakash2015-04-30 00:01:02 -0400
commit2b45c76ceba3a40d95771cd9c37974e3ac257409 (patch)
tree881e9459044ccd194117535326ac27d11b110e14
parent695e5eb7e541882b14f690abcdbd810ab3da1164 (diff)
downloadorg.eclipse.hudson.core-2b45c76ceba3a40d95771cd9c37974e3ac257409.tar.gz
org.eclipse.hudson.core-2b45c76ceba3a40d95771cd9c37974e3ac257409.tar.xz
org.eclipse.hudson.core-2b45c76ceba3a40d95771cd9c37974e3ac257409.zip
Bug Fix: 465870 - Create new Plugin Central for Hudson 3.3.0
-rw-r--r--hudson-core/src/main/java/hudson/model/DownloadService.java4
-rw-r--r--hudson-core/src/main/java/hudson/model/UpdateCenter.java19
-rw-r--r--hudson-core/src/main/java/hudson/model/UpdateSite.java49
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java10
-rw-r--r--hudson-core/src/test/java/hudson/model/UpdateCenterTest.java5
-rw-r--r--hudson-war/pom.xml2
6 files changed, 46 insertions, 43 deletions
diff --git a/hudson-core/src/main/java/hudson/model/DownloadService.java b/hudson-core/src/main/java/hudson/model/DownloadService.java
index 5e8fbb8d..02c047fb 100644
--- a/hudson-core/src/main/java/hudson/model/DownloadService.java
+++ b/hudson-core/src/main/java/hudson/model/DownloadService.java
@@ -25,11 +25,9 @@ import hudson.util.IOUtils;
import hudson.util.QuotedStringTokenizer;
import hudson.util.TextFile;
import hudson.util.TimeUnit2;
-
import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;
-
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
@@ -119,7 +117,7 @@ public class DownloadService extends PageDecorator {
*
* @param url URL relative to {@link UpdateCenter#getUrl()}. So if this
* string is "foo.json", the ultimate URL will be something like
- * "https://hudson-ci.org/update-center3.2/foo.json"
+ * "https://hudson-ci.org/update-center3.3/foo.json"
*
* For security and privacy reasons, we don't allow the retrieval from
* random locations.
diff --git a/hudson-core/src/main/java/hudson/model/UpdateCenter.java b/hudson-core/src/main/java/hudson/model/UpdateCenter.java
index bf6f615f..6e6a3b31 100644
--- a/hudson-core/src/main/java/hudson/model/UpdateCenter.java
+++ b/hudson-core/src/main/java/hudson/model/UpdateCenter.java
@@ -30,13 +30,11 @@ import hudson.lifecycle.Lifecycle;
import hudson.model.UpdateSite.Data;
import hudson.model.UpdateSite.Plugin;
import hudson.model.listeners.SaveableListener;
-import hudson.util.*;
-import org.apache.commons.io.input.CountingInputStream;
-import org.apache.commons.io.output.NullOutputStream;
-import org.kohsuke.stapler.StaplerResponse;
-
-import javax.net.ssl.SSLHandshakeException;
-import javax.servlet.ServletException;
+import hudson.util.DaemonThreadFactory;
+import hudson.util.IOException2;
+import hudson.util.IOUtils;
+import hudson.util.PersistedList;
+import hudson.util.XStream2;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -60,7 +58,12 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;
+import javax.net.ssl.SSLHandshakeException;
+import javax.servlet.ServletException;
+import org.apache.commons.io.input.CountingInputStream;
+import org.apache.commons.io.output.NullOutputStream;
import org.eclipse.hudson.security.HudsonSecurityManager;
+import org.kohsuke.stapler.StaplerResponse;
import org.springframework.security.core.Authentication;
/**
@@ -471,7 +474,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
@SuppressWarnings({"UnusedDeclaration"})
public static class UpdateCenterConfiguration implements ExtensionPoint {
- private final String updateServer = System.getProperty("updateServer", "http://hudson-ci.org/update-center3.2/");
+ private final String updateServer = System.getProperty("updateServer", "http://hudson-ci.org/update-center3.3/");
/**
* Creates default update center configuration - uses settings for
diff --git a/hudson-core/src/main/java/hudson/model/UpdateSite.java b/hudson-core/src/main/java/hudson/model/UpdateSite.java
index ef76523f..cfed0e22 100644
--- a/hudson-core/src/main/java/hudson/model/UpdateSite.java
+++ b/hudson-core/src/main/java/hudson/model/UpdateSite.java
@@ -15,55 +15,52 @@
package hudson.model;
-import hudson.PluginWrapper;
import hudson.PluginManager;
-import hudson.model.UpdateCenter.UpdateCenterJob;
+import hudson.PluginWrapper;
import hudson.lifecycle.Lifecycle;
+import hudson.model.UpdateCenter.UpdateCenterJob;
+import hudson.util.CertificateUtil;
import hudson.util.IOUtils;
import hudson.util.JSONCanonicalUtils;
-import hudson.util.TextFile;
-import hudson.util.VersionNumber;
-import hudson.util.CertificateUtil;
import hudson.util.SignatureOutputStream;
+import hudson.util.TextFile;
import static hudson.util.TimeUnit2.DAYS;
-
-import net.sf.json.JSONObject;
-import org.kohsuke.stapler.DataBoundConstructor;
-import org.kohsuke.stapler.StaplerRequest;
-import org.kohsuke.stapler.StaplerResponse;
-import org.apache.commons.io.output.NullOutputStream;
-import org.apache.commons.io.output.TeeOutputStream;
-
+import hudson.util.VersionNumber;
+import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
-import java.io.ByteArrayInputStream;
import java.io.OutputStreamWriter;
+import java.security.DigestOutputStream;
+import java.security.GeneralSecurityException;
+import java.security.MessageDigest;
+import java.security.Signature;
+import java.security.cert.CertificateFactory;
+import java.security.cert.TrustAnchor;
+import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.TreeMap;
-import java.util.HashMap;
import java.util.Set;
+import java.util.TreeMap;
import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
-import java.security.GeneralSecurityException;
-import java.security.MessageDigest;
-import java.security.DigestOutputStream;
-import java.security.Signature;
-import java.security.cert.X509Certificate;
-import java.security.cert.CertificateFactory;
-import java.security.cert.TrustAnchor;
-
import javax.servlet.ServletContext;
import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.output.NullOutputStream;
+import org.apache.commons.io.output.TeeOutputStream;
import org.eclipse.hudson.security.HudsonSecurityManager;
+import org.kohsuke.stapler.DataBoundConstructor;
+import org.kohsuke.stapler.StaplerRequest;
+import org.kohsuke.stapler.StaplerResponse;
/**
* Source of the update center information, like
- * "http://hudson-ci.org/update-center3.2/update-center.json"
+ * "http://hudson-ci.org/update-center3.3/update-center.json"
*
* <p> Hudson can have multiple {@link UpdateSite}s registered in the system, so
* that it can pick up plugins from different locations.
@@ -92,7 +89,7 @@ public class UpdateSite {
private final String id;
/**
* Path to <tt>update-center.json</tt>, like
- * <tt>http://hudson-ci.org/update-center3.2/update-center.json</tt>.
+ * <tt>http://hudson-ci.org/update-center3.3/update-center.json</tt>.
*/
private final String url;
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java b/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java
index a01a4827..75ded30a 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java
@@ -24,7 +24,13 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.sf.json.JSONObject;
@@ -44,7 +50,7 @@ public final class UpdateSiteManager {
public static final String RECOMMENDED = "recommended";
public static final String OBSOLETE = "obsolete";
private Map<String, AvailablePluginInfo> availablePluginInfos = new TreeMap<String, AvailablePluginInfo>(String.CASE_INSENSITIVE_ORDER);
- private final String updateServer = System.getProperty("updateServer", "http://hudson-ci.org/update-center3.2/");
+ private final String updateServer = System.getProperty("updateServer", "http://hudson-ci.org/update-center3.3/");
private String updateSiteUrl = updateServer + "update-center.json";
private ProxyConfiguration proxyConfig;
private final String id = "default";
diff --git a/hudson-core/src/test/java/hudson/model/UpdateCenterTest.java b/hudson-core/src/test/java/hudson/model/UpdateCenterTest.java
index 9ab480df..c6ca6be2 100644
--- a/hudson-core/src/test/java/hudson/model/UpdateCenterTest.java
+++ b/hudson-core/src/test/java/hudson/model/UpdateCenterTest.java
@@ -19,12 +19,11 @@ package hudson.model;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
+import static junit.framework.Assert.assertTrue;
import net.sf.json.JSONObject;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
-import static junit.framework.Assert.assertTrue;
-
/**
* Quick test for {@link UpdateCenter}.
*
@@ -51,7 +50,7 @@ public class UpdateCenterTest {
return;
}
- URL url = new URL("http://hudson-ci.org/update-center3.2/update-center.json?version=build");
+ URL url = new URL("http://hudson-ci.org/update-center3.3/update-center.json?version=build");
String jsonp = IOUtils.toString(url.openStream());
String json = jsonp.substring(jsonp.indexOf('(')+1,jsonp.lastIndexOf(')'));
diff --git a/hudson-war/pom.xml b/hudson-war/pom.xml
index 45dbd0de..5c9f6b40 100644
--- a/hudson-war/pom.xml
+++ b/hudson-war/pom.xml
@@ -262,7 +262,7 @@
</goals>
<configuration>
<url>http://hudson-ci.org</url>
- <fromFile>update-center3.2/update-center.json</fromFile>
+ <fromFile>update-center3.3/update-center.json</fromFile>
<toDir>target/generated-resources/WEB-INF</toDir>
</configuration>
</execution>

Back to the top