+ * That is, one thread can try to list extensions, which results in {@link ExtensionFinder} + * loading and initializing classes. This happens inside a context of a lock, so that + * another thread that tries to list the same extensions don't end up creating different + * extension instances. So this activity locks extension list first, then class initialization next. + * + *
+ * In the mean time, another thread can load and initialize a class, and that initialization + * can eventually results in listing up extensions, for example through static initializer. + * Such activitiy locks class initialization first, then locks extension list. + * + *
+ * This inconsistent locking order results in a dead lock, you see. + * + *
+ * So to reduce the likelihood, this method is called in prior to {@link #find(Class, Hudson)} invocation, + * but from outside the lock. The implementation is expected to perform all the class initialization activities + * from here. + * + *
+ * See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6459208 for how to force a class initialization.
+ * Also see http://kohsuke.org/2010/09/01/deadlock-that-you-cant-avoid/ for how class initialization
+ * can results in a dead lock.
+ */
+ public void scout(Class extensionType, Hudson hudson) {
+ }
+
/**
* The default implementation that looks for the {@link Extension} marker.
*
@@ -132,6 +165,37 @@ public abstract class ExtensionFinder implements ExtensionPoint {
return result;
}
+
+ @Override
+ public void scout(Class extensionType, Hudson hudson) {
+ ClassLoader cl = hudson.getPluginManager().uberClassLoader;
+ for (IndexItem When the {@link Run#ARTIFACTS} permission is not turned on using the
+ * {@code hudson.security.ArtifactsPermission}, this permission must not be
+ * considered to be set to {@code false} for every user. It must rather be
+ * like if the permission doesn't exist at all (which means that every user
+ * has to have an access to the artifacts but the permission can't be
+ * configured in the security screen). Got it?
+ * Currently, "..", "../..", etc. are supported to indicate
+ * parameters that belong to the ancestors.
+ *
+ * @author Kohsuke Kawaguchi
+ * @since 1.376
+ */
+@Documented
+@Target(PARAMETER)
+@Retention(RUNTIME)
+public @interface RelativePath {
+ String value();
+}
diff --git a/core/src/main/java/hudson/TcpSlaveAgentListener.java b/core/src/main/java/hudson/TcpSlaveAgentListener.java
index c6b867029432713c3ce142baf3d858293422a2cc..f526f4c2625e109ee733be949794eb5dd54a3d49 100644
--- a/core/src/main/java/hudson/TcpSlaveAgentListener.java
+++ b/core/src/main/java/hudson/TcpSlaveAgentListener.java
@@ -249,6 +249,10 @@ public final class TcpSlaveAgentListener extends Thread {
}
}
});
+ } catch (AbortException e) {
+ logw.println(e.getMessage());
+ logw.println("Failed to establish the connection with the slave");
+ throw e;
} catch (IOException e) {
logw.println("Failed to establish the connection with the slave");
e.printStackTrace(logw);
diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java
index ac9df5b648039e46e3e63a1d2d1ba2895fc255fb..820d6df597d4fa4d89086d72ecdb543cd0d431c7 100644
--- a/core/src/main/java/hudson/Util.java
+++ b/core/src/main/java/hudson/Util.java
@@ -886,6 +886,10 @@ public class Util {
return l!=null ? l : Collections.
+ * {@link ConsoleNote} can have associated script.js and style.css (put them
+ * in the same resource directory that you normally put Jelly scripts), which will be loaded into
+ * the HTML page whenever the console notes are used. This allows you to use minimal markup in
+ * code generation, and do the styling in CSS and perform the rest of the interesting work as a CSS behaviour/JavaScript.
+ *
* @author Kohsuke Kawaguchi
* @since 1.349
*/
@@ -91,12 +98,16 @@ public abstract class ConsoleAnnotatorFactory
+ * {@link ConsoleNote} can have associated script.js and style.css (put them
+ * in the same resource directory that you normally put Jelly scripts), which will be loaded into
+ * the HTML page whenever the console notes are used. This allows you to use minimal markup in
+ * code generation, and do the styling in CSS and perform the rest of the interesting work as a CSS behaviour/JavaScript.
+ *
* @param
+ * Normally a matrix project uses the workspace location assigned by its parent container,
+ * but sometimes people have builds that have hard-coded paths.
+ *
+ *
+ * This is not {@link File} because it may have to hold a path representation on another OS.
+ *
+ *
+ * If this path is relative, it's resolved against {@link Node#getRootPath()} on the node where this workspace
+ * is prepared.
+ */
+ public void setCustomWorkspace(String customWorkspace) throws IOException {
+ this.customWorkspace= customWorkspace;
+ }
+
@Override
protected void updateTransientActions() {
synchronized(transientActions) {
@@ -243,6 +263,9 @@ public class MatrixProject extends AbstractProjectBehaviour, JavaScript, and CSS
+ * Behaviour, JavaScript, and CSS
+ * has used to have af special treatment.
+ *
+ * @deprecated as of 1.373
+ * System vs user difference are generalized into extension point.
*/
public boolean isSystem() {
- return name.equals("jdk") || name.equals("label");
+ return false;
}
public Iterator