diff --git a/cli/pom.xml b/cli/pom.xml
index 13e99471e7..8857f0c7a6 100644
--- a/cli/pom.xml
+++ b/cli/pom.xml
@@ -4,7 +4,7 @@
pomorg.jenkins-ci.main
- 1.408-SNAPSHOT
+ 1.411-SNAPSHOTcliJenkins CLI
diff --git a/core/pom.xml b/core/pom.xml
index 923e4692f7..f399578516 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -28,7 +28,7 @@ THE SOFTWARE.
org.jenkins-ci.mainpom
- 1.408-SNAPSHOT
+ 1.411-SNAPSHOT../pom.xml
@@ -348,9 +348,9 @@ THE SOFTWARE.
${project.version}
- org.jvnet.hudson
+ org.jenkins-cicrypto-util
- 1.0
+ 1.1org.jvnet.hudson
@@ -382,7 +382,7 @@ THE SOFTWARE.
org.kohsuke.staplerstapler-jelly
- 1.162
+ 1.164commons-jelly
@@ -438,11 +438,6 @@ THE SOFTWARE.
localizer1.10
-
- org.kohsuke
- graph-layouter
- 1.0
- antlrantlr
@@ -599,11 +594,6 @@ THE SOFTWARE.
-
- org.jvnet.hudson
- commons-jelly
- 1.1-hudson-20100305
- org.jvnet.hudsoncommons-jexl
@@ -685,9 +675,9 @@ THE SOFTWARE.
1.14
- org.jvnet.hudson
+ org.jenkins-cimemory-monitor
- 1.3
+ 1.5com.octo.captcha
@@ -778,17 +768,17 @@ THE SOFTWARE.
net.java.sezpozsezpoz
- 1.7
+ 1.9
- org.jvnet.hudson
+ org.jenkins-cijinterop-wmi
- 1.0
+ 1.1
- org.jvnet.hudson
+ org.jenkins-ciwindows-remote-command
- 1.0
+ 1.3org.kohsuke.metainf-services
diff --git a/core/src/main/java/hudson/AboutJenkins.java b/core/src/main/java/hudson/AboutJenkins.java
new file mode 100644
index 0000000000..e8136e1f5d
--- /dev/null
+++ b/core/src/main/java/hudson/AboutJenkins.java
@@ -0,0 +1,30 @@
+package hudson;
+
+import hudson.model.ManagementLink;
+
+/**
+ * Show "About Jenkins" link.
+ *
+ * @author Kohsuke Kawaguchi
+ */
+@Extension
+public class AboutJenkins extends ManagementLink {
+ @Override
+ public String getIconFileName() {
+ return "help.png";
+ }
+
+ @Override
+ public String getUrlName() {
+ return "about";
+ }
+
+ public String getDisplayName() {
+ return Messages.AboutJenkins_DisplayName();
+ }
+
+ @Override
+ public String getDescription() {
+ return Messages.AboutJenkins_Description();
+ }
+}
diff --git a/core/src/main/java/hudson/DNSMultiCast.java b/core/src/main/java/hudson/DNSMultiCast.java
index e6065d74e1..f5c33a3edf 100644
--- a/core/src/main/java/hudson/DNSMultiCast.java
+++ b/core/src/main/java/hudson/DNSMultiCast.java
@@ -1,6 +1,7 @@
package hudson;
import hudson.model.Hudson;
+import hudson.Util;
import javax.jmdns.JmDNS;
import javax.jmdns.ServiceInfo;
@@ -39,6 +40,8 @@ public class DNSMultiCast implements Closeable {
if (tal!=null)
props.put("slave-port",String.valueOf(tal.getPort()));
+ props.put("server-id", Util.getDigestOf(hudson.getSecretKey()));
+
jmdns.registerService(ServiceInfo.create("_hudson._tcp.local.","hudson",
80,0,0,props)); // for backward compatibility
jmdns.registerService(ServiceInfo.create("_jenkins._tcp.local.","jenkins",
diff --git a/core/src/main/java/hudson/ExtensionFinder.java b/core/src/main/java/hudson/ExtensionFinder.java
index 7f1f078321..cb50027b0d 100644
--- a/core/src/main/java/hudson/ExtensionFinder.java
+++ b/core/src/main/java/hudson/ExtensionFinder.java
@@ -184,11 +184,9 @@ public abstract class ExtensionFinder implements ExtensionPoint {
} catch (LinkageError e) {
// sometimes the instantiation fails in an indirect classloading failure,
// which results in a LinkageError
- LOGGER.log(item.annotation().optional() ? Level.FINE : Level.WARNING,
- "Failed to load "+item.className(), e);
+ LOGGER.log(logLevel(item), "Failed to load "+item.className(), e);
} catch (InstantiationException e) {
- LOGGER.log(item.annotation().optional() ? Level.FINE : Level.WARNING,
- "Failed to load "+item.className(), e);
+ LOGGER.log(logLevel(item), "Failed to load "+item.className(), e);
}
}
@@ -219,15 +217,18 @@ public abstract class ExtensionFinder implements ExtensionPoint {
// this appears to be the only way to force a class initialization
Class.forName(extType.getName(),true,extType.getClassLoader());
} catch (InstantiationException e) {
- LOGGER.log(item.annotation().optional() ? Level.FINE : Level.WARNING,
- "Failed to scout "+item.className(), e);
+ LOGGER.log(logLevel(item), "Failed to scout "+item.className(), e);
} catch (ClassNotFoundException e) {
- LOGGER.log(Level.WARNING,"Failed to scout "+item.className(), e);
+ LOGGER.log(logLevel(item), "Failed to scout "+item.className(), e);
} catch (LinkageError e) {
- LOGGER.log(Level.WARNING,"Failed to scout "+item.className(), e);
+ LOGGER.log(logLevel(item), "Failed to scout "+item.className(), e);
}
}
}
+
+ private Level logLevel(IndexItem item) {
+ return item.annotation().optional() ? Level.FINE : Level.WARNING;
+ }
}
private static final Logger LOGGER = Logger.getLogger(ExtensionFinder.class.getName());
diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java
index f18f560a7c..6fbba0a519 100644
--- a/core/src/main/java/hudson/FilePath.java
+++ b/core/src/main/java/hudson/FilePath.java
@@ -48,7 +48,6 @@ import hudson.util.IOUtils;
import static hudson.util.jna.GNUCLibrary.LIBC;
import static hudson.Util.fixEmpty;
import static hudson.FilePath.TarCompression.GZIP;
-import hudson.os.PosixAPI;
import hudson.org.apache.tools.tar.TarInputStream;
import hudson.util.io.Archiver;
import hudson.util.io.ArchiverFactory;
@@ -1132,7 +1131,7 @@ public final class FilePath implements Serializable {
if(!isUnix()) return -1;
return act(new FileCallable() {
public Integer invoke(File f, VirtualChannel channel) throws IOException {
- return PosixAPI.get().stat(f.getPath()).mode();
+ return IOUtils.mode(f);
}
});
}
diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java
index 35b8bde113..a52968cc64 100644
--- a/core/src/main/java/hudson/Functions.java
+++ b/core/src/main/java/hudson/Functions.java
@@ -84,6 +84,7 @@ import org.kohsuke.stapler.Ancestor;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
+import org.kohsuke.stapler.jelly.InternationalizedStringExpression.RawHtmlArgument;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
@@ -538,6 +539,10 @@ public class Functions {
return Util.xmlEscape(s);
}
+ public static String xmlUnescape(String s) {
+ return s.replace("<","<").replace(">",">").replace("&","&");
+ }
+
public static String htmlAttributeEscape(String text) {
StringBuilder buf = new StringBuilder(text.length()+64);
for( int i=0; i= 10.6
+ */
+ public static boolean isSnowLeopardOrLater() {
+ try {
+ return isDarwin() && new VersionNumber(System.getProperty("os.version")).compareTo(new VersionNumber("10.6"))>=0;
+ } catch (IllegalArgumentException e) {
+ // failed to parse the version
+ return false;
+ }
+ }
}
diff --git a/core/src/main/java/hudson/PluginWrapper.java b/core/src/main/java/hudson/PluginWrapper.java
index 55e038bb93..168edc426b 100644
--- a/core/src/main/java/hudson/PluginWrapper.java
+++ b/core/src/main/java/hudson/PluginWrapper.java
@@ -397,6 +397,15 @@ public class PluginWrapper implements Comparable {
return manifest.getMainAttributes().getValue("Plugin-Class");
}
+ public boolean hasLicensesXml() {
+ try {
+ new URL(baseResourceURL,"WEB-INF/licenses.xml").openStream().close();
+ return true;
+ } catch (IOException e) {
+ return false;
+ }
+ }
+
/**
* Makes sure that all the dependencies exist, and then accept optional dependencies
* as real dependencies.
diff --git a/core/src/main/java/hudson/UDPBroadcastThread.java b/core/src/main/java/hudson/UDPBroadcastThread.java
index bb1e3e8965..877e3604ac 100644
--- a/core/src/main/java/hudson/UDPBroadcastThread.java
+++ b/core/src/main/java/hudson/UDPBroadcastThread.java
@@ -25,6 +25,7 @@ package hudson;
import hudson.model.Hudson;
import hudson.util.OneShotEvent;
+import hudson.Util;
import java.io.IOException;
import java.net.BindException;
@@ -77,6 +78,7 @@ public class UDPBroadcastThread extends Thread {
StringBuilder rsp = new StringBuilder("");
tag(rsp,"version",Hudson.VERSION);
tag(rsp,"url",hudson.getRootUrl());
+ tag(rsp,"server-id", Util.getDigestOf(hudson.getSecretKey()));
tag(rsp,"slave-port",tal==null?null:tal.getPort());
for (UDPBroadcastFragment f : UDPBroadcastFragment.all())
diff --git a/core/src/main/java/hudson/init/Initializer.java b/core/src/main/java/hudson/init/Initializer.java
index 5d5bea4526..d693314b7c 100644
--- a/core/src/main/java/hudson/init/Initializer.java
+++ b/core/src/main/java/hudson/init/Initializer.java
@@ -36,7 +36,7 @@ import static hudson.init.InitMilestone.STARTED;
import static hudson.init.InitMilestone.COMPLETED;
/**
- * Placed on static methods to indicate that this method is to be run during the Hudson start up to perform
+ * Placed on static methods to indicate that this method is to be run during the Jenkins start up to perform
* some sort of initialization tasks.
*
*
Example
diff --git a/core/src/main/java/hudson/lifecycle/UnixLifecycle.java b/core/src/main/java/hudson/lifecycle/UnixLifecycle.java
index 0d67fc1b91..1cbfa14a2a 100644
--- a/core/src/main/java/hudson/lifecycle/UnixLifecycle.java
+++ b/core/src/main/java/hudson/lifecycle/UnixLifecycle.java
@@ -31,6 +31,8 @@ import com.sun.jna.StringArray;
import java.io.IOException;
import static hudson.util.jna.GNUCLibrary.*;
+
+import hudson.Platform;
import hudson.model.Hudson;
/**
@@ -86,7 +88,9 @@ public class UnixLifecycle extends Lifecycle {
// http://factor-language.blogspot.com/2007/07/execve-returning-enotsup-on-mac-os-x.html
// on Mac, execv fails with ENOTSUP if the caller is multi-threaded, resulting in an error like
// the one described in http://www.nabble.com/Restarting-hudson-not-working-on-MacOS--to24641779.html
- if (Hudson.isDarwin())
+ //
+ // according to http://www.mail-archive.com/wine-devel@winehq.org/msg66797.html this now works on Snow Leopard
+ if (Platform.isDarwin() && !Platform.isSnowLeopardOrLater())
throw new RestartNotSupportedException("Restart is not supported on Mac OS X");
if (args==null)
throw new RestartNotSupportedException("Failed to obtain the command line arguments of the process",failedToObtainArgs);
diff --git a/core/src/main/java/hudson/matrix/MatrixBuild.java b/core/src/main/java/hudson/matrix/MatrixBuild.java
index 27376ec614..60f8675975 100644
--- a/core/src/main/java/hudson/matrix/MatrixBuild.java
+++ b/core/src/main/java/hudson/matrix/MatrixBuild.java
@@ -323,17 +323,6 @@ public class MatrixBuild extends AbstractBuild {
for (MatrixAggregator a : aggregators)
a.endBuild();
}
-
- @Override
- protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws IOException, InterruptedException {
- String customWorkspace = getProject().getCustomWorkspace();
- if (customWorkspace != null) {
- // we allow custom workspaces to be concurrently used between jobs.
- return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace)));
- }
- return super.decideWorkspace(n,wsl);
- }
-
}
/**
diff --git a/core/src/main/java/hudson/matrix/MatrixProject.java b/core/src/main/java/hudson/matrix/MatrixProject.java
index 7735423a01..4776ee5893 100644
--- a/core/src/main/java/hudson/matrix/MatrixProject.java
+++ b/core/src/main/java/hudson/matrix/MatrixProject.java
@@ -1,7 +1,8 @@
/*
* The MIT License
*
- * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Jorg Heymans, Red Hat, Inc., id:cactusman
+ * Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi,
+ * Jorg Heymans, Red Hat, Inc., id:cactusman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -40,7 +41,6 @@ import hudson.model.Items;
import hudson.model.JDK;
import hudson.model.Job;
import hudson.model.Label;
-import hudson.model.Node;
import hudson.model.Queue.FlyweightTask;
import hudson.model.ResourceController;
import hudson.model.Result;
@@ -63,6 +63,7 @@ import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.TokenList;
+import org.kohsuke.stapler.export.Exported;
import javax.servlet.ServletException;
import java.io.File;
@@ -143,11 +144,6 @@ public class MatrixProject extends AbstractProject im
*/
private Result touchStoneResultCondition;
- /**
- * See {@link #setCustomWorkspace(String)}.
- */
- private String customWorkspace;
-
public MatrixProject(String name) {
this(Hudson.getInstance(), name);
}
@@ -229,28 +225,6 @@ public class MatrixProject extends AbstractProject im
this.touchStoneResultCondition = touchStoneResultCondition;
}
- public String getCustomWorkspace() {
- return customWorkspace;
- }
-
- /**
- * User-specified workspace directory, or null if it's up to Hudson.
- *
- *
- * 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 List createTransientActions() {
List r = super.createTransientActions();
@@ -430,6 +404,7 @@ public class MatrixProject extends AbstractProject im
* In contract, inactive configurations are those that are left for archival purpose
* and no longer built when a new {@link MatrixBuild} is executed.
*/
+ @Exported
public Collection getActiveConfigurations() {
return activeConfigurations;
}
@@ -594,12 +569,6 @@ public class MatrixProject extends AbstractProject im
this.touchStoneCombinationFilter = null;
}
- if(req.hasParameter("customWorkspace")) {
- customWorkspace = req.getParameter("customWorkspace.directory");
- } else {
- customWorkspace = null;
- }
-
// parse system axes
DescribableList newAxes = new DescribableList(this);
newAxes.rebuildHetero(req, json, Axis.all(),"axis");
diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java
index 880354b4e9..0c00c5d23c 100644
--- a/core/src/main/java/hudson/model/AbstractBuild.java
+++ b/core/src/main/java/hudson/model/AbstractBuild.java
@@ -31,6 +31,7 @@ import hudson.Util;
import hudson.FilePath;
import hudson.console.AnnotatedLargeText;
import hudson.console.ExpandableDetailsNote;
+import hudson.model.listeners.RunListener;
import hudson.slaves.WorkspaceList;
import hudson.slaves.NodeProperty;
import hudson.slaves.WorkspaceList.Lease;
@@ -393,6 +394,11 @@ public abstract class AbstractBuild
,R extends Abs
* Passed in for the convenience. The returned path must be registered to this object.
*/
protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws InterruptedException, IOException {
+ String customWorkspace = getProject().getCustomWorkspace();
+ if (customWorkspace != null) {
+ // we allow custom workspaces to be concurrently used between jobs.
+ return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace)));
+ }
// TODO: this cast is indicative of abstraction problem
return wsl.allocate(n.getWorkspaceFor((TopLevelItem)getProject()));
}
@@ -475,6 +481,13 @@ public abstract class AbstractBuild
,R extends Abs
buildEnvironments = new ArrayList();
+ for (RunListener rl: RunListener.all()) {
+ Environment environment = rl.setUpEnvironment(AbstractBuild.this, l, listener);
+ if (environment != null) {
+ buildEnvironments.add(environment);
+ }
+ }
+
for (NodeProperty nodeProperty: Hudson.getInstance().getGlobalNodeProperties()) {
Environment environment = nodeProperty.setUp(AbstractBuild.this, l, listener);
if (environment != null) {
diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java
index a5e1a3f889..9519e1dc0b 100644
--- a/core/src/main/java/hudson/model/AbstractProject.java
+++ b/core/src/main/java/hudson/model/AbstractProject.java
@@ -219,6 +219,13 @@ public abstract class AbstractProject
,R extends A
throw new CmdLineException(null,Messages.AbstractItem_NoSuchJobExists(name,AbstractProject.findNearest(name).getFullName()));
return item;
}
+
+ public String getCustomWorkspace() {
+ return customWorkspace;
+ }
+
+ /**
+ * User-specified workspace directory, or null if it's up to Jenkins.
+ *
+ *
+ * Normally a 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.
+ *
+ * @since 1.410
+ */
+ public void setCustomWorkspace(String customWorkspace) throws IOException {
+ this.customWorkspace= customWorkspace;
+ save();
+ }
}
diff --git a/core/src/main/java/hudson/model/AperiodicWork.java b/core/src/main/java/hudson/model/AperiodicWork.java
new file mode 100644
index 0000000000..c1afafd860
--- /dev/null
+++ b/core/src/main/java/hudson/model/AperiodicWork.java
@@ -0,0 +1,94 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2011, Vojtech Juranek
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package hudson.model;
+
+import hudson.ExtensionList;
+import hudson.ExtensionPoint;
+import hudson.triggers.SafeTimerTask;
+import hudson.triggers.Trigger;
+
+import java.util.Random;
+import java.util.logging.Logger;
+
+
+
+/**
+ * Extension point which allows scheduling a task with variable interval. Interval in evaluated every time before next
+ * task is scheduled by calling {@link #getRecurrencePeriod()}. Task to be scheduled is obtain by calling {@link #getNewInstance()}.
+ *
+ *
+ * This class is similar to {@link PeriodicWork}. The main difference is in re-evaluating delay interval every time.
+ * See {@link PeriodicWork} for details. Analog of {@link AsyncPeriodicWork} is {@link AsyncAperiodicWork}.
+ *
+ * @author vjuranek
+ * @since 1.410
+ */
+public abstract class AperiodicWork extends SafeTimerTask implements ExtensionPoint {
+
+ protected final Logger logger = Logger.getLogger(getClass().getName());
+
+ /**
+ * Gets the number of milliseconds between successive executions.
+ *
+ *
+ * Jenkins calls this method every time the timer task is scheduled.
+ *
+ */
+ public abstract long getRecurrencePeriod();
+
+ /**
+ * Gets new instance of task to be executed. Method should return new instance each time, as there no check, if previously
+ * scheduled task already finished. Returning same instance could lead to throwing {@link IllegalStateException} (especially
+ * in case of {@link AsyncAperiodicWork}) and therefore scheduling of next tasks will be broken.
+ *
+ * @return AperiodicWork - timer task instance to be executed
+ */
+ public abstract AperiodicWork getNewInstance();
+
+ /**
+ * Gets the number of milliseconds till the first execution.
+ *
+ *
+ * By default it chooses the value randomly between 0 and {@link #getRecurrencePeriod()}
+ */
+ public long getInitialDelay() {
+ return Math.abs(new Random().nextLong())%getRecurrencePeriod();
+ }
+
+ @Override
+ public final void doRun() throws Exception{
+ doAperiodicRun();
+ Trigger.timer.schedule(getNewInstance(), getRecurrencePeriod());
+ }
+
+ protected abstract void doAperiodicRun();
+
+ /**
+ * Returns all the registered {@link AperiodicWork}s.
+ */
+ public static ExtensionList all() {
+ return Hudson.getInstance().getExtensionList(AperiodicWork.class);
+ }
+
+}
diff --git a/core/src/main/java/hudson/model/AsyncAperiodicWork.java b/core/src/main/java/hudson/model/AsyncAperiodicWork.java
new file mode 100644
index 0000000000..53b2451059
--- /dev/null
+++ b/core/src/main/java/hudson/model/AsyncAperiodicWork.java
@@ -0,0 +1,120 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2011, Vojtech Juranek
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package hudson.model;
+
+import hudson.security.ACL;
+import hudson.util.StreamTaskListener;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.logging.Level;
+
+import org.acegisecurity.context.SecurityContextHolder;
+
+/**
+ * {@link AperiodicWork} that takes a long time to run. Similar to {@link AsyncPeriodicWork}, see {@link AsyncPeriodicWork} for
+ * details and {@link AperiodicWork} for differences between {@link AperiodicWork} and {@link PeriodicWork}.
+ *
+ * @author vjuranek
+ * @since 1.410
+ */
+public abstract class AsyncAperiodicWork extends AperiodicWork {
+
+ /**
+ * Name of the work.
+ */
+ public final String name;
+
+ private Thread thread;
+
+ protected AsyncAperiodicWork(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Schedules this periodic work now in a new thread, if one isn't already running.
+ */
+ @Override
+ public final void doAperiodicRun() {
+ try {
+ if(thread!=null && thread.isAlive()) {
+ logger.log(Level.INFO, name+" thread is still running. Execution aborted.");
+ return;
+ }
+ thread = new Thread(new Runnable() {
+ public void run() {
+ logger.log(Level.INFO, "Started "+name);
+ long startTime = System.currentTimeMillis();
+
+ StreamTaskListener l = createListener();
+ try {
+ SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
+
+ execute(l);
+ } catch (IOException e) {
+ e.printStackTrace(l.fatalError(e.getMessage()));
+ } catch (InterruptedException e) {
+ e.printStackTrace(l.fatalError("aborted"));
+ } finally {
+ l.closeQuietly();
+ }
+
+ logger.log(Level.INFO, "Finished "+name+". "+
+ (System.currentTimeMillis()-startTime)+" ms");
+ }
+ },name+" thread");
+ thread.start();
+ } catch (Throwable t) {
+ logger.log(Level.SEVERE, name+" thread failed with error", t);
+ }
+ }
+
+ protected StreamTaskListener createListener() {
+ try {
+ return new StreamTaskListener(getLogFile());
+ } catch (IOException e) {
+ throw new Error(e);
+ }
+ }
+
+ /**
+ * Determines the log file that records the result of this task.
+ */
+ protected File getLogFile() {
+ return new File(Hudson.getInstance().getRootDir(),name+".log");
+ }
+
+ /**
+ * Executes the task.
+ *
+ * @param listener
+ * Output sent will be reported to the users. (this work is TBD.)
+ * @throws InterruptedException
+ * The caller will record the exception and moves on.
+ * @throws IOException
+ * The caller will record the exception and moves on.
+ */
+ protected abstract void execute(TaskListener listener) throws IOException, InterruptedException;
+
+}
diff --git a/core/src/main/java/hudson/model/DependencyGraph.java b/core/src/main/java/hudson/model/DependencyGraph.java
index 615332e6ab..890454e91e 100644
--- a/core/src/main/java/hudson/model/DependencyGraph.java
+++ b/core/src/main/java/hudson/model/DependencyGraph.java
@@ -28,14 +28,7 @@ import hudson.security.ACL;
import hudson.security.NotSerilizableSecurityContext;
import org.acegisecurity.context.SecurityContext;
import org.acegisecurity.context.SecurityContextHolder;
-import org.kohsuke.stapler.StaplerRequest;
-import org.kohsuke.stapler.StaplerResponse;
-import org.kohsuke.graph_layouter.Layout;
-import org.kohsuke.graph_layouter.Navigator;
-import org.kohsuke.graph_layouter.Direction;
-import javax.servlet.ServletOutputStream;
-import javax.imageio.ImageIO;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -49,17 +42,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.Stack;
-import java.io.IOException;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Rectangle;
-import java.awt.Graphics2D;
-import java.awt.Color;
-import java.awt.Point;
-import java.awt.HeadlessException;
-import java.awt.FontMetrics;
-import java.awt.geom.AffineTransform;
-import java.awt.image.BufferedImage;
/**
* Maintains the build dependencies between {@link AbstractProject}s
@@ -319,97 +301,97 @@ public final class DependencyGraph implements Comparator {
return Collections.unmodifiableMap(m);
}
- /**
- * Experimental visualization of project dependencies.
- */
- public void doGraph( StaplerRequest req, StaplerResponse rsp ) throws IOException {
- // Require admin permission for now (avoid exposing project names with restricted permissions)
- Hudson.getInstance().checkPermission(Hudson.ADMINISTER);
- try {
-
- // creates a dummy graphics just so that we can measure font metrics
- BufferedImage emptyImage = new BufferedImage(1,1, BufferedImage.TYPE_INT_RGB );
- Graphics2D graphics = emptyImage.createGraphics();
- graphics.setFont(FONT);
- final FontMetrics fontMetrics = graphics.getFontMetrics();
-
- // TODO: timestamp check
- Layout layout = new Layout(new Navigator() {
- public Collection vertices() {
- // only include projects that have some dependency
- List r = new ArrayList();
- for (AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class)) {
- if(!getDownstream(p).isEmpty() || !getUpstream(p).isEmpty())
- r.add(p);
- }
- return r;
- }
-
- public Collection edge(AbstractProject p) {
- return getDownstream(p);
- }
-
- public Dimension getSize(AbstractProject p) {
- int w = fontMetrics.stringWidth(p.getDisplayName()) + MARGIN*2;
- return new Dimension(w, fontMetrics.getHeight() + MARGIN*2);
- }
- }, Direction.LEFTRIGHT);
-
- Rectangle area = layout.calcDrawingArea();
- area.grow(4,4); // give it a bit of margin
- BufferedImage image = new BufferedImage(area.width, area.height, BufferedImage.TYPE_INT_RGB );
- Graphics2D g2 = image.createGraphics();
- g2.setTransform(AffineTransform.getTranslateInstance(-area.x,-area.y));
- g2.setPaint(Color.WHITE);
- g2.fill(area);
- g2.setFont(FONT);
-
- g2.setPaint(Color.BLACK);
- for( AbstractProject p : layout.vertices() ) {
- final Point sp = center(layout.vertex(p));
-
- for (AbstractProject q : layout.edges(p)) {
- Point cur=sp;
- for( Point pt : layout.edge(p,q) ) {
- g2.drawLine(cur.x, cur.y, pt.x, pt.y);
- cur=pt;
- }
-
- final Point ep = center(layout.vertex(q));
- g2.drawLine(cur.x, cur.y, ep.x, ep.y);
- }
- }
-
- int diff = fontMetrics.getAscent()+fontMetrics.getLeading()/2;
-
- for( AbstractProject p : layout.vertices() ) {
- Rectangle r = layout.vertex(p);
- g2.setPaint(Color.WHITE);
- g2.fillRect(r.x, r.y, r.width, r.height);
- g2.setPaint(Color.BLACK);
- g2.drawRect(r.x, r.y, r.width, r.height);
- g2.drawString(p.getDisplayName(), r.x+MARGIN, r.y+MARGIN+ diff);
- }
-
- rsp.setContentType("image/png");
- ServletOutputStream os = rsp.getOutputStream();
- ImageIO.write(image, "PNG", os);
- os.close();
- } catch(HeadlessException e) {
- // not available. send out error message
- rsp.sendRedirect2(req.getContextPath()+"/images/headless.png");
- }
- }
-
- private Point center(Rectangle r) {
- return new Point(r.x+r.width/2,r.y+r.height/2);
- }
-
- private static final Font FONT = new Font("TimesRoman", Font.PLAIN, 10);
- /**
- * Margins between the project name and its bounding box.
- */
- private static final int MARGIN = 4;
+// /**
+// * Experimental visualization of project dependencies.
+// */
+// public void doGraph( StaplerRequest req, StaplerResponse rsp ) throws IOException {
+// // Require admin permission for now (avoid exposing project names with restricted permissions)
+// Hudson.getInstance().checkPermission(Hudson.ADMINISTER);
+// try {
+//
+// // creates a dummy graphics just so that we can measure font metrics
+// BufferedImage emptyImage = new BufferedImage(1,1, BufferedImage.TYPE_INT_RGB );
+// Graphics2D graphics = emptyImage.createGraphics();
+// graphics.setFont(FONT);
+// final FontMetrics fontMetrics = graphics.getFontMetrics();
+//
+// // TODO: timestamp check
+// Layout layout = new Layout(new Navigator() {
+// public Collection vertices() {
+// // only include projects that have some dependency
+// List r = new ArrayList();
+// for (AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class)) {
+// if(!getDownstream(p).isEmpty() || !getUpstream(p).isEmpty())
+// r.add(p);
+// }
+// return r;
+// }
+//
+// public Collection edge(AbstractProject p) {
+// return getDownstream(p);
+// }
+//
+// public Dimension getSize(AbstractProject p) {
+// int w = fontMetrics.stringWidth(p.getDisplayName()) + MARGIN*2;
+// return new Dimension(w, fontMetrics.getHeight() + MARGIN*2);
+// }
+// }, Direction.LEFTRIGHT);
+//
+// Rectangle area = layout.calcDrawingArea();
+// area.grow(4,4); // give it a bit of margin
+// BufferedImage image = new BufferedImage(area.width, area.height, BufferedImage.TYPE_INT_RGB );
+// Graphics2D g2 = image.createGraphics();
+// g2.setTransform(AffineTransform.getTranslateInstance(-area.x,-area.y));
+// g2.setPaint(Color.WHITE);
+// g2.fill(area);
+// g2.setFont(FONT);
+//
+// g2.setPaint(Color.BLACK);
+// for( AbstractProject p : layout.vertices() ) {
+// final Point sp = center(layout.vertex(p));
+//
+// for (AbstractProject q : layout.edges(p)) {
+// Point cur=sp;
+// for( Point pt : layout.edge(p,q) ) {
+// g2.drawLine(cur.x, cur.y, pt.x, pt.y);
+// cur=pt;
+// }
+//
+// final Point ep = center(layout.vertex(q));
+// g2.drawLine(cur.x, cur.y, ep.x, ep.y);
+// }
+// }
+//
+// int diff = fontMetrics.getAscent()+fontMetrics.getLeading()/2;
+//
+// for( AbstractProject p : layout.vertices() ) {
+// Rectangle r = layout.vertex(p);
+// g2.setPaint(Color.WHITE);
+// g2.fillRect(r.x, r.y, r.width, r.height);
+// g2.setPaint(Color.BLACK);
+// g2.drawRect(r.x, r.y, r.width, r.height);
+// g2.drawString(p.getDisplayName(), r.x+MARGIN, r.y+MARGIN+ diff);
+// }
+//
+// rsp.setContentType("image/png");
+// ServletOutputStream os = rsp.getOutputStream();
+// ImageIO.write(image, "PNG", os);
+// os.close();
+// } catch(HeadlessException e) {
+// // not available. send out error message
+// rsp.sendRedirect2(req.getContextPath()+"/images/headless.png");
+// }
+// }
+//
+// private Point center(Rectangle r) {
+// return new Point(r.x+r.width/2,r.y+r.height/2);
+// }
+//
+// private static final Font FONT = new Font("TimesRoman", Font.PLAIN, 10);
+// /**
+// * Margins between the project name and its bounding box.
+// */
+// private static final int MARGIN = 4;
private static final Comparator NAME_COMPARATOR = new Comparator() {
diff --git a/core/src/main/java/hudson/model/Environment.java b/core/src/main/java/hudson/model/Environment.java
index 713642e5cd..48b6d461aa 100644
--- a/core/src/main/java/hudson/model/Environment.java
+++ b/core/src/main/java/hudson/model/Environment.java
@@ -23,6 +23,10 @@
*/
package hudson.model;
+import hudson.Launcher;
+import hudson.model.listeners.RunListener;
+import hudson.slaves.NodeProperty;
+import hudson.tasks.BuildWrapper;
import hudson.tasks.Builder;
import hudson.EnvVars;
@@ -44,6 +48,9 @@ import java.util.Map;
* you guaranteed "tear down" phase, so that such resource won't keep running forever.
*
* @since 1.286
+ * @see BuildWrapper
+ * @see NodeProperty
+ * @see RunListener#setUpEnvironment(AbstractBuild, Launcher, BuildListener)
*/
public abstract class Environment {
/**
diff --git a/core/src/main/java/hudson/model/FreeStyleBuild.java b/core/src/main/java/hudson/model/FreeStyleBuild.java
index fdec9c0b15..896274add9 100644
--- a/core/src/main/java/hudson/model/FreeStyleBuild.java
+++ b/core/src/main/java/hudson/model/FreeStyleBuild.java
@@ -45,15 +45,4 @@ public class FreeStyleBuild extends Build {
public void run() {
run(new RunnerImpl());
}
-
- protected class RunnerImpl extends Build.RunnerImpl {
- @Override
- protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws IOException, InterruptedException {
- String customWorkspace = getProject().getCustomWorkspace();
- if (customWorkspace != null)
- // we allow custom workspaces to be concurrently used between jobs.
- return Lease.createDummyLease(n.getRootPath().child(getEnvironment(listener).expand(customWorkspace)));
- return super.decideWorkspace(n,wsl);
- }
- }
}
diff --git a/core/src/main/java/hudson/model/FreeStyleProject.java b/core/src/main/java/hudson/model/FreeStyleProject.java
index e6c08b069d..76c4f527f8 100644
--- a/core/src/main/java/hudson/model/FreeStyleProject.java
+++ b/core/src/main/java/hudson/model/FreeStyleProject.java
@@ -39,12 +39,6 @@ import javax.servlet.ServletException;
* @author Kohsuke Kawaguchi
*/
public class FreeStyleProject extends Project implements TopLevelItem {
- /**
- * See {@link #setCustomWorkspace(String)}.
- *
- * @since 1.216
- */
- private String customWorkspace;
/**
* @deprecated as of 1.390
@@ -62,43 +56,6 @@ public class FreeStyleProject extends Project i
return FreeStyleBuild.class;
}
- public String getCustomWorkspace() {
- return customWorkspace;
- }
-
- /**
- * User-specified workspace directory, or null if it's up to Hudson.
- *
- *
- * Normally a free-style project uses the workspace location assigned by its parent container,
- * but sometimes people have builds that have hard-coded paths (which can be only built in
- * certain locations. see http://www.nabble.com/Customize-Workspace-directory-tt17194310.html for
- * one such discussion.)
- *
- *
- * 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.
- *
- * @since 1.320
- */
- public void setCustomWorkspace(String customWorkspace) throws IOException {
- this.customWorkspace= customWorkspace;
- save();
- }
-
- @Override
- protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException {
- if(req.hasParameter("customWorkspace"))
- customWorkspace = req.getParameter("customWorkspace.directory");
- else
- customWorkspace = null;
-
- super.submit(req, rsp);
- }
-
public DescriptorImpl getDescriptor() {
return DESCRIPTOR;
}
diff --git a/core/src/main/java/hudson/model/Hudson.java b/core/src/main/java/hudson/model/Hudson.java
index a9790154fa..5c247a7082 100644
--- a/core/src/main/java/hudson/model/Hudson.java
+++ b/core/src/main/java/hudson/model/Hudson.java
@@ -40,6 +40,7 @@ import hudson.Launcher;
import hudson.Launcher.LocalLauncher;
import hudson.LocalPluginManager;
import hudson.Lookup;
+import hudson.Platform;
import hudson.markup.MarkupFormatter;
import hudson.Plugin;
import hudson.PluginManager;
@@ -239,7 +240,7 @@ import java.util.regex.Pattern;
* @author Kohsuke Kawaguchi
*/
@ExportedBean
-public final class Hudson extends Node implements ItemGroup, StaplerProxy, StaplerFallback, ViewGroup, AccessControlled, DescriptorByNameOwner {
+public class Hudson extends Node implements ItemGroup, StaplerProxy, StaplerFallback, ViewGroup, AccessControlled, DescriptorByNameOwner {
private transient final Queue queue;
/**
@@ -3487,9 +3488,12 @@ public final class Hudson extends Node implements ItemGroup, Stapl
return File.pathSeparatorChar==';';
}
+ /**
+ * @deprecated
+ * Use {@link Platform#isDarwin()}
+ */
public static boolean isDarwin() {
- // according to http://developer.apple.com/technotes/tn2002/tn2110.html
- return System.getProperty("os.name").toLowerCase(Locale.ENGLISH).startsWith("mac");
+ return Platform.isDarwin();
}
/**
diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java
index e9e1709511..8e11ecab98 100644
--- a/core/src/main/java/hudson/model/Run.java
+++ b/core/src/main/java/hudson/model/Run.java
@@ -266,9 +266,21 @@ public abstract class Run ,RunT extends Run {
return true;
}
+ /**
+ * Tests if the given instance belongs to this descriptor, in the sense
+ * that this descriptor can produce items like the given one.
+ *
+ *
+ * {@link TopLevelItemDescriptor}s that act like a wizard and produces different
+ * object types than {@link #clazz} can override this method to augment
+ * instance-descriptor relationship.
+ */
+ public boolean testInstance(TopLevelItem i) {
+ return clazz.isInstance(i);
+ }
+
/**
* {@inheritDoc}
*
diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java
index d165c77d98..6fd1ceff16 100644
--- a/core/src/main/java/hudson/model/UpdateSite.java
+++ b/core/src/main/java/hudson/model/UpdateSite.java
@@ -49,6 +49,7 @@ import java.io.ByteArrayInputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
@@ -148,7 +149,7 @@ public class UpdateSite {
if (signatureCheck)
verifySignature(o);
- LOGGER.info("Obtained the latest update center data file for UpdateSource "+ id);
+ LOGGER.info("Obtained the latest update center data file for UpdateSource " + id);
getDataFile().write(json);
rsp.setContentType("text/plain"); // So browser won't try to parse response
}
@@ -167,20 +168,20 @@ public class UpdateSite {
List certs = new ArrayList();
{// load and verify certificates
CertificateFactory cf = CertificateFactory.getInstance("X509");
- for (Object cert : o.getJSONArray("certificates")) {
+ for (Object cert : signature.getJSONArray("certificates")) {
X509Certificate c = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(Base64.decode(cert.toString().toCharArray())));
c.checkValidity();
certs.add(c);
}
// all default root CAs in JVM are trusted, plus certs bundled in Jenkins
- Set anchors = CertificateUtil.getDefaultRootCAs();
+ Set anchors = new HashSet(); // CertificateUtil.getDefaultRootCAs();
ServletContext context = Hudson.getInstance().servletContext;
for (String cert : (Set) context.getResourcePaths("/WEB-INF/update-center-rootCAs")) {
if (cert.endsWith(".txt")) continue; // skip text files that are meant to be documentation
anchors.add(new TrustAnchor((X509Certificate)cf.generateCertificate(context.getResourceAsStream(cert)),null));
}
- CertificateUtil.validatePath(certs);
+ CertificateUtil.validatePath(certs,anchors);
}
// this is for computing a digest to check sanity
diff --git a/core/src/main/java/hudson/model/View.java b/core/src/main/java/hudson/model/View.java
index ed40898026..01279b90dc 100644
--- a/core/src/main/java/hudson/model/View.java
+++ b/core/src/main/java/hudson/model/View.java
@@ -118,7 +118,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
* List of {@link ViewProperty}s configured for this view.
* @since 1.406
*/
- private volatile DescribableList properties = new PropertyList();
+ private volatile DescribableList properties = new PropertyList(this);
protected View(String name) {
this.name = name;
@@ -129,13 +129,6 @@ public abstract class View extends AbstractModelObject implements AccessControll
this.owner = owner;
}
- private Object readResolve() {
- if (properties == null) {
- properties = new PropertyList();
- }
- return this;
- }
-
/**
* Gets all the items in this collection in a read-only view.
*/
@@ -204,6 +197,19 @@ public abstract class View extends AbstractModelObject implements AccessControll
* @since 1.406
*/
public DescribableList getProperties() {
+ // readResolve was the best place to do this, but for compatibility reasons,
+ // this class can no longer have readResolve() (the mechanism itself isn't suitable for class hierarchy)
+ // see JENKINS-9431
+ //
+ // until we have that, putting this logic here.
+ synchronized (this) {
+ if (properties == null) {
+ properties = new PropertyList(this);
+ } else {
+ properties.setOwner(this);
+ }
+ }
+
return properties;
}
@@ -234,7 +240,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
*/
@Exported(name="property",inline=true)
public List getAllProperties() {
- return properties.toList();
+ return getProperties().toList();
}
public ViewDescriptor getDescriptor() {
@@ -635,7 +641,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
JSONObject json = req.getSubmittedForm();
- properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
+ getProperties().rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
save();
@@ -762,15 +768,22 @@ public abstract class View extends AbstractModelObject implements AccessControll
return v;
}
- private class PropertyList extends DescribableList {
- private PropertyList() {
- super(View.this);
+ public static class PropertyList extends DescribableList {
+ private PropertyList(View owner) {
+ super(owner);
+ }
+
+ public PropertyList() {// needed for XStream deserialization
+ }
+
+ public View getOwner() {
+ return (View)owner;
}
@Override
protected void onModified() throws IOException {
for (ViewProperty p : this)
- p.setView(View.this);
+ p.setView(getOwner());
}
}
}
diff --git a/core/src/main/java/hudson/model/ViewDescriptor.java b/core/src/main/java/hudson/model/ViewDescriptor.java
index d02155dbc9..6afca868ab 100644
--- a/core/src/main/java/hudson/model/ViewDescriptor.java
+++ b/core/src/main/java/hudson/model/ViewDescriptor.java
@@ -78,8 +78,10 @@ public abstract class ViewDescriptor extends Descriptor {
@Override
public void onItem(Item i) {
- r.add(i.getFullName());
- super.onItem(i);
+ if (i.getFullName().startsWith(value)) {
+ r.add((i.getFullName()));
+ super.onItem(i);
+ }
}
}.onItemGroup(Hudson.getInstance());
diff --git a/core/src/main/java/hudson/model/listeners/RunListener.java b/core/src/main/java/hudson/model/listeners/RunListener.java
index 6e0a150e31..33ce834e1a 100644
--- a/core/src/main/java/hudson/model/listeners/RunListener.java
+++ b/core/src/main/java/hudson/model/listeners/RunListener.java
@@ -27,12 +27,22 @@ import hudson.ExtensionPoint;
import hudson.ExtensionListView;
import hudson.Extension;
import hudson.ExtensionList;
+import hudson.FilePath;
+import hudson.Launcher;
+import hudson.model.AbstractBuild;
+import hudson.model.BuildListener;
+import hudson.model.Environment;
+import hudson.model.JobProperty;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.model.Hudson;
+import hudson.scm.SCM;
+import hudson.tasks.BuildWrapper;
import hudson.util.CopyOnWriteList;
import org.jvnet.tiger_types.Types;
+import java.io.File;
+import java.io.IOException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
@@ -97,6 +107,36 @@ public abstract class RunListener implements ExtensionPoint {
*/
public void onStarted(R r, TaskListener listener) {}
+ /**
+ * Runs before the {@link SCM#checkout(AbstractBuild, Launcher, FilePath, BuildListener, File)} runs, and performs a set up.
+ * Can contribute additional properties/env vars to the environment.
+ *
+ *
+ * A typical strategy is for implementations to check {@link JobProperty}s and other configuration
+ * of the project to determine the environment to inject, which allows you to achieve the equivalent of
+ * {@link BuildWrapper}, but without UI.
+ *
+ * @param build
+ * The build in progress for which an {@link Environment} object is created.
+ * Never null.
+ * @param launcher
+ * This launcher can be used to launch processes for this build.
+ * If the build runs remotely, launcher will also run a job on that remote machine.
+ * Never null.
+ * @param listener
+ * Can be used to send any message.
+ * @return
+ * non-null if the build can continue, null if there was an error
+ * and the build needs to be aborted.
+ * @throws IOException
+ * terminates the build abnormally. Hudson will handle the exception
+ * and reports a nice error message.
+ * @since 1.409
+ */
+ public Environment setUpEnvironment( AbstractBuild build, Launcher launcher, BuildListener listener ) throws IOException, InterruptedException {
+ return new Environment() {};
+ }
+
/**
* Called right before a build is going to be deleted.
*
@@ -130,7 +170,7 @@ public abstract class RunListener implements ExtensionPoint {
public static final CopyOnWriteList LISTENERS = ExtensionListView.createCopyOnWriteList(RunListener.class);
/**
- * Fires the {@link #onCompleted} event.
+ * Fires the {@link #onCompleted(Run, TaskListener)} event.
*/
public static void fireCompleted(Run r, TaskListener listener) {
for (RunListener l : all()) {
@@ -140,7 +180,7 @@ public abstract class RunListener implements ExtensionPoint {
}
/**
- * Fires the {@link #onStarted} event.
+ * Fires the {@link #onStarted(Run, TaskListener)} event.
*/
public static void fireStarted(Run r, TaskListener listener) {
for (RunListener l : all()) {
diff --git a/core/src/main/java/hudson/security/LDAPSecurityRealm.java b/core/src/main/java/hudson/security/LDAPSecurityRealm.java
index 5e07c26155..9b038eb758 100644
--- a/core/src/main/java/hudson/security/LDAPSecurityRealm.java
+++ b/core/src/main/java/hudson/security/LDAPSecurityRealm.java
@@ -222,6 +222,12 @@ public class LDAPSecurityRealm extends AbstractPasswordBasedSecurityRealm {
*/
public final String rootDN;
+ /**
+ * Allow the rootDN to be inferred? Default is false.
+ * If true, allow rootDN to be blank.
+ */
+ public final boolean inhibitInferRootDN;
+
/**
* Specifies the relative DN from {@link #rootDN the root DN}.
* This is used to narrow down the search space when doing user search.
@@ -281,11 +287,12 @@ public class LDAPSecurityRealm extends AbstractPasswordBasedSecurityRealm {
private transient LdapTemplate ldapTemplate;
@DataBoundConstructor
- public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String managerDN, String managerPassword) {
+ public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String managerDN, String managerPassword, boolean inhibitInferRootDN) {
this.server = server.trim();
this.managerDN = fixEmpty(managerDN);
this.managerPassword = Scrambler.scramble(fixEmpty(managerPassword));
- if(fixEmptyAndTrim(rootDN)==null) rootDN= fixNull(inferRootDN(server));
+ this.inhibitInferRootDN = inhibitInferRootDN;
+ if(!inhibitInferRootDN && fixEmptyAndTrim(rootDN)==null) rootDN= fixNull(inferRootDN(server));
this.rootDN = rootDN.trim();
this.userSearchBase = fixNull(userSearchBase).trim();
userSearch = fixEmptyAndTrim(userSearch);
diff --git a/core/src/main/java/hudson/slaves/NodeProperty.java b/core/src/main/java/hudson/slaves/NodeProperty.java
index 59322ea832..75e5ed02bf 100644
--- a/core/src/main/java/hudson/slaves/NodeProperty.java
+++ b/core/src/main/java/hudson/slaves/NodeProperty.java
@@ -24,6 +24,7 @@
package hudson.slaves;
import hudson.ExtensionPoint;
+import hudson.FilePath;
import hudson.Launcher;
import hudson.DescriptorExtensionList;
import hudson.model.Descriptor.FormException;
@@ -32,7 +33,6 @@ import hudson.model.queue.CauseOfBlockage;
import hudson.scm.SCM;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
-import hudson.model.Describable;
import hudson.model.Environment;
import hudson.model.Hudson;
import hudson.model.Node;
@@ -40,6 +40,7 @@ import hudson.model.Queue.Task;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
+import java.io.File;
import java.io.IOException;
import java.util.List;
diff --git a/core/src/main/java/hudson/tasks/BuildTrigger.java b/core/src/main/java/hudson/tasks/BuildTrigger.java
index 55a9a3b3f3..7d91efc155 100644
--- a/core/src/main/java/hudson/tasks/BuildTrigger.java
+++ b/core/src/main/java/hudson/tasks/BuildTrigger.java
@@ -95,11 +95,15 @@ public class BuildTrigger extends Recorder implements DependecyDeclarer {
*/
private final Result threshold;
- @DataBoundConstructor
public BuildTrigger(String childProjects, boolean evenIfUnstable) {
this(childProjects,evenIfUnstable ? Result.UNSTABLE : Result.SUCCESS);
}
+ @DataBoundConstructor
+ public BuildTrigger(String childProjects, String threshold) {
+ this(childProjects, Result.fromString(StringUtils.defaultString(threshold, Result.SUCCESS.toString())));
+ }
+
public BuildTrigger(String childProjects, Result threshold) {
if(childProjects==null)
throw new IllegalArgumentException();
@@ -297,7 +301,7 @@ public class BuildTrigger extends Recorder implements DependecyDeclarer {
}
return new BuildTrigger(
childProjectsString,
- formData.has("evenIfUnstable") && formData.getBoolean("evenIfUnstable"));
+ formData.optString("threshold", Result.SUCCESS.toString()));
}
@Override
diff --git a/core/src/main/java/hudson/tasks/BuildWrapper.java b/core/src/main/java/hudson/tasks/BuildWrapper.java
index 19afbd83b8..becd1e7bbc 100644
--- a/core/src/main/java/hudson/tasks/BuildWrapper.java
+++ b/core/src/main/java/hudson/tasks/BuildWrapper.java
@@ -29,6 +29,7 @@ import hudson.DescriptorExtensionList;
import hudson.LauncherDecorator;
import hudson.model.*;
import hudson.model.Run.RunnerAbortedException;
+import hudson.model.listeners.RunListener;
import java.io.IOException;
import java.io.OutputStream;
@@ -53,6 +54,11 @@ import java.util.Set;
*
* The {@link #setUp(Build,Launcher,BuildListener)} method is invoked for each build.
*
+ *
+ * {@link BuildWrapper} requires an user consent (in terms of a checkbox) to work.
+ * If this is not desirable, see {@link hudson.model.Environment} for other ways
+ * to inject Environments to builds.
+ *
* @author Kohsuke Kawaguchi
*/
public abstract class BuildWrapper extends AbstractDescribableImpl implements ExtensionPoint {
diff --git a/core/src/main/java/hudson/triggers/Trigger.java b/core/src/main/java/hudson/triggers/Trigger.java
index c30d56469a..37d2a7aa3f 100644
--- a/core/src/main/java/hudson/triggers/Trigger.java
+++ b/core/src/main/java/hudson/triggers/Trigger.java
@@ -23,23 +23,23 @@
*/
package hudson.triggers;
-import antlr.ANTLRException;
+import static hudson.init.InitMilestone.JOB_LOADED;
import hudson.DependencyRunner;
import hudson.DependencyRunner.ProjectRunnable;
-import hudson.ExtensionPoint;
import hudson.DescriptorExtensionList;
import hudson.Extension;
+import hudson.ExtensionPoint;
import hudson.init.Initializer;
-import static hudson.init.InitMilestone.JOB_LOADED;
import hudson.model.AbstractProject;
import hudson.model.Action;
+import hudson.model.AperiodicWork;
import hudson.model.Build;
import hudson.model.ComputerSet;
import hudson.model.Describable;
import hudson.model.Hudson;
import hudson.model.Item;
-import hudson.model.Project;
import hudson.model.PeriodicWork;
+import hudson.model.Project;
import hudson.model.TopLevelItem;
import hudson.model.TopLevelItemDescriptor;
import hudson.scheduler.CronTab;
@@ -48,18 +48,20 @@ import hudson.util.DoubleLaunchChecker;
import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
+import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
-import java.util.GregorianCalendar;
-import java.util.Timer;
import java.util.Date;
+import java.util.GregorianCalendar;
import java.util.List;
-import java.util.ArrayList;
+import java.util.Timer;
import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
+import antlr.ANTLRException;
+
/**
* Triggers a {@link Build}.
*
@@ -276,6 +278,10 @@ public abstract class Trigger implements Describable>
// start all PeridocWorks
for(PeriodicWork p : PeriodicWork.all())
timer.scheduleAtFixedRate(p,p.getInitialDelay(),p.getRecurrencePeriod());
+
+ // start all AperidocWorks
+ for(AperiodicWork p : AperiodicWork.all())
+ timer.schedule(p,p.getInitialDelay());
// start monitoring nodes, although there's no hurry.
timer.schedule(new SafeTimerTask() {
diff --git a/core/src/main/java/hudson/util/IOUtils.java b/core/src/main/java/hudson/util/IOUtils.java
index 651d46fb26..f3c4bff954 100644
--- a/core/src/main/java/hudson/util/IOUtils.java
+++ b/core/src/main/java/hudson/util/IOUtils.java
@@ -1,5 +1,10 @@
package hudson.util;
+import hudson.FilePath.FileCallable;
+import hudson.Functions;
+import hudson.os.PosixAPI;
+import hudson.remoting.VirtualChannel;
+
import java.io.*;
import java.util.regex.Pattern;
@@ -110,5 +115,14 @@ public class IOUtils extends org.apache.commons.io.IOUtils {
return path.startsWith("/") || DRIVE_PATTERN.matcher(path).matches();
}
+
+ /**
+ * Gets the mode of a file/directory, if appropriate. Returns -1 if not on Unix.
+ */
+ public static int mode(File f) {
+ if(Functions.isWindows()) return -1;
+ return PosixAPI.get().stat(f.getPath()).mode();
+ }
+
private static final byte[] SKIP_BUFFER = new byte[8192];
}
diff --git a/core/src/main/java/hudson/util/ProcessTree.java b/core/src/main/java/hudson/util/ProcessTree.java
index 08ceebe063..14759618eb 100644
--- a/core/src/main/java/hudson/util/ProcessTree.java
+++ b/core/src/main/java/hudson/util/ProcessTree.java
@@ -1053,10 +1053,14 @@ public abstract class ProcessTree implements Iterable, IProcessTree,
*/
int nargs = m.readInt();
- m.readString(); // exec path
- for( int i=0; i
+
+
+
+
+
+
+
${%about(app.VERSION)}
+
+ ${%blurb}
+
+
+
+ ${%dependencies}
+
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/AboutJenkins/index.properties b/core/src/main/resources/hudson/AboutJenkins/index.properties
new file mode 100644
index 0000000000..08f9d8a0a8
--- /dev/null
+++ b/core/src/main/resources/hudson/AboutJenkins/index.properties
@@ -0,0 +1,26 @@
+# The MIT License
+#
+# Copyright (c) 2004-2011, Kohsuke Kawaguchi
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+about=About Jenkins {0}
+blurb=Jenkins is a community-developed open-source continuous integration server.
+
+dependencies=Jenkins depends on the following 3rd party libraries.
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/AboutJenkins/index_ja.properties b/core/src/main/resources/hudson/AboutJenkins/index_ja.properties
new file mode 100644
index 0000000000..7d6d66e5ac
--- /dev/null
+++ b/core/src/main/resources/hudson/AboutJenkins/index_ja.properties
@@ -0,0 +1,26 @@
+# The MIT License
+#
+# Copyright (c) 2004-2011, Seiji Sogabe.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+about=Jenkins {0} \u306b\u3064\u3044\u3066
+blurb=Jenkins \u306f\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3067\u958b\u767a\u3055\u308c\u3066\u3044\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eCI\u30b5\u30fc\u30d0\u3067\u3059\u3002
+
+dependencies=Jenkins \u306f\u6b21\u306e\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002.
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/Messages.properties b/core/src/main/resources/hudson/Messages.properties
index c0d3d797b5..c4edc3a6d9 100644
--- a/core/src/main/resources/hudson/Messages.properties
+++ b/core/src/main/resources/hudson/Messages.properties
@@ -50,3 +50,5 @@ Util.pastTime={0}
FilePath.TildaDoesntWork=''~'' is only supported in a Unix shell and nowhere else.
PluginManager.DisplayName=Plugin Manager
+AboutJenkins.DisplayName=About Jenkins
+AboutJenkins.Description=See the version and license information
diff --git a/core/src/main/resources/hudson/Messages_ja.properties b/core/src/main/resources/hudson/Messages_ja.properties
index cce6d2f84a..30e521ba4e 100644
--- a/core/src/main/resources/hudson/Messages_ja.properties
+++ b/core/src/main/resources/hudson/Messages_ja.properties
@@ -21,31 +21,33 @@
# THE SOFTWARE.
FilePath.validateAntFileMask.whitespaceSeprator=\
- \u7A7A\u767D\u3092\u533A\u5207\u308A\u6587\u5B57\u3068\u3057\u3066\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u7A7A\u767D\u306E\u4EE3\u308F\u308A\u306B'',''\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+ \u7a7a\u767d\u3092\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\u7a7a\u767d\u306e\u4ee3\u308f\u308a\u306b'',''\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002
FilePath.validateAntFileMask.doesntMatchAndSuggest=\
- ''{0}''\u306B\u8A72\u5F53\u3059\u308B\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001''{1}''\u306B\u306F\u3042\u308A\u307E\u3059\u3002
+ ''{0}''\u306b\u8a72\u5f53\u3059\u308b\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001''{1}''\u306b\u306f\u3042\u308a\u307e\u3059\u3002
FilePath.validateAntFileMask.portionMatchAndSuggest=\
- ''{0}''\u306B\u8A72\u5F53\u3059\u308B\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001''{1}''\u306B\u306F\u3042\u308A\u307E\u3059\u3002
+ ''{0}''\u306b\u8a72\u5f53\u3059\u308b\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001''{1}''\u306b\u306f\u3042\u308a\u307e\u3059\u3002
FilePath.validateAntFileMask.portionMatchButPreviousNotMatchAndSuggest=\
- ''{0}''\u306B\u8A72\u5F53\u3059\u308B\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002''{2}''\u306B\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001''{1}''\u306B\u306F\u3042\u308A\u307E\u3059\u3002
-FilePath.validateAntFileMask.doesntMatchAnything=''{0}''\u306B\u8A72\u5F53\u3059\u308B\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-FilePath.validateAntFileMask.doesntMatchAnythingAndSuggest=''{0}''\u306B\u8A72\u5F53\u3059\u308B\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002''{1}''\u3067\u3055\u3048\u5B58\u5728\u3057\u307E\u305B\u3093\u3002
+ ''{0}''\u306b\u8a72\u5f53\u3059\u308b\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u3002''{2}''\u306b\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001''{1}''\u306b\u306f\u3042\u308a\u307e\u3059\u3002
+FilePath.validateAntFileMask.doesntMatchAnything=''{0}''\u306b\u8a72\u5f53\u3059\u308b\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+FilePath.validateAntFileMask.doesntMatchAnythingAndSuggest=''{0}''\u306b\u8a72\u5f53\u3059\u308b\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u3002''{1}''\u3067\u3055\u3048\u5b58\u5728\u3057\u307e\u305b\u3093\u3002
-FilePath.validateRelativePath.wildcardNotAllowed=\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u3092\u3053\u3053\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
-FilePath.validateRelativePath.notFile=''{0}'' \u306F\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-FilePath.validateRelativePath.notDirectory=''{0}'' \u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-FilePath.validateRelativePath.noSuchFile=\u30D5\u30A1\u30A4\u30EB ''{0}'' \u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002
-FilePath.validateRelativePath.noSuchDirectory=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA ''{0}'' \u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002
+FilePath.validateRelativePath.wildcardNotAllowed=\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\u3092\u3053\u3053\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002
+FilePath.validateRelativePath.notFile=''{0}'' \u306f\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+FilePath.validateRelativePath.notDirectory=''{0}'' \u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
+FilePath.validateRelativePath.noSuchFile=\u30d5\u30a1\u30a4\u30eb ''{0}'' \u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002
+FilePath.validateRelativePath.noSuchDirectory=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea ''{0}'' \u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002
Util.millisecond={0} ms
-Util.second={0} \u79D2
+Util.second={0} \u79d2
Util.minute={0} \u5206
Util.hour ={0} \u6642\u9593
-Util.day ={0} \u65E5
-Util.month ={0} \u30F6\u6708
-Util.year ={0} \u5E74
-Util.pastTime={0} \u524D
+Util.day ={0} \u65e5
+Util.month ={0} \u30f6\u6708
+Util.year ={0} \u5e74
+Util.pastTime={0} \u524d
-FilePath.TildaDoesntWork=''~'' \u306F\u3001Unix\u306E\u30B7\u30A7\u30EB\u3067\u306E\u307F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+FilePath.TildaDoesntWork=''~'' \u306f\u3001Unix\u306e\u30b7\u30a7\u30eb\u3067\u306e\u307f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002
-PluginManager.DisplayName=\u30D7\u30E9\u30B0\u30A4\u30F3\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC
\ No newline at end of file
+PluginManager.DisplayName=\u30d7\u30e9\u30b0\u30a4\u30f3\u30de\u30cd\u30fc\u30b8\u30e3\u30fc
+AboutJenkins.DisplayName=Jenkins\u306b\u3064\u3044\u3066
+AboutJenkins.Description=\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u30e9\u30a4\u30bb\u30f3\u30b9\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\u3002
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/PluginManager/advanced.jelly b/core/src/main/resources/hudson/PluginManager/advanced.jelly
index 33de16ca8a..f5260e426e 100644
--- a/core/src/main/resources/hudson/PluginManager/advanced.jelly
+++ b/core/src/main/resources/hudson/PluginManager/advanced.jelly
@@ -25,6 +25,7 @@ THE SOFTWARE.
+
diff --git a/core/src/main/resources/hudson/PluginManager/available.jelly b/core/src/main/resources/hudson/PluginManager/available.jelly
index dcfc05b5ce..8a029af350 100644
--- a/core/src/main/resources/hudson/PluginManager/available.jelly
+++ b/core/src/main/resources/hudson/PluginManager/available.jelly
@@ -25,6 +25,7 @@ THE SOFTWARE.
+
diff --git a/core/src/main/resources/hudson/PluginManager/checkUpdates.jelly b/core/src/main/resources/hudson/PluginManager/checkUpdates.jelly
index 39a1b6178c..901293af95 100644
--- a/core/src/main/resources/hudson/PluginManager/checkUpdates.jelly
+++ b/core/src/main/resources/hudson/PluginManager/checkUpdates.jelly
@@ -25,6 +25,7 @@ THE SOFTWARE.
+
diff --git a/core/src/main/resources/hudson/PluginManager/index.jelly b/core/src/main/resources/hudson/PluginManager/index.jelly
index ada005156d..7480fd1234 100644
--- a/core/src/main/resources/hudson/PluginManager/index.jelly
+++ b/core/src/main/resources/hudson/PluginManager/index.jelly
@@ -25,6 +25,7 @@ THE SOFTWARE.
+
diff --git a/core/src/main/resources/hudson/PluginManager/installed.jelly b/core/src/main/resources/hudson/PluginManager/installed.jelly
index 17b5453dd0..818aa0ab05 100644
--- a/core/src/main/resources/hudson/PluginManager/installed.jelly
+++ b/core/src/main/resources/hudson/PluginManager/installed.jelly
@@ -25,6 +25,7 @@ THE SOFTWARE.
+
@@ -67,7 +68,9 @@ THE SOFTWARE.
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/PluginWrapper/thirdPartyLicenses.properties b/core/src/main/resources/hudson/PluginWrapper/thirdPartyLicenses.properties
new file mode 100644
index 0000000000..d01c4dc500
--- /dev/null
+++ b/core/src/main/resources/hudson/PluginWrapper/thirdPartyLicenses.properties
@@ -0,0 +1 @@
+about=About {0}
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly b/core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly
index 028fa38edf..a47151e632 100644
--- a/core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly
+++ b/core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly
@@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
+
+
<?xml version="1.0" encoding="UTF-8"?>
@@ -46,14 +47,14 @@ THE SOFTWARE.
- ${h.xmlEscape(adapter.getEntryTitle(e))}
+ ${adapter.getEntryTitle(e)}${adapter.getEntryID(e)}${h.xsDate(adapter.getEntryTimestamp(e))}${h.xsDate(adapter.getEntryTimestamp(e))}
- ${h.xmlEscape(desc)}
+ ${desc}
diff --git a/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly b/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly
index 719c731cbb..43cded589c 100644
--- a/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly
+++ b/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly
@@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
+
diff --git a/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/message.jelly b/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/message.jelly
index 57dca4d2fc..beefff24ce 100644
--- a/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/message.jelly
+++ b/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/message.jelly
@@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
+