Fri, 21 Aug 2009 15:59:27 -0700
+
hudson (1.320) unstable; urgency=low
* See http://hudson.dev.java.net/changelog.html for more details.
diff --git a/maven-agent/pom.xml b/maven-agent/pom.xml
index 6dbceffc50..54cf599081 100644
--- a/maven-agent/pom.xml
+++ b/maven-agent/pom.xml
@@ -27,7 +27,7 @@ THE SOFTWARE.
org.jvnet.hudson.main
pom
- 1.321-SNAPSHOT
+ 1.322-SNAPSHOT
../pom.xml
diff --git a/maven-interceptor/pom.xml b/maven-interceptor/pom.xml
index fe03bb29f5..8ebe6039df 100644
--- a/maven-interceptor/pom.xml
+++ b/maven-interceptor/pom.xml
@@ -27,7 +27,7 @@ THE SOFTWARE.
org.jvnet.hudson.main
pom
- 1.321-SNAPSHOT
+ 1.322-SNAPSHOT
../pom.xml
diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml
index 91dffe5abf..06b894629c 100644
--- a/maven-plugin/pom.xml
+++ b/maven-plugin/pom.xml
@@ -27,7 +27,7 @@ THE SOFTWARE.
org.jvnet.hudson.main
pom
- 1.321-SNAPSHOT
+ 1.322-SNAPSHOT
maven-plugin
diff --git a/pom.xml b/pom.xml
index ce0d2f245d..99dcfa3095 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@ THE SOFTWARE.
org.jvnet.hudson.main
pom
- 1.321-SNAPSHOT
+ 1.322-SNAPSHOT
pom
Hudson main module
diff --git a/remoting/pom.xml b/remoting/pom.xml
index 53f64666b1..446a059220 100644
--- a/remoting/pom.xml
+++ b/remoting/pom.xml
@@ -27,7 +27,7 @@ THE SOFTWARE.
org.jvnet.hudson.main
pom
- 1.321-SNAPSHOT
+ 1.322-SNAPSHOT
../pom.xml
diff --git a/remoting/src/main/java/hudson/remoting/Which.java b/remoting/src/main/java/hudson/remoting/Which.java
index d96b1ac8b6..e89c906e07 100644
--- a/remoting/src/main/java/hudson/remoting/Which.java
+++ b/remoting/src/main/java/hudson/remoting/Which.java
@@ -83,12 +83,13 @@ public class Which {
return new File(decode(new URL("file:/"+resURL).getPath()));
}
- if(resURL.startsWith("zip:/")){
+ if(resURL.startsWith("zip:")){
// weblogic uses this. See http://www.nabble.com/patch-to-get-Hudson-working-on-weblogic-td23997258.html
- resURL = resURL.substring("zip:/".length(), resURL.lastIndexOf('!')); // cut off zip: and the file name portion
- return new File(decode(new URL("file:/"+resURL).getPath()));
+ // also see http://www.nabble.com/Re%3A-Hudson-on-Weblogic-10.3-td25038378.html#a25043415
+ resURL = resURL.substring("zip:".length(), resURL.lastIndexOf('!')); // cut off zip: and the file name portion
+ return new File(decode(new URL("file:"+resURL).getPath()));
}
-
+
if(resURL.startsWith("file:")) {
// unpackaged classes
int n = clazz.getName().split("\\.").length; // how many slashes do wo need to cut?
diff --git a/test/pom.xml b/test/pom.xml
index 7c3248e333..481cb3464b 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -27,7 +27,7 @@ THE SOFTWARE.
pom
org.jvnet.hudson.main
- 1.321-SNAPSHOT
+ 1.322-SNAPSHOT
4.0.0
org.jvnet.hudson.main
diff --git a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
index 4517b1cefe..307e34cb3b 100644
--- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
+++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
@@ -846,6 +846,35 @@ public abstract class HudsonTestCase extends TestCase {
return this;
}
+ /**
+ * Executes the given closure on the server, in the context of an HTTP request.
+ * This is useful for testing some methods that require {@link StaplerRequest} and {@link StaplerResponse}.
+ *
+ *
+ * The closure will get the request and response as parameters.
+ */
+ public Object executeOnServer(final Closure c) throws Throwable {
+ final Throwable[] t = new Throwable[1];
+ final Object[] r = new Object[1];
+
+ ClosureExecuterAction cea = hudson.getExtensionList(RootAction.class).get(ClosureExecuterAction.class);
+ UUID id = UUID.randomUUID();
+ cea.add(id,new Runnable() {
+ public void run() {
+ try {
+ r[0] = c.call();
+ } catch (Throwable e) {
+ t[0] = e;
+ }
+ }
+ });
+ createWebClient().goTo("closures/?uuid="+id);
+
+ if (t[0]!=null)
+ throw t[0];
+ return r[0];
+ }
+
/**
* Sometimes a part of a test case may ends up creeping into the serialization tree of {@link Saveable#save()},
* so detect that and flag that as an error.
diff --git a/war/pom.xml b/war/pom.xml
index ad5a949333..d9ad41039c 100644
--- a/war/pom.xml
+++ b/war/pom.xml
@@ -27,7 +27,7 @@ THE SOFTWARE.
org.jvnet.hudson.main
pom
- 1.321-SNAPSHOT
+ 1.322-SNAPSHOT
../pom.xml
@@ -112,7 +112,7 @@ THE SOFTWARE.
-
+