Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinston Prakash2015-08-10 13:08:24 -0400
committerWinston Prakash2015-08-10 13:08:24 -0400
commit0dbf6cda4a3eb44aa26dfc71a3eb1e557ed829d1 (patch)
treed275c96ab94ae4dff11e558635a64970a50228a6
parentfcee0aa3c58255c71bfc0db9c0a8aacf5a387457 (diff)
parentdffd95b3c5f7d6f7400bd9f8d3128f0b6533d5cf (diff)
downloadorg.eclipse.hudson.core-0dbf6cda4a3eb44aa26dfc71a3eb1e557ed829d1.tar.gz
org.eclipse.hudson.core-0dbf6cda4a3eb44aa26dfc71a3eb1e557ed829d1.tar.xz
org.eclipse.hudson.core-0dbf6cda4a3eb44aa26dfc71a3eb1e557ed829d1.zip
Merge branch 'master' into ee7_support
-rw-r--r--hudson-cli/pom.xml4
-rw-r--r--hudson-core/nb-configuration.xml14
-rw-r--r--hudson-core/pom.xml39
-rw-r--r--hudson-core/src/main/java/hudson/ClassicPluginStrategy.java48
-rw-r--r--hudson-core/src/main/java/hudson/DNSMultiCast.java2
-rw-r--r--hudson-core/src/main/java/hudson/PluginManager.java2
-rw-r--r--hudson-core/src/main/java/hudson/init/InitStrategy.java4
-rw-r--r--hudson-core/src/main/java/hudson/model/AbstractItem.java48
-rw-r--r--hudson-core/src/main/java/hudson/model/DownloadService.java4
-rw-r--r--hudson-core/src/main/java/hudson/model/FileParameterValue.java33
-rw-r--r--hudson-core/src/main/java/hudson/model/Hudson.java17
-rw-r--r--hudson-core/src/main/java/hudson/model/Job.java2
-rw-r--r--hudson-core/src/main/java/hudson/model/ListView.java2
-rw-r--r--hudson-core/src/main/java/hudson/model/Queue.java4
-rw-r--r--hudson-core/src/main/java/hudson/model/Run.java20
-rw-r--r--hudson-core/src/main/java/hudson/model/RunMap.java2
-rw-r--r--hudson-core/src/main/java/hudson/model/Slave.java2
-rw-r--r--hudson-core/src/main/java/hudson/model/UpdateCenter.java26
-rw-r--r--hudson-core/src/main/java/hudson/model/UpdateSite.java49
-rw-r--r--hudson-core/src/main/java/hudson/model/WorkspaceCleanupThread.java20
-rw-r--r--hudson-core/src/main/java/hudson/scm/SCM.java31
-rw-r--r--hudson-core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java2
-rw-r--r--hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java50
-rw-r--r--hudson-core/src/main/java/hudson/security/PAMSecurityRealm.java104
-rw-r--r--hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java17
-rw-r--r--hudson-core/src/main/java/hudson/slaves/AbstractCloudSlave.java6
-rw-r--r--hudson-core/src/main/java/hudson/slaves/NodeProvisioner.java11
-rw-r--r--hudson-core/src/main/java/hudson/tasks/Ant.java35
-rw-r--r--hudson-core/src/main/java/hudson/tasks/BatchFile.java12
-rw-r--r--hudson-core/src/main/java/hudson/tasks/Builder.java37
-rw-r--r--hudson-core/src/main/java/hudson/tasks/CommandInterpreter.java11
-rw-r--r--hudson-core/src/main/java/hudson/tasks/Maven.java68
-rw-r--r--hudson-core/src/main/java/hudson/tasks/Shell.java22
-rw-r--r--hudson-core/src/main/java/hudson/tools/ToolInstallation.java17
-rw-r--r--hudson-core/src/main/java/hudson/util/CopyOnWriteList.java13
-rw-r--r--hudson-core/src/main/java/hudson/util/NonExistentFieldException.java27
-rw-r--r--hudson-core/src/main/java/hudson/util/PluginServletFilter.java10
-rw-r--r--hudson-core/src/main/java/hudson/util/ProcessTree.java38
-rw-r--r--hudson-core/src/main/java/hudson/util/RobustCollectionConverter.java13
-rw-r--r--hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java51
-rw-r--r--hudson-core/src/main/java/hudson/util/XStream2.java61
-rw-r--r--hudson-core/src/main/java/hudson/util/XStreamSerializable.java21
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/HudsonServletContextListener.java79
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java44
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java9
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/plugins/UpdateSiteManager.java10
-rw-r--r--hudson-core/src/main/java/org/eclipse/hudson/security/team/TeamMember.java6
-rw-r--r--hudson-core/src/main/resources/hudson/model/Hudson/configure_ja.properties3
-rw-r--r--hudson-core/src/main/resources/hudson/model/Hudson/manage.jelly2
-rw-r--r--hudson-core/src/main/resources/hudson/model/Hudson/manage_ja.properties48
-rw-r--r--hudson-core/src/main/resources/hudson/model/View/index_ja.properties1
-rw-r--r--hudson-core/src/main/resources/hudson/tasks/Ant/config.jelly49
-rw-r--r--hudson-core/src/main/resources/hudson/tasks/BatchFile/config.jelly15
-rw-r--r--hudson-core/src/main/resources/hudson/tasks/Maven/config.jelly9
-rw-r--r--hudson-core/src/main/resources/hudson/tasks/Shell/config.jelly13
-rw-r--r--hudson-core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly35
-rw-r--r--hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/index_ja.properties16
-rw-r--r--hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/sidepanel_ja.properties18
-rw-r--r--hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/index_ja.properties19
-rw-r--r--hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/sidepanel_ja.properties18
-rw-r--r--hudson-core/src/test/java/hudson/model/UpdateCenterTest.java5
-rw-r--r--hudson-core/src/test/java/hudson/tasks/AntEqualsHashCodeTest.java3
-rw-r--r--hudson-core/src/test/java/hudson/tasks/BatchFileEqualsHashCodeTest.java3
-rw-r--r--hudson-core/src/test/java/hudson/tasks/MavenEqualsHashCodeTest.java33
-rw-r--r--hudson-core/src/test/java/hudson/tasks/ShellEqualsHashCodeTest.java3
-rw-r--r--hudson-core/src/test/java/hudson/util/CopyOnWriteListEqualsHashCodeTest.java5
-rw-r--r--hudson-core/src/test/java/hudson/util/PersistedListEqualsHashCodeTest.java5
-rw-r--r--hudson-core/src/test/java/hudson/util/XStream2Test.java14
-rw-r--r--hudson-core/src/test/java/org/eclipse/hudson/model/project/property/DescribableListProjectPropertyTest.java5
-rw-r--r--hudson-inject/pom.xml8
-rwxr-xr-xhudson-jetty-war-executable/pom.xml28
-rw-r--r--hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/jetty/JettyLauncher.java85
-rwxr-xr-xhudson-jetty-war-executable/src/main/java/org/eclipse/hudson/war/Executable.java65
-rw-r--r--hudson-plugin-parent/pom.xml10
-rw-r--r--hudson-plugin-utils/pom.xml4
-rw-r--r--hudson-service/pom.xml4
-rw-r--r--hudson-test-framework/pom.xml15
-rw-r--r--hudson-test-framework/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java59
-rw-r--r--hudson-test-utils/pom.xml6
-rw-r--r--hudson-utils/pom.xml8
-rw-r--r--hudson-war/pom.xml16
-rw-r--r--hudson-war/src/main/webapp/WEB-INF/jboss-all.xml9
-rw-r--r--hudson-war/src/main/webapp/help/disable-builder.html18
-rw-r--r--hudson-war/src/main/webapp/scripts/hudson-behavior.js51
-rw-r--r--pom.xml71
85 files changed, 1221 insertions, 705 deletions
diff --git a/hudson-cli/pom.xml b/hudson-cli/pom.xml
index 57948f7b..ac86fde9 100644
--- a/hudson-cli/pom.xml
+++ b/hudson-cli/pom.xml
@@ -19,11 +19,11 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-cli</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: CLI</name>
<build>
diff --git a/hudson-core/nb-configuration.xml b/hudson-core/nb-configuration.xml
index 101e0a7a..e86240f3 100644
--- a/hudson-core/nb-configuration.xml
+++ b/hudson-core/nb-configuration.xml
@@ -15,5 +15,19 @@ Any value defined here will override the pom.xml file value but is only applicab
-->
<netbeans.compile.on.save>all</netbeans.compile.on.save>
<netbeans.hint.jdkPlatform>JDK_1.7</netbeans.hint.jdkPlatform>
+ <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-line-wrap>none</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-line-wrap>
+ <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.continuationIndentSize>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.continuationIndentSize>
+ <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width>
+ <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab>
+ <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size>
+ <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-limit-width>
+ <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs>
+ <org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>none</org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>
+ <org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>4</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>
+ <org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>4</org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>
+ <org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>4</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>
+ <org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>
+ <org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
+ <org-netbeans-modules-editor-indent.CodeStyle.usedProfile>project</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>
</properties>
</project-shared-configuration>
diff --git a/hudson-core/pom.xml b/hudson-core/pom.xml
index 2e9409de..b824f677 100644
--- a/hudson-core/pom.xml
+++ b/hudson-core/pom.xml
@@ -10,7 +10,7 @@
# Contributors:
#
# Kohsuke Kawaguchi, Winston Prakash
-#
+#
#************************************************************************** -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
@@ -18,12 +18,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-core</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Core</name>
<description>
Contains the core Hudson code and view files to render HTML.
@@ -391,9 +391,9 @@
<dependency>
<groupId>org.jvnet.localizer</groupId>
<artifactId>localizer</artifactId>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.hudsonci.tools</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<exclusions>
<exclusion>
@@ -406,8 +406,8 @@
</exclusion>
</exclusions>
</dependency>
-
-
+
+
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
@@ -422,11 +422,12 @@
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
- <!-- hudson doesn't use this directly, but some plugins wanted to use the latest -->
+ <!-- hudson now uses this directly -->
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
+ <version>${commons-lang.version}</version>
</dependency>
- <dependency><!-- Left for backward compatibility-->
+ <dependency><!-- Not used by Hudson, kept for plugin compatibility -->
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
@@ -443,7 +444,7 @@
</exclusion>
</exclusions>
</dependency>
-
+
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-digester3</artifactId>
@@ -469,7 +470,7 @@
<artifactId>mail</artifactId>
<version>${javax-mail.version}</version>
</dependency>
-
+
<!-- Switch to xercesImpl 2.8.1 - Eclipse approved -->
<dependency>
<groupId>xerces</groupId>
@@ -598,7 +599,7 @@
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
@@ -614,13 +615,13 @@
<artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-acl</artifactId>
<version>${spring-security.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
@@ -642,12 +643,12 @@
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
-
+
<dependency>
- <groupId>com.google.guava</groupId>
+ <groupId>${guava.groupid}</groupId>
<artifactId>guava</artifactId>
</dependency>
-
+
<!--
| these are now optional in commons-logging:1.1.1,
| keeping them around in case any plugins use them
@@ -690,7 +691,7 @@
<artifactId>xpp3</artifactId>
<version>${xpp3.version}</version>
</dependency>
-
+
<dependency>
<artifactId>xmlpull</artifactId>
<groupId>xmlpull</groupId>
@@ -793,7 +794,7 @@
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
- <version>2.7.1</version>
+ <version>2.7.2</version>
</dependency>
<dependency>
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
diff --git a/hudson-core/src/main/java/hudson/ClassicPluginStrategy.java b/hudson-core/src/main/java/hudson/ClassicPluginStrategy.java
index aa8eb993..7fefe586 100644
--- a/hudson-core/src/main/java/hudson/ClassicPluginStrategy.java
+++ b/hudson-core/src/main/java/hudson/ClassicPluginStrategy.java
@@ -16,20 +16,18 @@
package hudson;
+import hudson.Plugin.DummyImpl;
import hudson.PluginWrapper.Dependency;
import hudson.model.Hudson;
import hudson.util.IOException2;
import hudson.util.MaskingClassLoader;
-import hudson.util.VersionNumber;
-import hudson.Plugin.DummyImpl;
-
import java.io.BufferedReader;
+import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FilenameFilter;
import java.io.IOException;
-import java.io.Closeable;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
@@ -39,15 +37,14 @@ import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
-import java.util.jar.Manifest;
import java.util.jar.Attributes;
+import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
-
import org.apache.commons.io.IOUtils;
+import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
-import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.taskdefs.Expand;
import org.apache.tools.ant.types.FileSet;
@@ -161,9 +158,6 @@ public class ClassicPluginStrategy implements PluginStrategy {
}
}
}
- for (DetachedPlugin detached : DETACHED_LIST) {
- detached.fix(atts, optionalDependencies);
- }
ClassLoader dependencyLoader = new DependencyClassLoader(getBaseClassLoader(atts), archive, Util.join(dependencies, optionalDependencies));
@@ -208,40 +202,6 @@ public class ClassicPluginStrategy implements PluginStrategy {
}
/**
- * Information about plugins that were originally in the core.
- */
- private static final class DetachedPlugin {
-
- private final String shortName;
- private final VersionNumber splitWhen;
- private final String requireVersion;
-
- private DetachedPlugin(String shortName, String splitWhen, String requireVersion) {
- this.shortName = shortName;
- this.splitWhen = new VersionNumber(splitWhen);
- this.requireVersion = requireVersion;
- }
-
- private void fix(Attributes atts, List<PluginWrapper.Dependency> optionalDependencies) {
- // don't fix the dependency for yourself, or else we'll have a cycle
- String yourName = atts.getValue("Short-Name");
- if (shortName.equals(yourName)) {
- return;
- }
-
- // some earlier versions of maven-hpi-plugin apparently puts "null" as a literal in Hudson-Version. watch out for them.
- String hudsonVersion = atts.getValue("Hudson-Version");
- if (hudsonVersion == null || hudsonVersion.equals("null") || new VersionNumber(hudsonVersion).compareTo(splitWhen) <= 0) {
- optionalDependencies.add(new PluginWrapper.Dependency(shortName + ':' + requireVersion));
- }
- }
- }
- private static final List<DetachedPlugin> DETACHED_LIST = Arrays.asList(
- new DetachedPlugin("maven-plugin", "1.296", "1.296"),
- new DetachedPlugin("subversion", "1.310", "1.0"),
- new DetachedPlugin("cvs", "1.340", "0.1"));
-
- /**
* Computes the classloader that takes the class masking into account.
*
* <p> This mechanism allows plugins to have their own verions for libraries
diff --git a/hudson-core/src/main/java/hudson/DNSMultiCast.java b/hudson-core/src/main/java/hudson/DNSMultiCast.java
index e7a1a979..77c5a8d5 100644
--- a/hudson-core/src/main/java/hudson/DNSMultiCast.java
+++ b/hudson-core/src/main/java/hudson/DNSMultiCast.java
@@ -75,5 +75,5 @@ public class DNSMultiCast implements Closeable {
}
}
private static final Logger LOGGER = Logger.getLogger(DNSMultiCast.class.getName());
- public static boolean disabled = Boolean.getBoolean(DNSMultiCast.class.getName() + ".disabled");
+ public static boolean disabled = !Boolean.getBoolean(DNSMultiCast.class.getName() + ".enabled");
}
diff --git a/hudson-core/src/main/java/hudson/PluginManager.java b/hudson-core/src/main/java/hudson/PluginManager.java
index 15f5c362..60ab4b8c 100644
--- a/hudson-core/src/main/java/hudson/PluginManager.java
+++ b/hudson-core/src/main/java/hudson/PluginManager.java
@@ -292,7 +292,7 @@ public abstract class PluginManager extends AbstractModelObject {
@Override
public void run(Reactor session) throws Exception {
try {
- LOGGER.info("Loading plugin - " + p.getShortName());
+ LOGGER.info("Loading plugin - " + p.getShortName() + " " + p.getVersion());
p.resolvePluginDependencies();
strategy.load(p);
} catch (Exception e) {
diff --git a/hudson-core/src/main/java/hudson/init/InitStrategy.java b/hudson-core/src/main/java/hudson/init/InitStrategy.java
index 6b22c36d..c12cc95e 100644
--- a/hudson-core/src/main/java/hudson/init/InitStrategy.java
+++ b/hudson-core/src/main/java/hudson/init/InitStrategy.java
@@ -121,8 +121,8 @@ public class InitStrategy {
}
public boolean accept(File dir, String name) {
- return name.endsWith(extension) // plugin jar file
- || name.endsWith(".hpl"); // linked plugin. for debugging.
+ return name.endsWith(extension); // plugin jar file
+ // result in duplicate plugin loading during testing || name.endsWith(".hpl"); // linked plugin. for debugging.
}
}
}
diff --git a/hudson-core/src/main/java/hudson/model/AbstractItem.java b/hudson-core/src/main/java/hudson/model/AbstractItem.java
index a701a300..b76e8625 100644
--- a/hudson-core/src/main/java/hudson/model/AbstractItem.java
+++ b/hudson-core/src/main/java/hudson/model/AbstractItem.java
@@ -261,6 +261,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException {
this.parent = parent;
doSetName(name);
+ deleteLock = new Object();
}
/**
@@ -381,25 +382,50 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
throw new ServletException(e);
}
}
+
+ private transient Object deleteLock = new Object();
+
+ /**
+ * Get delete lock. Used as follows:
+ *
+ * <pre>
+ * synchronized(project.getDeleteLock()) {
+ * if (!project.isDeleted()) {
+ * // do something with project root folder
+ * }
+ * }
+ * </pre>
+ * @return delete lock that can be used to prevent deletion while performing
+ * operations requiring access to item (job) folder. Should be obtained
+ * before any other lock/synchronized to avoid deadlock.
+ * @since 3.3.0
+ * @see #isDeleted
+ */
+ public Object getDeleteLock() {
+ return deleteLock;
+ }
/**
* Deletes this item.
*/
public void delete() throws IOException, InterruptedException {
final ItemGroup group = getParent();
- // Lock parent, and then 'this' before deleting.
- synchronized (group) {
- synchronized (this) {
- checkPermission(DELETE);
- performDelete();
+ // Obtain delete lock
+ synchronized (getDeleteLock()) {
+ // Lock parent, and then 'this' before deleting.
+ synchronized (group) {
+ synchronized (this) {
+ checkPermission(DELETE);
+ performDelete();
- try {
- invokeOnDeleted();
- } catch (AbstractMethodError e) {
- // ignore
- }
+ try {
+ invokeOnDeleted();
+ } catch (AbstractMethodError e) {
+ // ignore
+ }
- Hudson.getInstance().rebuildDependencyGraph();
+ Hudson.getInstance().rebuildDependencyGraph();
+ }
}
}
}
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/FileParameterValue.java b/hudson-core/src/main/java/hudson/model/FileParameterValue.java
index dcdd0a75..8698be1a 100644
--- a/hudson-core/src/main/java/hudson/model/FileParameterValue.java
+++ b/hudson-core/src/main/java/hudson/model/FileParameterValue.java
@@ -20,6 +20,7 @@ import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemHeaders;
import org.apache.commons.fileupload.disk.DiskFileItem;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.io.FilenameUtils;
@@ -36,6 +37,8 @@ import java.io.UnsupportedEncodingException;
import java.io.OutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
import javax.servlet.ServletException;
/**
@@ -179,6 +182,28 @@ public class FileParameterValue extends ParameterValue {
public static final class FileItemImpl implements FileItem {
private final File file;
+ /** FileItemHeaders with dummy initial value */
+ private FileItemHeaders headers = new FileItemHeaders() {
+ public String getHeader(String name) {
+ return null;
+ }
+ public Iterator<String> getHeaderNames() {
+ return new Iterator<String>() {
+ public boolean hasNext() {
+ return false;
+ }
+ public String next() {
+ throw new NoSuchElementException();
+ }
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+ public Iterator<String> getHeaders(String name) {
+ return getHeaderNames();
+ }
+ };
public FileItemImpl(File file) {
if (file == null) {
@@ -248,5 +273,13 @@ public class FileParameterValue extends ParameterValue {
public OutputStream getOutputStream() throws IOException {
return new FileOutputStream(file);
}
+
+ public FileItemHeaders getHeaders() {
+ return headers;
+ }
+
+ public void setHeaders(FileItemHeaders headers) {
+ this.headers = headers;
+ }
}
}
diff --git a/hudson-core/src/main/java/hudson/model/Hudson.java b/hudson-core/src/main/java/hudson/model/Hudson.java
index e400a9eb..f894da16 100644
--- a/hudson-core/src/main/java/hudson/model/Hudson.java
+++ b/hudson-core/src/main/java/hudson/model/Hudson.java
@@ -19,6 +19,7 @@
package hudson.model;
import com.thoughtworks.xstream.XStream;
+
import hudson.BulkChange;
import hudson.DNSMultiCast;
import hudson.DescriptorExtensionList;
@@ -50,7 +51,6 @@ import hudson.cli.CliManagerImpl;
import hudson.cli.declarative.CLIMethod;
import hudson.cli.declarative.CLIResolver;
import hudson.init.InitMilestone;
-
import static hudson.init.InitMilestone.*;
import hudson.init.InitReactorListener;
import hudson.init.InitStrategy;
@@ -113,6 +113,7 @@ import hudson.views.DefaultViewsTabBar;
import hudson.views.MyViewsTabBar;
import hudson.views.ViewsTabBar;
import hudson.widgets.Widget;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -136,6 +137,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.TimeZone;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
@@ -159,18 +161,22 @@ import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import javax.crypto.SecretKey;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
+
import static javax.servlet.http.HttpServletResponse.*;
import net.sf.json.JSONObject;
+
import org.antlr.runtime.RecognitionException;
import org.apache.commons.jelly.JellyException;
import org.apache.commons.jelly.Script;
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.FastDateFormat;
import org.apache.commons.logging.LogFactory;
import org.eclipse.hudson.WebAppController;
import org.eclipse.hudson.plugins.PluginCenter;
@@ -523,6 +529,12 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
return redirect;
}
};
+
+ public static class HudsonDateFormat extends FastDateFormat {
+ public HudsonDateFormat(String format) {
+ super(format, TimeZone.getDefault(), Locale.getDefault());
+ }
+ }
@CLIResolver
public static Hudson getInstance() {
@@ -2697,6 +2709,9 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
}
}
+ updateCenter.shutdown();
+ pluginCenter.shutdown();
+
LogFactory.releaseAll();
theInstance = null;
diff --git a/hudson-core/src/main/java/hudson/model/Job.java b/hudson-core/src/main/java/hudson/model/Job.java
index aea2a4a5..62573829 100644
--- a/hudson-core/src/main/java/hudson/model/Job.java
+++ b/hudson-core/src/main/java/hudson/model/Job.java
@@ -211,7 +211,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
}
//Bug Fix: 406889 - Non overriden job properties or properties with no values should not be written to config.xml
- private Object writeReplace() throws ObjectStreamException, IOException {
+ public Object writeReplace() throws ObjectStreamException, IOException {
persistableJobProperties.clear();
for (String key : jobProperties.keySet()) {
diff --git a/hudson-core/src/main/java/hudson/model/ListView.java b/hudson-core/src/main/java/hudson/model/ListView.java
index ebc0aa38..32a3e9e2 100644
--- a/hudson-core/src/main/java/hudson/model/ListView.java
+++ b/hudson-core/src/main/java/hudson/model/ListView.java
@@ -86,7 +86,7 @@ public class ListView extends View implements Saveable {
}
}
- private Object readResolve() {
+ public Object readResolve() {
if (includeRegex != null) {
includePattern = Pattern.compile(includeRegex);
}
diff --git a/hudson-core/src/main/java/hudson/model/Queue.java b/hudson-core/src/main/java/hudson/model/Queue.java
index 5e9397c3..e17bd847 100644
--- a/hudson-core/src/main/java/hudson/model/Queue.java
+++ b/hudson-core/src/main/java/hudson/model/Queue.java
@@ -947,7 +947,7 @@ public class Queue extends ResourceController implements Saveable {
WaitingItem top = peek();
if (!top.timestamp.before(new GregorianCalendar())) {
- return; // finished moving all ready items from queue
+ break; // finished moving all ready items from queue
}
waitingList.remove(top);
Task p = top.task;
@@ -1428,7 +1428,7 @@ public class Queue extends ResourceController implements Saveable {
future.setAsCancelled();
}
- private Object readResolve() {
+ public Object readResolve() {
this.future = new FutureImpl(task);
return this;
}
diff --git a/hudson-core/src/main/java/hudson/model/Run.java b/hudson-core/src/main/java/hudson/model/Run.java
index 329a0943..16030ef9 100644
--- a/hudson-core/src/main/java/hudson/model/Run.java
+++ b/hudson-core/src/main/java/hudson/model/Run.java
@@ -79,6 +79,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.HashSet;
+import java.util.TimeZone;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
@@ -87,9 +88,11 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
+
import org.apache.commons.io.input.NullInputStream;
import org.apache.commons.io.IOUtils;
import org.apache.commons.jelly.XMLOutput;
+import org.apache.commons.lang3.time.FastDateFormat;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.HttpResponses;
import org.kohsuke.stapler.QueryParameter;
@@ -99,6 +102,7 @@ import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;
import com.thoughtworks.xstream.XStream;
+
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
@@ -218,13 +222,8 @@ public abstract class Run<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
* This field is not persisted.
*/
private volatile transient Runner runner;
- protected static final ThreadLocal<SimpleDateFormat> ID_FORMATTER =
- new ThreadLocal<SimpleDateFormat>() {
- @Override
- protected SimpleDateFormat initialValue() {
- return new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
- }
- };
+
+ protected static final Hudson.HudsonDateFormat ID_FORMATTER = new Hudson.HudsonDateFormat("yyyy-MM-dd_HH-mm-ss");
/**
* State when a Run is being created from cached values.
@@ -316,7 +315,7 @@ public abstract class Run<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
/*package*/ static long parseTimestampFromBuildDir(File buildDir) throws IOException {
try {
- return ID_FORMATTER.get().parse(buildDir.getName()).getTime();
+ return ID_FORMATTER.parse(buildDir.getName()).getTime();
} catch (ParseException e) {
throw new IOException2("Invalid directory name " + buildDir, e);
} catch (NumberFormatException e) {
@@ -908,16 +907,17 @@ public abstract class Run<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
*/
@Exported
public String getId() {
- return ID_FORMATTER.get().format(new Date(timestamp));
+ return ID_FORMATTER.format(new Date(timestamp));
}
/**
* Get the date formatter used to convert the directory name in to a
* timestamp This is nasty exposure of private data, but needed all the time
* the directory containing the build is used as it's timestamp.
+ * @since 3.3.0 creates new DateFormat on each call to eliminate ThreadLocal
*/
public static DateFormat getIDFormatter() {
- return ID_FORMATTER.get();
+ return new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
}
public Descriptor getDescriptorByName(String className) {
diff --git a/hudson-core/src/main/java/hudson/model/RunMap.java b/hudson-core/src/main/java/hudson/model/RunMap.java
index 52c17b38..d9bf35a3 100644
--- a/hudson-core/src/main/java/hudson/model/RunMap.java
+++ b/hudson-core/src/main/java/hudson/model/RunMap.java
@@ -590,7 +590,7 @@ public final class RunMap<J extends Job<J, R>, R extends Run<J, R>>
if ( !loadFromRunMapXml(job, cons)) {
- final SimpleDateFormat formatter = Run.ID_FORMATTER.get();
+ final Hudson.HudsonDateFormat formatter = Run.ID_FORMATTER;
TreeMap<Integer, RunValue<J,R>> m = new TreeMap<Integer, RunValue<J,R>>(BUILD_TIME_COMPARATOR);
diff --git a/hudson-core/src/main/java/hudson/model/Slave.java b/hudson-core/src/main/java/hudson/model/Slave.java
index b6ff7d53..430f488b 100644
--- a/hudson-core/src/main/java/hudson/model/Slave.java
+++ b/hudson-core/src/main/java/hudson/model/Slave.java
@@ -330,7 +330,7 @@ public abstract class Slave extends Node implements Serializable {
/**
* Invoked by XStream when this object is read into memory.
*/
- private Object readResolve() {
+ public Object readResolve() {
// convert the old format to the new one
if (command != null && agentCommand == null) {
if (command.length() > 0) {
diff --git a/hudson-core/src/main/java/hudson/model/UpdateCenter.java b/hudson-core/src/main/java/hudson/model/UpdateCenter.java
index b9360a88..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
@@ -713,6 +716,13 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
}
}
+ public void shutdown() {
+ List<Runnable> running = installerService.shutdownNow();
+ if (!running.isEmpty()) {
+ LOGGER.warning("shutdown with "+running.size()+" jobs pending");
+ }
+ }
+
/**
* Tests the internet connectivity.
*/
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/hudson/model/WorkspaceCleanupThread.java b/hudson-core/src/main/java/hudson/model/WorkspaceCleanupThread.java
index 760ed242..5605e6f1 100644
--- a/hudson-core/src/main/java/hudson/model/WorkspaceCleanupThread.java
+++ b/hudson-core/src/main/java/hudson/model/WorkspaceCleanupThread.java
@@ -94,9 +94,23 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
// One remoting can execute "exists", "lastModified", and "delete" all at once.
TopLevelItem item = Hudson.getInstance().getItem(jobName);
if (item == null) {
- // no such project anymore
- LOGGER.fine("Directory " + dir + " is not owned by any project");
- return true;
+ //bug fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=434000
+ // Workspace directories for concurrent jobs removed before build completion
+ // Since _<number> is added to job name, it has to be stripped before checking
+ int index = jobName.lastIndexOf("_");
+ if (index > 0) {
+ jobName = jobName.substring(0, index);
+ item = Hudson.getInstance().getItem(jobName);
+ if (item == null) {
+ // no such project anymore
+ LOGGER.fine("Directory " + dir + " is not owned by any project");
+ return true;
+ }
+ } else {
+ // no such project anymore
+ LOGGER.fine("Directory " + dir + " is not owned by any project");
+ return true;
+ }
}
if (!dir.exists()) {
diff --git a/hudson-core/src/main/java/hudson/scm/SCM.java b/hudson-core/src/main/java/hudson/scm/SCM.java
index 5c0e941e..49c32bbe 100644
--- a/hudson-core/src/main/java/hudson/scm/SCM.java
+++ b/hudson-core/src/main/java/hudson/scm/SCM.java
@@ -359,26 +359,25 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
*/
public final PollingResult poll(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException {
// Ensure poll can't run during project delete.
- synchronized (project.getParent()) {
- synchronized (project) {
- if (!project.isDeleted()) {
- if (is1_346OrLater()) {
- // This is to work around HUDSON-5827 in a general way.
- // don't let the SCM.compareRemoteRevisionWith(...) see SCMRevisionState that it didn't produce.
- SCMRevisionState baseline2;
- if (baseline != SCMRevisionState.NONE) {
- baseline2 = baseline;
- } else {
- baseline2 = _calcRevisionsFromBuild(project.getLastBuild(), launcher, listener);
- }
-
- return _compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2);
+ // Fix Bug 460866 - SCM polling appears to hang Hudson
+ synchronized (project.getDeleteLock()) {
+ if (!project.isDeleted()) {
+ if (is1_346OrLater()) {
+ // This is to work around HUDSON-5827 in a general way.
+ // don't let the SCM.compareRemoteRevisionWith(...) see SCMRevisionState that it didn't produce.
+ SCMRevisionState baseline2;
+ if (baseline != SCMRevisionState.NONE) {
+ baseline2 = baseline;
} else {
- return pollChanges(project, launcher, workspace, listener) ? PollingResult.SIGNIFICANT : PollingResult.NO_CHANGES;
+ baseline2 = _calcRevisionsFromBuild(project.getLastBuild(), launcher, listener);
}
+
+ return _compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2);
} else {
- return PollingResult.NO_CHANGES;
+ return pollChanges(project, launcher, workspace, listener) ? PollingResult.SIGNIFICANT : PollingResult.NO_CHANGES;
}
+ } else {
+ return PollingResult.NO_CHANGES;
}
}
}
diff --git a/hudson-core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java b/hudson-core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java
index cd248dbc..a8d0fb54 100644
--- a/hudson-core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java
+++ b/hudson-core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java
@@ -82,7 +82,7 @@ public abstract class AbstractPasswordBasedSecurityRealm extends SecurityRealm i
ProviderManager providerManager = new ProviderManager();
providerManager.setProviders(Arrays.asList(authenticationProvider));
- return new SecurityComponents(providerManager);
+ return new SecurityComponents(providerManager, this);
}
diff --git a/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java b/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
index c4a3dae3..b4beaacd 100644
--- a/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
+++ b/hudson-core/src/main/java/hudson/security/AuthorizationMatrixProperty.java
@@ -15,45 +15,40 @@
package hudson.security;
+import com.thoughtworks.xstream.converters.Converter;
+import com.thoughtworks.xstream.converters.MarshallingContext;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import hudson.Extension;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.AbstractProject;
+import hudson.model.Computer;
import hudson.model.Item;
import hudson.model.Job;
import hudson.model.JobProperty;
import hudson.model.JobPropertyDescriptor;
import hudson.model.Run;
-import hudson.Extension;
+import hudson.model.View;
import hudson.util.FormValidation;
import hudson.util.RobustReflectionConverter;
-
+import java.io.IOException;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
-import java.util.Collections;
import java.util.Map.Entry;
+import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
-import java.io.IOException;
-
-import net.sf.json.JSONObject;
-
-import org.kohsuke.stapler.StaplerRequest;
-import org.kohsuke.stapler.QueryParameter;
-import org.kohsuke.stapler.AncestorInPath;
-
-import com.thoughtworks.xstream.converters.Converter;
-import com.thoughtworks.xstream.converters.MarshallingContext;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import hudson.model.Computer;
-import hudson.model.View;
-
import javax.servlet.ServletException;
+import net.sf.json.JSONObject;
import org.eclipse.hudson.security.HudsonSecurityEntitiesHolder;
+import org.kohsuke.stapler.AncestorInPath;
+import org.kohsuke.stapler.QueryParameter;
+import org.kohsuke.stapler.StaplerRequest;
import org.springframework.security.acls.model.Sid;
/**
@@ -266,16 +261,17 @@ public class AuthorizationMatrixProperty extends JobProperty<Job<?, ?>> {
final UnmarshallingContext context) {
AuthorizationMatrixProperty as = new AuthorizationMatrixProperty();
- String prop = reader.peekNextChild();
- if (prop != null && prop.equals("useProjectSecurity")) {
- reader.moveDown();
- reader.getValue(); // we used to use this but not any more.
- reader.moveUp();
- }
while (reader.hasMoreChildren()) {
reader.moveDown();
try {
- as.add(reader.getValue());
+ String prop = reader.getValue();
+ if (prop != null) {
+ if (prop.equals("useProjectSecurity")) {
+ // Do nothing, we no longer use it
+ } else {
+ as.add(prop);
+ }
+ }
} catch (IllegalArgumentException ex) {
Logger.getLogger(AuthorizationMatrixProperty.class.getName())
.log(Level.WARNING, "Skipping a non-existent permission", ex);
diff --git a/hudson-core/src/main/java/hudson/security/PAMSecurityRealm.java b/hudson-core/src/main/java/hudson/security/PAMSecurityRealm.java
index 599ca5ac..8cd39cd9 100644
--- a/hudson-core/src/main/java/hudson/security/PAMSecurityRealm.java
+++ b/hudson-core/src/main/java/hudson/security/PAMSecurityRealm.java
@@ -29,21 +29,13 @@ import java.util.List;
import org.kohsuke.stapler.DataBoundConstructor;
import java.util.Set;
-import org.eclipse.hudson.security.HudsonSecurityEntitiesHolder;
import org.springframework.dao.DataAccessException;
-import org.springframework.security.authentication.AnonymousAuthenticationProvider;
-import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.BadCredentialsException;
-import org.springframework.security.authentication.ProviderManager;
-import org.springframework.security.authentication.RememberMeAuthenticationProvider;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.GrantedAuthorityImpl;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
/**
@@ -52,7 +44,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
* @author Kohsuke Kawaguchi
* @since 1.282
*/
-public class PAMSecurityRealm extends SecurityRealm {
+public class PAMSecurityRealm extends AbstractPasswordBasedSecurityRealm {
public final String serviceName;
@@ -65,85 +57,37 @@ public class PAMSecurityRealm extends SecurityRealm {
this.serviceName = serviceName;
}
- public static class PAMAuthenticationProvider implements AuthenticationProvider {
-
- private String serviceName;
-
- public PAMAuthenticationProvider(String serviceName) {
- this.serviceName = serviceName;
- }
-
- public Authentication authenticate(Authentication authentication) throws AuthenticationException {
- String username = authentication.getPrincipal().toString();
- String password = authentication.getCredentials().toString();
-
- try {
+ @Override
+ protected UserDetails authenticate(String username, String password) throws AuthenticationException {
+ try {
- Set<String> grps = NativeUtils.getInstance().pamAuthenticate(serviceName, username, password);
- List<GrantedAuthority> groups = new ArrayList<GrantedAuthority>();
- int i = 0;
- for (String g : grps) {
- groups.add(new GrantedAuthorityImpl(g));
- }
- EnvVars.setHudsonUserEnvVar(username);
- // I never understood why Spring Security insists on keeping the password...
- return new UsernamePasswordAuthenticationToken(username, password, groups);
- } catch (NativeAccessException exc) {
- throw new BadCredentialsException(exc.getMessage(), exc);
+ Set<String> grps = NativeUtils.getInstance().pamAuthenticate(serviceName, username, password);
+ List<GrantedAuthority> groups = new ArrayList<GrantedAuthority>();
+ for (String g : grps) {
+ groups.add(new GrantedAuthorityImpl(g));
}
-
- }
-
- @Override
- public boolean supports(Class clazz) {
- return true;
+ groups.add(AUTHENTICATED_AUTHORITY);
+ EnvVars.setHudsonUserEnvVar(username);
+ return new User(username, "", true, true, true, true, groups);
+ } catch (NativeAccessException exc) {
+ throw new BadCredentialsException(exc.getMessage(), exc);
}
}
@Override
- public SecurityComponents createSecurityComponents() {
-
- // talk to PAM
- PAMAuthenticationProvider PamAuthenticationProvider = new PAMAuthenticationProvider(serviceName);
-
- // these providers apply everywhere
- RememberMeAuthenticationProvider rememberMeAuthenticationProvider = new RememberMeAuthenticationProvider();
- rememberMeAuthenticationProvider.setKey(HudsonSecurityEntitiesHolder.getHudsonSecurityManager().getSecretKey());
-
- // this doesn't mean we allow anonymous access.
- // we just authenticate anonymous users as such,
- // so that later authorization can reject them if so configured
- AnonymousAuthenticationProvider anonymousAuthenticationProvider = new AnonymousAuthenticationProvider();
- anonymousAuthenticationProvider.setKey("anonymous");
-
- AuthenticationProvider[] authenticationProvider = {
- PamAuthenticationProvider,
- rememberMeAuthenticationProvider,
- anonymousAuthenticationProvider
- };
-
- ProviderManager providerManager = new ProviderManager();
- providerManager.setProviders(Arrays.asList(authenticationProvider));
-
- UserDetailsService userDetailsService = new UserDetailsService() {
- public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
- try {
- if (!NativeUtils.getInstance().checkUnixUser(username)) {
- throw new UsernameNotFoundException("No such Unix user: " + username);
- }
- } catch (NativeAccessException exc) {
- throw new DataAccessException("Failed to find Unix User", exc) {
- };
- }
-
- // return some dummy instance
- return new User(username, "", true, true, true, true,
- Arrays.asList(new GrantedAuthority[]{AUTHENTICATED_AUTHORITY}));
+ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
+ try {
+ if (!NativeUtils.getInstance().checkUnixUser(username)) {
+ throw new UsernameNotFoundException("No such Unix user: " + username);
}
- };
-
- return new SecurityComponents(providerManager, userDetailsService);
+ } catch (NativeAccessException exc) {
+ throw new DataAccessException("Failed to find Unix User", exc) {
+ };
+ }
+ // return some dummy instance
+ return new User(username, "", true, true, true, true,
+ Arrays.asList(new GrantedAuthority[]{AUTHENTICATED_AUTHORITY}));
}
@Override
diff --git a/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java b/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java
index 5ca1b84b..b1e006c1 100644
--- a/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java
+++ b/hudson-core/src/main/java/hudson/security/ProjectMatrixAuthorizationStrategy.java
@@ -16,16 +16,16 @@
package hudson.security;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.core.JVM;
+import com.thoughtworks.xstream.io.ExtendedHierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.mapper.Mapper;
+import hudson.Extension;
import hudson.model.Descriptor;
import hudson.model.Hudson;
import hudson.model.Job;
import hudson.util.RobustReflectionConverter;
-import hudson.Extension;
-import com.thoughtworks.xstream.io.HierarchicalStreamReader;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-import com.thoughtworks.xstream.mapper.Mapper;
-import com.thoughtworks.xstream.core.JVM;
-
import java.util.HashSet;
import java.util.Set;
@@ -88,7 +88,10 @@ public class ProjectMatrixAuthorizationStrategy extends GlobalMatrixAuthorizatio
@Override
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
- String name = reader.peekNextChild();
+ String name = null;
+ if (reader instanceof ExtendedHierarchicalStreamReader) {
+ name = ((ExtendedHierarchicalStreamReader) reader).peekNextChild();
+ }
if (name != null && (name.equals("permission") || name.equals("useProjectSecurity"))) // the proper serialization form
{
return super.unmarshal(reader, context);
diff --git a/hudson-core/src/main/java/hudson/slaves/AbstractCloudSlave.java b/hudson-core/src/main/java/hudson/slaves/AbstractCloudSlave.java
index 4fffb896..82ca40ac 100644
--- a/hudson-core/src/main/java/hudson/slaves/AbstractCloudSlave.java
+++ b/hudson-core/src/main/java/hudson/slaves/AbstractCloudSlave.java
@@ -57,7 +57,11 @@ public abstract class AbstractCloudSlave extends Slave {
_terminate(new StreamTaskListener(System.out, Charset.defaultCharset()));
} finally {
try {
- Hudson.getInstance().removeNode(this);
+ Hudson hudson = Hudson.getInstance();
+ hudson.removeNode(this);
+ if (hudson.isTeamManagementEnabled()) {
+ hudson.getTeamManager().removeNode(getNodeName());
+ }
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Failed to remove " + name, e);
}
diff --git a/hudson-core/src/main/java/hudson/slaves/NodeProvisioner.java b/hudson-core/src/main/java/hudson/slaves/NodeProvisioner.java
index 3260f5dd..20d397d2 100644
--- a/hudson-core/src/main/java/hudson/slaves/NodeProvisioner.java
+++ b/hudson-core/src/main/java/hudson/slaves/NodeProvisioner.java
@@ -123,7 +123,16 @@ public class NodeProvisioner {
PlannedNode f = itr.next();
if (f.future.isDone()) {
try {
- hudson.addNode(f.future.get());
+ Node node = f.future.get();
+ // Add to public team
+ hudson.addNode(node);
+ if (hudson.isTeamManagementEnabled()) {
+ try {
+ hudson.getTeamManager().addNode(null, node.getNodeName());
+ } catch (Exception e) {
+ LOGGER.log(Level.SEVERE, "Node cannot be added to public team", e);
+ }
+ }
LOGGER.info(f.displayName + " provisioning successfully completed. We have now " + hudson.getComputers().length + " computer(s)");
} catch (InterruptedException e) {
throw new AssertionError(e); // since we confirmed that the future is already done
diff --git a/hudson-core/src/main/java/hudson/tasks/Ant.java b/hudson-core/src/main/java/hudson/tasks/Ant.java
index f729178e..d9eb28eb 100644
--- a/hudson-core/src/main/java/hudson/tasks/Ant.java
+++ b/hudson-core/src/main/java/hudson/tasks/Ant.java
@@ -34,30 +34,29 @@ import hudson.model.TaskListener;
import hudson.remoting.Callable;
import hudson.slaves.NodeSpecific;
import hudson.tasks._ant.AntConsoleAnnotator;
+import hudson.tools.DownloadFromUrlInstaller;
import hudson.tools.ToolDescriptor;
import hudson.tools.ToolInstallation;
-import hudson.tools.DownloadFromUrlInstaller;
import hudson.tools.ToolInstaller;
import hudson.tools.ToolProperty;
import hudson.util.ArgumentListBuilder;
-import hudson.util.VariableResolver;
import hudson.util.FormValidation;
+import hudson.util.VariableResolver;
import hudson.util.XStream2;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.kohsuke.stapler.DataBoundConstructor;
-import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.QueryParameter;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.List;
-import java.util.Collections;
-import java.util.Set;
+import org.kohsuke.stapler.StaplerRequest;
/**
* Ant launcher.
@@ -89,14 +88,21 @@ public class Ant extends Builder {
* syntax.
*/
private final String properties;
+
+ public Ant(String targets, String antName, String antOpts, String buildFile, String properties) {
+ this(targets, antName, antOpts, buildFile, properties, false, "");
+ }
+
@DataBoundConstructor
- public Ant(String targets, String antName, String antOpts, String buildFile, String properties) {
+ public Ant(String targets, String antName, String antOpts, String buildFile, String properties, boolean disabled, String description) {
this.targets = targets;
this.antName = antName;
this.antOpts = StringUtils.trimToNull(antOpts);
this.buildFile = StringUtils.trimToNull(buildFile);
this.properties = StringUtils.trimToNull(properties);
+ setDisabled(disabled);
+ setDescription(description);
}
public String getBuildFile() {
@@ -132,6 +138,11 @@ public class Ant extends Builder {
@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
+ if (isDisabled()){
+ listener.getLogger().println("\nThe Ant builder is temporarily disabled.\n");
+ // just continue, this builder is disabled temporarily
+ return true;
+ }
ArgumentListBuilder args = new ArgumentListBuilder();
EnvVars env = build.getEnvironment(listener);
diff --git a/hudson-core/src/main/java/hudson/tasks/BatchFile.java b/hudson-core/src/main/java/hudson/tasks/BatchFile.java
index 91c4a650..34a71231 100644
--- a/hudson-core/src/main/java/hudson/tasks/BatchFile.java
+++ b/hudson-core/src/main/java/hudson/tasks/BatchFile.java
@@ -16,8 +16,8 @@
package hudson.tasks;
-import hudson.FilePath;
import hudson.Extension;
+import hudson.FilePath;
import hudson.model.AbstractProject;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.DataBoundConstructor;
@@ -29,10 +29,16 @@ import org.kohsuke.stapler.StaplerRequest;
* @author Kohsuke Kawaguchi
*/
public class BatchFile extends CommandInterpreter {
+
+ public BatchFile(String command) {
+ this(command, false, "");
+ }
@DataBoundConstructor
- public BatchFile(String command) {
+ public BatchFile(String command, boolean disabled, String description) {
super(command);
+ setDisabled(disabled);
+ setDescription(description);
}
public String[] buildCommandLine(FilePath script) {
@@ -61,7 +67,7 @@ public class BatchFile extends CommandInterpreter {
@Override
public Builder newInstance(StaplerRequest req, JSONObject data) {
- return new BatchFile(data.getString("command"));
+ return new BatchFile(data.getString("command"), data.getBoolean("disabled"), data.getString("description"));
}
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
diff --git a/hudson-core/src/main/java/hudson/tasks/Builder.java b/hudson-core/src/main/java/hudson/tasks/Builder.java
index b48ee0a1..ba25d121 100644
--- a/hudson-core/src/main/java/hudson/tasks/Builder.java
+++ b/hudson-core/src/main/java/hudson/tasks/Builder.java
@@ -16,9 +16,9 @@
package hudson.tasks;
-import hudson.ExtensionPoint;
-import hudson.Extension;
import hudson.DescriptorExtensionList;
+import hudson.Extension;
+import hudson.ExtensionPoint;
import hudson.model.Build;
import hudson.model.BuildListener;
import hudson.model.Describable;
@@ -37,7 +37,38 @@ public abstract class Builder extends BuildStepCompatibilityLayer implements Bui
//
// these two methods need to remain to keep binary compatibility with plugins built with Hudson < 1.150
-//
+
+ /**
+ * @since 3.3.0
+ * Ability to temporarily disable a builder with out deleting it
+ * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=386082)
+ */
+ private boolean disabled = false;
+
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ /**
+ * @since 3.3.0
+ * Description of what this builder does as documentation
+ * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=414876)
+ */
+
+ private String description;
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
/**
* Default implementation that does nothing.
*/
diff --git a/hudson-core/src/main/java/hudson/tasks/CommandInterpreter.java b/hudson-core/src/main/java/hudson/tasks/CommandInterpreter.java
index 537e4c20..10904ae2 100644
--- a/hudson-core/src/main/java/hudson/tasks/CommandInterpreter.java
+++ b/hudson-core/src/main/java/hudson/tasks/CommandInterpreter.java
@@ -16,14 +16,13 @@
package hudson.tasks;
+import hudson.EnvVars;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
-import hudson.EnvVars;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.model.TaskListener;
-
import java.io.IOException;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
@@ -51,10 +50,18 @@ public abstract class CommandInterpreter extends Builder {
@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException {
+ if (isDisabled()){
+ listener.getLogger().print("\nThe command interpreter builder is temporarily disabled.\n");
+ return true;
+ }
return perform(build, launcher, (TaskListener) listener);
}
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws InterruptedException {
+ if (isDisabled()){
+ // just continue, this builder is disabled temporarily
+ return true;
+ }
FilePath ws = build.getWorkspace();
FilePath script = null;
try {
diff --git a/hudson-core/src/main/java/hudson/tasks/Maven.java b/hudson-core/src/main/java/hudson/tasks/Maven.java
index 573127a8..d8577f77 100644
--- a/hudson-core/src/main/java/hudson/tasks/Maven.java
+++ b/hudson-core/src/main/java/hudson/tasks/Maven.java
@@ -12,56 +12,55 @@
* Kohsuke Kawaguchi, Jene Jasper, Stephen Connolly, Tom Huybrechts, Yahoo! Inc., Nikita Levyankov
*
*
- *******************************************************************************/
+ *******************************************************************************/
package hudson.tasks;
+import hudson.CopyOnWrite;
+import hudson.EnvVars;
import hudson.Extension;
-import hudson.Launcher;
+import hudson.FilePath.FileCallable;
import hudson.Functions;
-import hudson.EnvVars;
-import hudson.Util;
-import hudson.CopyOnWrite;
+import hudson.Launcher;
import hudson.Launcher.LocalLauncher;
-import hudson.FilePath.FileCallable;
+import hudson.Util;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.Computer;
import hudson.model.EnvironmentSpecific;
-import hudson.model.Node;
import hudson.model.Hudson;
+import hudson.model.Node;
import hudson.model.TaskListener;
import hudson.remoting.Callable;
import hudson.remoting.VirtualChannel;
import hudson.slaves.NodeSpecific;
import hudson.tasks._maven.MavenConsoleAnnotator;
+import hudson.tools.DownloadFromUrlInstaller;
import hudson.tools.ToolDescriptor;
import hudson.tools.ToolInstallation;
-import hudson.tools.DownloadFromUrlInstaller;
import hudson.tools.ToolInstaller;
import hudson.tools.ToolProperty;
import hudson.util.ArgumentListBuilder;
+import hudson.util.FormValidation;
import hudson.util.NullStream;
import hudson.util.StreamTaskListener;
import hudson.util.VariableResolver;
-import hudson.util.FormValidation;
import hudson.util.XStream2;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.kohsuke.stapler.DataBoundConstructor;
-import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.QueryParameter;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.List;
-import java.util.Collections;
-import java.util.Set;
+import org.kohsuke.stapler.StaplerRequest;
/**
* Build by using Maven.
@@ -109,21 +108,29 @@ public class Maven extends Builder {
private final static String MAVEN_2_INSTALLATION_COMMON_FILE = "bin/mvn";
public Maven(String targets, String name) {
- this(targets, name, null, null, null, false);
+ this(targets, name, null, null, null, false, false, "");
}
public Maven(String targets, String name, String pom, String properties, String jvmOptions) {
- this(targets, name, pom, properties, jvmOptions, false);
+ this(targets, name, pom, properties, jvmOptions, false, false, "");
+ }
+
+ public Maven(String targets, String name, String pom, String properties,
+ String jvmOptions, boolean usePrivateRepository) {
+ this(targets, name, pom, properties, jvmOptions, usePrivateRepository, false, "");
}
@DataBoundConstructor
- public Maven(String targets, String name, String pom, String properties, String jvmOptions, boolean usePrivateRepository) {
+ public Maven(String targets, String name, String pom, String properties,
+ String jvmOptions, boolean usePrivateRepository, boolean disabled, String description) {
this.targets = targets;
this.mavenName = name;
this.pom = StringUtils.trimToNull(pom);
this.properties = StringUtils.trimToNull(properties);
this.jvmOptions = StringUtils.trimToNull(jvmOptions);
this.usePrivateRepository = usePrivateRepository;
+ setDisabled(disabled);
+ setDescription(description);
}
public String getTargets() {
@@ -197,6 +204,11 @@ public class Maven extends Builder {
@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException {
+ if (isDisabled()){
+ listener.getLogger().print("\nThe legacy maven2 builder is temporarily disabled\n");
+ // just continue, this builder is disabled temporarily
+ return true;
+ }
VariableResolver<String> vr = build.getBuildVariableResolver();
EnvVars env = build.getEnvironment(listener);
@@ -296,7 +308,15 @@ public class Maven extends Builder {
String jvmOptions = env.expand(this.jvmOptions);
if (jvmOptions != null) {
- env.put("MAVEN_OPTS", jvmOptions.replaceAll("[\t\r\n]+", " "));
+ final String jvmOptionsOneLine = jvmOptions.replaceAll("[\t\r\n]+", " ");
+ final String envMavenOpts = env.expand("MAVEN_OPTS");
+ final String mavenOpts;
+ if (envMavenOpts != null) {
+ mavenOpts = envMavenOpts + " " + jvmOptionsOneLine;
+ } else {
+ mavenOpts = jvmOptionsOneLine;
+ }
+ env.put("MAVEN_OPTS", mavenOpts);
}
}
@@ -404,8 +424,8 @@ public class Maven extends Builder {
* - constants defined above.
*/
public boolean meetsMavenReqVersion(Launcher launcher, int mavenReqVersion) throws IOException, InterruptedException {
- // FIXME using similar stuff as in the maven plugin could be better
- // olamy : but will add a dependency on maven in core -> so not so good
+ // FIXME using similar stuff as in the maven plugin could be better
+ // olamy : but will add a dependency on maven in core -> so not so good
String mavenVersion = launcher.getChannel().call(new Callable<String, IOException>() {
public String call() throws IOException {
File[] jars = new File(getHomeDir(), "lib").listFiles();
diff --git a/hudson-core/src/main/java/hudson/tasks/Shell.java b/hudson-core/src/main/java/hudson/tasks/Shell.java
index a2574805..ad39dbfd 100644
--- a/hudson-core/src/main/java/hudson/tasks/Shell.java
+++ b/hudson-core/src/main/java/hudson/tasks/Shell.java
@@ -16,24 +16,23 @@
package hudson.tasks;
+import hudson.Extension;
import hudson.FilePath;
import hudson.Functions;
import hudson.Util;
-import hudson.Extension;
import hudson.model.AbstractProject;
import hudson.remoting.Callable;
import hudson.remoting.VirtualChannel;
import hudson.util.FormValidation;
import java.io.IOException;
-import net.sf.json.JSONObject;
-import org.kohsuke.stapler.DataBoundConstructor;
-import org.kohsuke.stapler.StaplerRequest;
-import org.kohsuke.stapler.QueryParameter;
-
-import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
import java.util.logging.Logger;
+import net.sf.json.JSONObject;
+import org.kohsuke.stapler.DataBoundConstructor;
+import org.kohsuke.stapler.QueryParameter;
+import org.kohsuke.stapler.StaplerRequest;
/**
* Executes a series of commands by using a shell.
@@ -44,9 +43,14 @@ public class Shell extends CommandInterpreter {
private static final Logger LOGGER = Logger.getLogger(Shell.class.getName());
+ public Shell(String command){
+ this(command, false, "");
+ }
@DataBoundConstructor
- public Shell(String command) {
+ public Shell(String command, boolean disabled, String description) {
super(fixCrLf(command));
+ this.setDisabled(disabled);
+ setDescription(description);
}
/**
@@ -165,7 +169,7 @@ public class Shell extends CommandInterpreter {
@Override
public Builder newInstance(StaplerRequest req, JSONObject data) {
- return new Shell(data.getString("command"));
+ return new Shell(data.getString("command"), data.getBoolean("disabled"), data.getString("description"));
}
@Override
diff --git a/hudson-core/src/main/java/hudson/tools/ToolInstallation.java b/hudson-core/src/main/java/hudson/tools/ToolInstallation.java
index 205299d0..21c340ab 100644
--- a/hudson-core/src/main/java/hudson/tools/ToolInstallation.java
+++ b/hudson-core/src/main/java/hudson/tools/ToolInstallation.java
@@ -16,23 +16,26 @@
package hudson.tools;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
import hudson.DescriptorExtensionList;
import hudson.EnvVars;
import hudson.Extension;
import hudson.ExtensionPoint;
import hudson.diagnosis.OldDataMonitor;
-import hudson.model.*;
+import hudson.model.AbstractDescribableImpl;
+import hudson.model.EnvironmentSpecific;
+import hudson.model.Hudson;
+import hudson.model.Node;
+import hudson.model.Saveable;
+import hudson.model.TaskListener;
import hudson.slaves.NodeSpecific;
import hudson.util.DescribableList;
import hudson.util.XStream2;
-
-import java.io.Serializable;
+import hudson.util.XStreamSerializable;
import java.io.IOException;
+import java.io.Serializable;
import java.util.List;
-import com.thoughtworks.xstream.annotations.XStreamSerializable;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
-
/**
* Formalization of a tool installed in nodes used for builds (examples include
* things like JDKs, Ants, Mavens, etc..)
@@ -140,7 +143,7 @@ public abstract class ToolInstallation extends AbstractDescribableImpl<ToolInsta
/**
* Invoked by XStream when this object is read into memory.
*/
- private Object readResolve() {
+ public Object readResolve() {
if (properties == null) {
properties = new DescribableList<ToolProperty<?>, ToolPropertyDescriptor>(Saveable.NOOP);
}
diff --git a/hudson-core/src/main/java/hudson/util/CopyOnWriteList.java b/hudson-core/src/main/java/hudson/util/CopyOnWriteList.java
index ae105da9..f7e04e9d 100644
--- a/hudson-core/src/main/java/hudson/util/CopyOnWriteList.java
+++ b/hudson-core/src/main/java/hudson/util/CopyOnWriteList.java
@@ -16,26 +16,25 @@
package hudson.util;
-import com.thoughtworks.xstream.mapper.CannotResolveClassException;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import com.thoughtworks.xstream.mapper.CannotResolveClassException;
import com.thoughtworks.xstream.mapper.Mapper;
-
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import java.util.Arrays;
+import static java.util.logging.Level.FINE;
+
import java.util.logging.Logger;
import org.apache.commons.collections.CollectionUtils;
-import static java.util.logging.Level.WARNING;
-
/**
* {@link List}-like implementation that has copy-on-write semantics.
*
@@ -185,10 +184,10 @@ public class CopyOnWriteList<E> implements Iterable<E> {
Object item = readItem(reader, context, items);
items.add(item);
} catch (CannotResolveClassException e) {
- LOGGER.log(WARNING, "Failed to resolve class", e);
+ LOGGER.log(FINE, "Failed to resolve class", e);
RobustReflectionConverter.addErrorInContext(context, e);
} catch (LinkageError e) {
- LOGGER.log(WARNING, "Failed to resolve class", e);
+ LOGGER.log(FINE, "Failed to resolve class", e);
RobustReflectionConverter.addErrorInContext(context, e);
}
reader.moveUp();
diff --git a/hudson-core/src/main/java/hudson/util/NonExistentFieldException.java b/hudson-core/src/main/java/hudson/util/NonExistentFieldException.java
new file mode 100644
index 00000000..cdf94dbb
--- /dev/null
+++ b/hudson-core/src/main/java/hudson/util/NonExistentFieldException.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2015 Hudson.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Hudson - initial API and implementation and/or initial documentation
+ */
+package hudson.util;
+
+import com.thoughtworks.xstream.converters.reflection.ObjectAccessException;
+
+public class NonExistentFieldException extends ObjectAccessException {
+
+ private final String fieldName;
+
+ public NonExistentFieldException(String message, String fieldName) {
+ super(message);
+ this.fieldName = fieldName;
+ }
+
+ public String getFieldName() {
+ return fieldName;
+ }
+}
diff --git a/hudson-core/src/main/java/hudson/util/PluginServletFilter.java b/hudson-core/src/main/java/hudson/util/PluginServletFilter.java
index 228d54db..274da52e 100644
--- a/hudson-core/src/main/java/hudson/util/PluginServletFilter.java
+++ b/hudson-core/src/main/java/hudson/util/PluginServletFilter.java
@@ -74,6 +74,16 @@ public class PluginServletFilter implements Filter, ExtensionPoint {
}
}
+ /**
+ * All the clearing of filters between test, was causing a leakage
+ * breaking all subsequent tests.
+ */
+ public static void clearFilters() throws ServletException {
+ synchronized (LIST) {
+ LIST.clear();
+ }
+ }
+
public void doFilter(ServletRequest request, ServletResponse response, final FilterChain chain) throws IOException, ServletException {
new FilterChain() {
private int position = 0;
diff --git a/hudson-core/src/main/java/hudson/util/ProcessTree.java b/hudson-core/src/main/java/hudson/util/ProcessTree.java
index 47073730..751d8835 100644
--- a/hudson-core/src/main/java/hudson/util/ProcessTree.java
+++ b/hudson-core/src/main/java/hudson/util/ProcessTree.java
@@ -24,14 +24,8 @@ import hudson.remoting.Channel;
import hudson.remoting.VirtualChannel;
import hudson.slaves.SlaveComputer;
import hudson.util.ProcessTree.OSProcess;
-
import hudson.util.ProcessTreeRemoting.IOSProcess;
import hudson.util.ProcessTreeRemoting.IProcessTree;
-import org.eclipse.hudson.jna.NativeAccessException;
-import org.eclipse.hudson.jna.NativeUtils;
-import org.eclipse.hudson.jna.NativeProcess;
-import org.apache.commons.io.FileUtils;
-
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
@@ -45,6 +39,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
@@ -53,8 +48,11 @@ import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.SortedMap;
-import java.util.Arrays;
import java.util.StringTokenizer;
+import org.apache.commons.io.FileUtils;
+import org.eclipse.hudson.jna.NativeAccessException;
+import org.eclipse.hudson.jna.NativeProcess;
+import org.eclipse.hudson.jna.NativeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -563,7 +561,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
try {
int pid = getPid();
logger.debug("Killing pid=" + pid);
- UnixReflection.DESTROY_PROCESS.invoke(null, pid);
+ UnixReflection.destroyProcesses(pid);
} catch (IllegalAccessException e) {
// this is impossible
IllegalAccessError x = new IllegalAccessError();
@@ -616,8 +614,13 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
Class<?> clazz = Class.forName("java.lang.UNIXProcess");
PID_FIELD = clazz.getDeclaredField("pid");
PID_FIELD.setAccessible(true);
-
- DESTROY_PROCESS = clazz.getDeclaredMethod("destroyProcess", int.class);
+
+ if (isJava8OrLater()) {
+ // In JDK 8, the signature changed to destroyProcess(int pid, boolean force);
+ DESTROY_PROCESS = clazz.getDeclaredMethod("destroyProcess", int.class, boolean.class);
+ } else {
+ DESTROY_PROCESS = clazz.getDeclaredMethod("destroyProcess", int.class);
+ }
DESTROY_PROCESS.setAccessible(true);
} catch (ClassNotFoundException e) {
LinkageError x = new LinkageError();
@@ -633,6 +636,21 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
throw x;
}
}
+
+ static void destroyProcesses(int pid) throws IllegalAccessException, InvocationTargetException {
+ if (isJava8OrLater()) {
+ DESTROY_PROCESS.invoke(null, pid, true);
+ } else {
+ DESTROY_PROCESS.invoke(null, pid);
+ }
+ }
+
+ private static boolean isJava8OrLater(){
+ String javaVersionStr = System.getProperty("java.version");
+ String[] javaVersionElements = javaVersionStr.split("\\.");
+ int majorJavaVersion = Integer.parseInt(javaVersionElements[1]);
+ return majorJavaVersion > 7;
+ }
}
static class Linux extends ProcfsUnix {
diff --git a/hudson-core/src/main/java/hudson/util/RobustCollectionConverter.java b/hudson-core/src/main/java/hudson/util/RobustCollectionConverter.java
index 132d0ee4..7e4eed18 100644
--- a/hudson-core/src/main/java/hudson/util/RobustCollectionConverter.java
+++ b/hudson-core/src/main/java/hudson/util/RobustCollectionConverter.java
@@ -16,21 +16,20 @@
package hudson.util;
-import com.thoughtworks.xstream.mapper.CannotResolveClassException;
+import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.converters.collections.CollectionConverter;
import com.thoughtworks.xstream.converters.reflection.ReflectionProvider;
import com.thoughtworks.xstream.converters.reflection.SerializableConverter;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.mapper.CannotResolveClassException;
import com.thoughtworks.xstream.mapper.Mapper;
-import com.thoughtworks.xstream.XStream;
-
import java.util.Collection;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.logging.Logger;
+import static java.util.logging.Level.FINE;
-import static java.util.logging.Level.WARNING;
+import java.util.logging.Logger;
/**
* {@link CollectionConverter} that ignores {@link CannotResolveClassException}.
@@ -79,10 +78,10 @@ public class RobustCollectionConverter extends CollectionConverter {
Object item = readItem(reader, context, collection);
collection.add(item);
} catch (CannotResolveClassException e) {
- LOGGER.log(WARNING, "Failed to resolve class " + e.getMessage());
+ LOGGER.log(FINE, "Failed to resolve class " + e.getMessage());
RobustReflectionConverter.addErrorInContext(context, e);
} catch (LinkageError e) {
- LOGGER.log(WARNING, "Failed to resolve class " + e.getMessage());
+ LOGGER.log(FINE, "Failed to resolve class " + e.getMessage());
RobustReflectionConverter.addErrorInContext(context, e);
}
reader.moveUp();
diff --git a/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java b/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java
index 8b4d2313..57f2f073 100644
--- a/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java
+++ b/hudson-core/src/main/java/hudson/util/RobustReflectionConverter.java
@@ -17,38 +17,35 @@
package hudson.util;
import com.thoughtworks.xstream.converters.ConversionException;
-import com.thoughtworks.xstream.converters.SingleValueConverter;
-import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
+import com.thoughtworks.xstream.converters.SingleValueConverter;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.converters.reflection.MissingFieldException;
+import com.thoughtworks.xstream.converters.reflection.ObjectAccessException;
+import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
import com.thoughtworks.xstream.converters.reflection.ReflectionConverter;
import com.thoughtworks.xstream.converters.reflection.ReflectionProvider;
import com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker;
-import com.thoughtworks.xstream.converters.reflection.ObjectAccessException;
-import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
-import com.thoughtworks.xstream.converters.reflection.NonExistentFieldException;
import com.thoughtworks.xstream.core.util.Primitives;
+import com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriterHelper;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
-import com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriterHelper;
-import com.thoughtworks.xstream.mapper.Mapper;
import com.thoughtworks.xstream.mapper.CannotResolveClassException;
-
+import com.thoughtworks.xstream.mapper.Mapper;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.Saveable;
-
import java.lang.reflect.Field;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import java.util.HashSet;
-import java.util.Collection;
-import java.util.HashMap;
+import static java.util.logging.Level.FINE;
import java.util.logging.Logger;
-import static java.util.logging.Level.WARNING;
-
/**
* Custom {@link ReflectionConverter} that handle errors more gracefully.
*
@@ -245,14 +242,14 @@ public class RobustReflectionConverter implements Converter {
implicitCollectionsForCurrentObject = writeValueToImplicitCollection(context, value, implicitCollectionsForCurrentObject, result, fieldName);
}
}
- } catch (NonExistentFieldException e) {
- LOGGER.log(WARNING, "Skipping a non-existent field " + e.getFieldName());
+ } catch (MissingFieldException e) {
+ LOGGER.log(FINE, "Skipping a non-existent field " + e.getFieldName());
addErrorInContext(context, e);
} catch (CannotResolveClassException e) {
- LOGGER.log(WARNING, "Skipping a non-existent type " + e.getMessage());
+ LOGGER.log(FINE, "Skipping a non-existent type " + e.getMessage());
addErrorInContext(context, e);
} catch (LinkageError e) {
- LOGGER.log(WARNING, "Failed to resolve a type " + e.getMessage());
+ LOGGER.log(FINE, "Failed to resolve a type " + e.getMessage());
addErrorInContext(context, e);
}
@@ -272,7 +269,23 @@ public class RobustReflectionConverter implements Converter {
if (list == null) {
context.put("ReadError", list = new ArrayList<Throwable>());
}
- list.add(e);
+ // Suppress multiple reports for same field
+ boolean shouldAdd = true;
+ if (e instanceof NonExistentFieldException) {
+ String fieldName = ((NonExistentFieldException)e).getFieldName();
+ for (Throwable t : list) {
+ if (t instanceof NonExistentFieldException) {
+ String name = ((NonExistentFieldException)e).getFieldName();
+ if (name.equals(fieldName)) {
+ shouldAdd = false;
+ break;
+ }
+ }
+ }
+ }
+ if (shouldAdd) {
+ list.add(e);
+ }
}
private boolean fieldDefinedInClass(Object result, String attrName) {
diff --git a/hudson-core/src/main/java/hudson/util/XStream2.java b/hudson-core/src/main/java/hudson/util/XStream2.java
index 5e4e068c..f5aaeb97 100644
--- a/hudson-core/src/main/java/hudson/util/XStream2.java
+++ b/hudson-core/src/main/java/hudson/util/XStream2.java
@@ -1,26 +1,24 @@
-/*******************************************************************************
+/**
+ * *****************************************************************************
*
* Copyright (c) 2004-2010 Oracle Corporation.
*
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
- * Kohsuke Kawaguchi, Alan Harder
+ * Kohsuke Kawaguchi, Alan Harder
*
*
- *******************************************************************************/
-
+ ******************************************************************************
+ */
package hudson.util;
import com.google.common.collect.ImmutableMap;
import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.mapper.AnnotationMapper;
-import com.thoughtworks.xstream.mapper.Mapper;
-import com.thoughtworks.xstream.mapper.MapperWrapper;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.ConverterMatcher;
import com.thoughtworks.xstream.converters.DataHolder;
@@ -33,13 +31,14 @@ import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.mapper.CannotResolveClassException;
+import com.thoughtworks.xstream.mapper.Mapper;
+import com.thoughtworks.xstream.mapper.MapperWrapper;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.Hudson;
import hudson.model.Label;
import hudson.model.Result;
import hudson.model.Saveable;
import hudson.util.xstream.ImmutableMapConverter;
-
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.ConcurrentHashMap;
@@ -83,32 +82,27 @@ public class XStream2 extends XStream {
return o;
}
- @Override
- protected Converter createDefaultConverter() {
- // replace default reflection converter
- reflectionConverter = new RobustReflectionConverter(getMapper(), new JVM().bestReflectionProvider());
- return reflectionConverter;
- }
-
private void init() {
// list up types that should be marshalled out like a value, without referencial integrity tracking.
addImmutableType(Result.class);
- registerConverter(new RobustCollectionConverter(getMapper(), getReflectionProvider()), 10);
- registerConverter(new ImmutableMapConverter(getMapper(), getReflectionProvider()), 10);
- registerConverter(new ConcurrentHashMapConverter(getMapper(), getReflectionProvider()), 10);
- registerConverter(new CopyOnWriteMap.Tree.ConverterImpl(getMapper()), 10); // needs to override MapConverter
- registerConverter(new DescribableList.ConverterImpl(getMapper()), 10); // explicitly added to handle subtypes
- registerConverter(new Label.ConverterImpl(), 10);
+ registerConverter(new RobustCollectionConverter(getMapper(), getReflectionProvider()), XStream.PRIORITY_NORMAL);
+ registerConverter(new ImmutableMapConverter(getMapper(), getReflectionProvider()), XStream.PRIORITY_NORMAL);
+ registerConverter(new ConcurrentHashMapConverter(getMapper(), getReflectionProvider()), XStream.PRIORITY_NORMAL);
+ registerConverter(new CopyOnWriteMap.Tree.ConverterImpl(getMapper()), XStream.PRIORITY_NORMAL); // needs to override MapConverter
+ registerConverter(new DescribableList.ConverterImpl(getMapper()), XStream.PRIORITY_NORMAL); // explicitly added to handle subtypes
+ registerConverter(new Label.ConverterImpl(), XStream.PRIORITY_NORMAL);
// this should come after all the XStream's default simpler converters,
// but before reflection-based one kicks in.
- registerConverter(new AssociatedConverterImpl(this), -10);
+ registerConverter(new AssociatedConverterImpl(this), XStream.PRIORITY_LOW);
+ reflectionConverter = new RobustReflectionConverter(getMapper(), new JVM().bestReflectionProvider());
+ registerConverter(reflectionConverter, XStream.PRIORITY_VERY_LOW);
}
-
+
@Override
protected MapperWrapper wrapMapper(MapperWrapper next) {
- Mapper m = new CompatibilityMapper(new MapperWrapper(next) {
+ MapperWrapper m = new CompatibilityMapper(new MapperWrapper(next) {
@Override
public String serializedClass(Class type) {
if (type != null && ImmutableMap.class.isAssignableFrom(type)) {
@@ -118,11 +112,11 @@ public class XStream2 extends XStream {
}
}
});
- AnnotationMapper a = new AnnotationMapper(m, getConverterRegistry(), getClassLoader(), getReflectionProvider(), getJvm());
- a.autodetectAnnotations(true);
- return a;
+ // XStream already sets it in 1.4.8
+// AnnotationMapper a = new AnnotationMapper(m, getConverterRegistry(), getClassLoader(), getReflectionProvider(), getJvm());
+// a.autodetectAnnotations(true);
+ return m;
}
-
/**
* Prior to Hudson 1.106, XStream 1.1.x was used which encoded "$" in class
* names as "-" instead of "_-" that is used now. Up through Hudson 1.348
@@ -156,7 +150,6 @@ public class XStream2 extends XStream {
}
}
}
-
/**
* If a class defines a nested {@code ConverterImpl} subclass, use that as a
* {@link Converter}. Its constructor may have XStream/XStream2 and/or
@@ -165,8 +158,8 @@ public class XStream2 extends XStream {
private static final class AssociatedConverterImpl implements Converter {
private final XStream xstream;
- private final ConcurrentHashMap<Class, Converter> cache =
- new ConcurrentHashMap<Class, Converter>();
+ private final ConcurrentHashMap<Class, Converter> cache
+ = new ConcurrentHashMap<Class, Converter>();
private AssociatedConverterImpl(XStream xstream) {
this.xstream = xstream;
diff --git a/hudson-core/src/main/java/hudson/util/XStreamSerializable.java b/hudson-core/src/main/java/hudson/util/XStreamSerializable.java
new file mode 100644
index 00000000..b2b4e877
--- /dev/null
+++ b/hudson-core/src/main/java/hudson/util/XStreamSerializable.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2015 Hudson.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Hudson - initial API and implementation and/or initial documentation
+ */
+package hudson.util;
+
+import static java.lang.annotation.ElementType.FIELD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+@Retention(RUNTIME)
+@Target(FIELD)
+public @interface XStreamSerializable {
+}
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/HudsonServletContextListener.java b/hudson-core/src/main/java/org/eclipse/hudson/HudsonServletContextListener.java
index 38e9271f..90a16d29 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/HudsonServletContextListener.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/HudsonServletContextListener.java
@@ -20,13 +20,15 @@ import com.thoughtworks.xstream.core.JVM;
import hudson.EnvVars;
import hudson.model.Hudson;
import hudson.util.*;
-import org.eclipse.hudson.WebAppController.DefaultInstallStrategy;
-import org.jvnet.localizer.LocaleProvider;
-import org.kohsuke.stapler.Stapler;
-import org.kohsuke.stapler.StaplerRequest;
-import org.kohsuke.stapler.jelly.JellyFacet;
-import org.apache.tools.ant.types.FileSet;
-
+import java.io.File;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.Security;
+import java.util.Locale;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -36,17 +38,17 @@ import javax.servlet.ServletContextListener;
import javax.servlet.ServletResponse;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Locale;
-import java.security.Security;
+import org.apache.tools.ant.types.FileSet;
+import org.eclipse.hudson.WebAppController.DefaultInstallStrategy;
import org.eclipse.hudson.graph.ChartUtil;
import org.eclipse.hudson.init.InitialSetup;
import org.eclipse.hudson.init.InitialSetupLogin;
import org.eclipse.hudson.security.HudsonSecurityEntitiesHolder;
import org.eclipse.hudson.security.HudsonSecurityManager;
+import org.jvnet.localizer.LocaleProvider;
+import org.kohsuke.stapler.Stapler;
+import org.kohsuke.stapler.StaplerRequest;
+import org.kohsuke.stapler.jelly.JellyFacet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -301,8 +303,59 @@ public final class HudsonServletContextListener implements ServletContextListene
instance.cleanUp();
}
+ cleanThreadLocals();
+
// Logger is in the system classloader, so if we don't do this
// the whole web app will never be undepoyed.
java.util.logging.Logger.getLogger("hudson").removeHandler(handler);
}
+
+ private void cleanThreadLocals() {
+ String threadName = Thread.currentThread().getName();
+ try {
+ logger.info("Cleaning ThreadLocals in thread "+threadName);
+ // Get a reference to the thread locals table of the current thread
+ Thread thread = Thread.currentThread();
+ Field threadLocalsField = Thread.class.getDeclaredField("threadLocals");
+ threadLocalsField.setAccessible(true);
+ Object threadLocalTable = threadLocalsField.get(thread);
+
+ // Get a reference to the array holding the thread local variables inside the
+ // ThreadLocalMap of the current thread
+ Class threadLocalMapClass = Class.forName("java.lang.ThreadLocal$ThreadLocalMap");
+ Field tableField = threadLocalMapClass.getDeclaredField("table");
+ tableField.setAccessible(true);
+ Object table = tableField.get(threadLocalTable);
+
+ if (table == null) {
+ logger.info("No ThreadLocalMap in thread "+threadName);
+ return;
+ }
+
+ // The key to the ThreadLocalMap is a WeakReference object. The referent field of this object
+ // is a reference to the actual ThreadLocal variable
+ Field referentField = Reference.class.getDeclaredField("referent");
+ referentField.setAccessible(true);
+
+ int numRemoved = 0;
+ for (int i=0; i < Array.getLength(table); i++) {
+ // Each entry in the table array of ThreadLocalMap is an Entry object
+ // representing the thread local reference and its value
+ Object entry = Array.get(table, i);
+ if (entry != null) {
+ // Get a reference to the thread local object and remove it from the table
+ ThreadLocal threadLocal = (ThreadLocal)referentField.get(entry);
+ if (threadLocal != null) {
+ threadLocal.remove();
+ numRemoved++;
+ }
+ }
+ }
+ logger.info("Removed "+numRemoved+" ThreadLocals from thread "+threadName);
+ } catch(Exception e) {
+ // We will tolerate an exception here and just log it
+ logger.warn("Exception cleaning ThreadLocals in thread "+threadName);
+ throw new IllegalStateException(e);
+ }
+ }
}
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java b/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java
index 1395f685..47ff434c 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/init/InitialSetup.java
@@ -26,16 +26,26 @@ import hudson.util.HudsonIsLoading;
import hudson.util.VersionNumber;
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.io.PrintWriter;
import java.lang.reflect.Constructor;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.*;
-import java.util.concurrent.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ThreadFactory;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
import org.eclipse.hudson.WebAppController;
import org.eclipse.hudson.plugins.InstalledPluginManager;
import org.eclipse.hudson.plugins.InstalledPluginManager.InstalledPluginInfo;
@@ -44,7 +54,11 @@ import org.eclipse.hudson.plugins.UpdateSiteManager;
import org.eclipse.hudson.plugins.UpdateSiteManager.AvailablePluginInfo;
import org.eclipse.hudson.security.HudsonSecurityEntitiesHolder;
import org.eclipse.hudson.security.HudsonSecurityManager;
-import org.kohsuke.stapler.*;
+import org.kohsuke.stapler.HttpResponse;
+import org.kohsuke.stapler.HttpResponses;
+import org.kohsuke.stapler.QueryParameter;
+import org.kohsuke.stapler.StaplerRequest;
+import org.kohsuke.stapler.StaplerResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -79,7 +93,7 @@ final public class InitialSetup {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
- t.setName("Update center installer thread");
+ t.setName("Initial setup installer thread");
return t;
}
}));
@@ -115,15 +129,11 @@ final public class InitialSetup {
public boolean needsInitSetup() throws IOException {
if (initSetupFile.exists()) {
String str = FileUtils.readFileToString(initSetupFile.getFile());
- if (str.trim().contains("Hudson 3.0")) {
- return true;
- } else {
- return false;
- }
+ return !str.trim().contains("Hudson 3.3");
} else {
if (Boolean.getBoolean("skipInitSetup")) {
try {
- initSetupFile.write("Hudson 3.2 Initial Setup Done");
+ initSetupFile.write("Hudson 3.3 Initial Setup Done");
} catch (IOException ex) {
logger.error(ex.getLocalizedMessage());
}
@@ -293,10 +303,13 @@ final public class InitialSetup {
public HttpResponse doFinish() {
try {
- initSetupFile.write("Hudson 3.2 Initial Setup Done");
+ initSetupFile.write("Hudson 3.3 Initial Setup Done");
} catch (IOException ex) {
logger.error(ex.getLocalizedMessage());
}
+
+ installerService.shutdownNow();
+
invokeHudson();
return HttpResponses.ok();
@@ -524,7 +537,14 @@ final public class InitialSetup {
File localCacheFile = new File(hudsonHomeDir, "updates/default.json");
if (!localCacheFile.exists() || (localCacheFile.lastModified() < lastModified)) {
- String jsonStr = org.apache.commons.io.IOUtils.toString(updateCenterJsonUrl.openStream());
+ InputStream urlStream = null;
+ String jsonStr = null;
+ try {
+ urlStream = updateCenterJsonUrl.openStream();
+ jsonStr = org.apache.commons.io.IOUtils.toString(urlStream);
+ } finally {
+ IOUtils.closeQuietly(urlStream);
+ }
jsonStr = jsonStr.trim();
if (jsonStr.startsWith("updateCenter.post(")) {
jsonStr = jsonStr.substring("updateCenter.post(".length());
diff --git a/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java b/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java
index 33c3c4be..76a27496 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/plugins/PluginCenter.java
@@ -66,7 +66,7 @@ final public class PluginCenter {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
- t.setName("Update center installer thread");
+ t.setName("Plugin center installer thread");
return t;
}
}));
@@ -469,6 +469,13 @@ final public class PluginCenter {
return installerService.submit(newJob, newJob);
}
+ public void shutdown() {
+ List<Runnable> running = installerService.shutdownNow();
+ if (!running.isEmpty()) {
+ logger.warn("shutdown with "+running.size()+" jobs pending");
+ }
+ }
+
private boolean isNewerThan(String availableVersion, String installedVersion) {
try {
return new VersionNumber(installedVersion).compareTo(new VersionNumber(availableVersion)) < 0;
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/main/java/org/eclipse/hudson/security/team/TeamMember.java b/hudson-core/src/main/java/org/eclipse/hudson/security/team/TeamMember.java
index 523c9519..4abc9a63 100644
--- a/hudson-core/src/main/java/org/eclipse/hudson/security/team/TeamMember.java
+++ b/hudson-core/src/main/java/org/eclipse/hudson/security/team/TeamMember.java
@@ -19,6 +19,7 @@ import hudson.model.Computer;
import hudson.model.Item;
import hudson.model.Run;
import hudson.model.View;
+import hudson.scm.SCM;
import hudson.security.Permission;
import java.io.StringWriter;
import java.util.ArrayList;
@@ -179,6 +180,7 @@ public class TeamMember {
if ("create".equals(permission)) {
grantedPermissions.add(Item.CREATE);
grantedPermissions.add(Item.EXTENDED_READ);
+ grantedPermissions.add(SCM.TAG);
}
if ("delete".equals(permission)) {
grantedPermissions.add(Item.DELETE);
@@ -186,6 +188,7 @@ public class TeamMember {
}
if ("configure".equals(permission)) {
grantedPermissions.add(Item.CONFIGURE);
+ grantedPermissions.add(SCM.TAG);
}
if ("build".equals(permission)) {
grantedPermissions.add(Item.BUILD);
@@ -234,6 +237,9 @@ public class TeamMember {
teamAdminGrantedPermissions.add(Computer.CREATE);
teamAdminGrantedPermissions.add(Computer.DELETE);
teamAdminGrantedPermissions.add(Computer.CONFIGURE);
+
+ teamAdminGrantedPermissions.add(SCM.TAG);
+
}
List<String> getPermissions() {
diff --git a/hudson-core/src/main/resources/hudson/model/Hudson/configure_ja.properties b/hudson-core/src/main/resources/hudson/model/Hudson/configure_ja.properties
index 2008c798..6830d529 100644
--- a/hudson-core/src/main/resources/hudson/model/Hudson/configure_ja.properties
+++ b/hudson-core/src/main/resources/hudson/model/Hudson/configure_ja.properties
@@ -14,8 +14,11 @@
#
#**************************************************************************
+System\ Configurations=\u30b7\u30b9\u30c6\u30e0\u69cb\u6210
Home\ directory=\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea
+Instance\ Tag=\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 \u30bf\u30b0
System\ Message=\u30b7\u30b9\u30c6\u30e0\u30e1\u30c3\u30bb\u30fc\u30b8
+Privacy\ Message=\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc \u30e1\u30c3\u30bb\u30fc\u30b8
\#\ of\ executors=\u540c\u6642\u30d3\u30eb\u30c9\u6570
Quiet\ period=\u5f85\u6a5f\u6642\u9593
SCM\ checkout\ retry\ count=SCM\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8 \u30ea\u30c8\u30e9\u30a4\u6570
diff --git a/hudson-core/src/main/resources/hudson/model/Hudson/manage.jelly b/hudson-core/src/main/resources/hudson/model/Hudson/manage.jelly
index 8f2f5d31..c84dea22 100644
--- a/hudson-core/src/main/resources/hudson/model/Hudson/manage.jelly
+++ b/hudson-core/src/main/resources/hudson/model/Hudson/manage.jelly
@@ -88,7 +88,9 @@
</j:if>
</local:feature>
+ <!--
<local:feature icon="plugin.png" href="pluginManager/" title="${%Manage Plugins using Classic Plugin Manager}"/>
+ -->
<local:feature icon="computer.png" href="systemInfo" title="${%System Information}">
${%Displays various environmental information to assist trouble-shooting.}
diff --git a/hudson-core/src/main/resources/hudson/model/Hudson/manage_ja.properties b/hudson-core/src/main/resources/hudson/model/Hudson/manage_ja.properties
index 9960bdb7..116b8a90 100644
--- a/hudson-core/src/main/resources/hudson/model/Hudson/manage_ja.properties
+++ b/hudson-core/src/main/resources/hudson/model/Hudson/manage_ja.properties
@@ -14,36 +14,38 @@
#
#**************************************************************************
-Manage\ Hudson=Hudson\u306E\u7BA1\u7406
-Configure\ System=\u30B7\u30B9\u30C6\u30E0\u306E\u8A2D\u5B9A
+Manage\ Hudson=Hudson\u306e\u7ba1\u7406
+Configure\ Security=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u306e\u69cb\u6210
+Configure\ Authentication\ and\ Authorization\ Strategy\ for\ Hudson\ Security.=Hudson \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u306e\u8a8d\u8a3c\u304a\u3088\u3073\u627f\u8a8d\u6226\u7565\u3092\u69cb\u6210\u3057\u307e\u3059\u3002
+Configure\ System=\u30b7\u30b9\u30c6\u30e0\u306e\u8a2d\u5b9a
Configure\ global\ settings\ and\ paths.=\
- \u30B7\u30B9\u30C6\u30E0\u5168\u4F53\u306E\u632F\u308B\u821E\u3044\u3084\u30D1\u30B9\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
-Reload\ Configuration\ from\ Disk=\u8A2D\u5B9A\u306E\u518D\u8AAD\u307F\u8FBC\u307F
+ \u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u632f\u308b\u821e\u3044\u3084\u30d1\u30b9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002
+Reload\ Configuration\ from\ Disk=\u8a2d\u5b9a\u306e\u518d\u8aad\u307f\u8fbc\u307f
Discard\ all\ the\ loaded\ data\ in\ memory\ and\ reload\ everything\ from\ file\ system.=\
- \u30E1\u30E2\u30EA\u5185\u306B\u30ED\u30FC\u30C9\u3055\u308C\u305F\u5168\u3066\u306E\u30C7\u30FC\u30BF\u3092\u7834\u68C4\u3057\u3001\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0\u304B\u3089\u518D\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002
+ \u30e1\u30e2\u30ea\u5185\u306b\u30ed\u30fc\u30c9\u3055\u308c\u305f\u5168\u3066\u306e\u30c7\u30fc\u30bf\u3092\u7834\u68c4\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u518d\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002
Useful\ when\ you\ modified\ config\ files\ directly\ on\ disk.=\
- \u76F4\u63A5\u30C7\u30A3\u30B9\u30AF\u4E0A\u306E\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u5909\u66F4\u3057\u305F\u3068\u304D\u306B\u5F79\u306B\u7ACB\u3061\u307E\u3059\u3002
-Manage\ Plugins=\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u7BA1\u7406
+ \u76f4\u63a5\u30c7\u30a3\u30b9\u30af\u4e0a\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u305f\u3068\u304d\u306b\u5f79\u306b\u7acb\u3061\u307e\u3059\u3002
+Manage\ Plugins=\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u7ba1\u7406
Add,\ remove,\ disable\ or\ enable\ plugins\ that\ can\ extend\ the\ functionality\ of\ Hudson.=\
- Hudson\u306E\u6A5F\u80FD\u3092\u62E1\u5F35\u53EF\u80FD\u306A\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u8FFD\u52A0\u3001\u524A\u9664\u3001\u7121\u52B9\u5316\u304A\u3088\u3073\u6709\u52B9\u5316\u3092\u884C\u3044\u307E\u3059\u3002
-updates\ available=\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u6709
-System\ Information=\u30B7\u30B9\u30C6\u30E0\u60C5\u5831
+ Hudson\u306e\u6a5f\u80fd\u3092\u62e1\u5f35\u53ef\u80fd\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8ffd\u52a0\u3001\u524a\u9664\u3001\u7121\u52b9\u5316\u304a\u3088\u3073\u6709\u52b9\u5316\u3092\u884c\u3044\u307e\u3059\u3002
+updates\ available=\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6709
+System\ Information=\u30b7\u30b9\u30c6\u30e0\u60c5\u5831
Displays\ various\ environmental\ information\ to\ assist\ trouble-shooting.=\
- \u30C8\u30E9\u30D6\u30EB\u30B7\u30E5\u30FC\u30C6\u30A3\u30F3\u30B0\u3092\u52A9\u3051\u308B\u305F\u3081\u306E\u69D8\u3005\u306A\u74B0\u5883\u5909\u6570\u306E\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\u3002
-System\ Log=\u30B7\u30B9\u30C6\u30E0\u30ED\u30B0
+ \u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u52a9\u3051\u308b\u305f\u3081\u306e\u69d8\u3005\u306a\u74b0\u5883\u5909\u6570\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\u3002
+System\ Log=\u30b7\u30b9\u30c6\u30e0\u30ed\u30b0
SystemLogText=\
- \u30B7\u30B9\u30C6\u30E0\u30ED\u30B0\u306FHudson\u95A2\u9023\u306E<tt>java.util.logging</tt>\u304B\u3089\u306E\u51FA\u529B\u3092\u30AD\u30E3\u30D7\u30C1\u30E3\u30FC\u3057\u307E\u3059\u3002
-Load\ Statistics=\u8CA0\u8377\u7D71\u8A08
-LoadStatisticsText=\u30EA\u30BD\u30FC\u30B9\u306E\u5229\u7528\u72B6\u6CC1\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u3066\u3001\u3082\u3063\u3068\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u30FC\u3092\u8FFD\u52A0\u3057\u3066\u30D3\u30EB\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u628A\u63E1\u3057\u307E\u3059\u3002
-Script\ Console=\u30B9\u30AF\u30EA\u30D7\u30C8\u30B3\u30F3\u30BD\u30FC\u30EB
+ \u30b7\u30b9\u30c6\u30e0\u30ed\u30b0\u306fHudson\u95a2\u9023\u306e<tt>java.util.logging</tt>\u304b\u3089\u306e\u51fa\u529b\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u30fc\u3057\u307e\u3059\u3002
+Load\ Statistics=\u8ca0\u8377\u7d71\u8a08
+LoadStatisticsText=\u30ea\u30bd\u30fc\u30b9\u306e\u5229\u7528\u72b6\u6cc1\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3001\u3082\u3063\u3068\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u3066\u30d3\u30eb\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u628a\u63e1\u3057\u307e\u3059\u3002
+Script\ Console=\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb
Executes\ arbitrary\ script\ for\ administration/trouble-shooting/diagnostics.=\
- \u7BA1\u7406/\u30C8\u30E9\u30D6\u30EB\u30B7\u30E5\u30FC\u30C6\u30A3\u30F3\u30B0/\u8A3A\u65AD\u306E\u305F\u3081\u306B\u4EFB\u610F\u306E\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002
-Manage\ Nodes=\u30CE\u30FC\u30C9\u306E\u7BA1\u7406
+ \u7ba1\u7406/\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0/\u8a3a\u65ad\u306e\u305f\u3081\u306b\u4efb\u610f\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002
+Manage\ Nodes=\u30ce\u30fc\u30c9\u306e\u7ba1\u7406
Add,\ remove,\ control\ and\ monitor\ the\ various\ nodes\ that\ Hudson\ runs\ jobs\ on.=\
- Hudson\u304C\u30B8\u30E7\u30D6\u3092\u5B9F\u884C\u3059\u308B\u69D8\u3005\u306A\u30CE\u30FC\u30C9\u306E\u8FFD\u52A0\u3001\u524A\u9664\u3001\u5236\u5FA1\u304A\u3088\u3073\u76E3\u8996\u3092\u884C\u3044\u307E\u3059\u3002
-Cancel\ Shutdown=\u30B7\u30E3\u30C3\u30C8\u30C0\u30A6\u30F3\u306E\u30AD\u30E3\u30F3\u30BB\u30EB
-Prepare\ for\ Shutdown=\u30B7\u30E3\u30C3\u30C8\u30C0\u30A6\u30F3\u306E\u6E96\u5099
+ Hudson\u304c\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3059\u308b\u69d8\u3005\u306a\u30ce\u30fc\u30c9\u306e\u8ffd\u52a0\u3001\u524a\u9664\u3001\u5236\u5fa1\u304a\u3088\u3073\u76e3\u8996\u3092\u884c\u3044\u307e\u3059\u3002
+Cancel\ Shutdown=\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u306e\u30ad\u30e3\u30f3\u30bb\u30eb
+Prepare\ for\ Shutdown=\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u306e\u6e96\u5099
Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut\ down\ safely.=\
- \u5B89\u5168\u306B\u30B7\u30B9\u30C6\u30E0\u3092\u6B62\u3081\u308B\u305F\u3081\u306B\u3001\u65B0\u3057\u3044\u30D3\u30EB\u30C9\u306E\u5B9F\u884C\u3092\u4E2D\u65AD\u3057\u307E\u3059\u3002
-HudsonCliText=\u30B7\u30A7\u30EB\u3084\u30B9\u30AF\u30EA\u30D7\u30C8\u304B\u3089Hudson\u306B\u30A2\u30AF\u30BB\u30B9/\u7BA1\u7406\u3057\u307E\u3059\u3002
+ \u5b89\u5168\u306b\u30b7\u30b9\u30c6\u30e0\u3092\u6b62\u3081\u308b\u305f\u3081\u306b\u3001\u65b0\u3057\u3044\u30d3\u30eb\u30c9\u306e\u5b9f\u884c\u3092\u4e2d\u65ad\u3057\u307e\u3059\u3002
+HudsonCliText=\u30b7\u30a7\u30eb\u3084\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089Hudson\u306b\u30a2\u30af\u30bb\u30b9/\u7ba1\u7406\u3057\u307e\u3059\u3002
Hudson\ CLI=Hudson CLI
diff --git a/hudson-core/src/main/resources/hudson/model/View/index_ja.properties b/hudson-core/src/main/resources/hudson/model/View/index_ja.properties
index 639ce1b3..8737bccc 100644
--- a/hudson-core/src/main/resources/hudson/model/View/index_ja.properties
+++ b/hudson-core/src/main/resources/hudson/model/View/index_ja.properties
@@ -14,4 +14,5 @@
#
#**************************************************************************
+Jobs\ Status=\u30b8\u30e7\u30d6\u72b6\u614b
Dashboard=\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9
diff --git a/hudson-core/src/main/resources/hudson/tasks/Ant/config.jelly b/hudson-core/src/main/resources/hudson/tasks/Ant/config.jelly
index c1bcda46..4657223d 100644
--- a/hudson-core/src/main/resources/hudson/tasks/Ant/config.jelly
+++ b/hudson-core/src/main/resources/hudson/tasks/Ant/config.jelly
@@ -17,28 +17,35 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
- <j:if test="${!empty(descriptor.installations)}">
- <f:entry title="${%Ant Version}">
- <select class="setting-input" name="ant.antName">
- <option value="(Default)">(${%Default})</option>
- <j:forEach var="inst" items="${descriptor.installations}">
- <f:option selected="${inst.name==instance.ant.name}" value="${inst.name}">${inst.name}</f:option>
- </j:forEach>
- </select>
+ <f:entry title="" help="/help/disable-builder.html">
+ <f:checkbox name="disabled" checked="${instance.disabled}"
+ title="${%Temporarily disable this builder}"/>
</f:entry>
- </j:if>
- <f:entry title="${%Targets}" help="/help/ant/ant-targets.html">
- <f:expandableTextbox name="ant.targets" value="${instance.targets}" />
- </f:entry>
- <f:advanced>
- <f:entry title="${%Build File}" help="/help/ant/ant-buildfile.html">
- <f:textbox name="ant.buildFile" value="${instance.buildFile}"/>
+ <f:entry title="${%Description}" >
+ <f:textarea name="description" value="${instance.description}" class="fixed-width" />
</f:entry>
- <f:entry title="${%Properties}" help="/help/ant/ant-properties.html">
- <f:textarea name="ant.properties" value="${instance.properties}"/>
+ <j:if test="${!empty(descriptor.installations)}">
+ <f:entry title="${%Ant Version}">
+ <select class="setting-input" name="ant.antName">
+ <option value="(Default)">(${%Default})</option>
+ <j:forEach var="inst" items="${descriptor.installations}">
+ <f:option selected="${inst.name==instance.ant.name}" value="${inst.name}">${inst.name}</f:option>
+ </j:forEach>
+ </select>
+ </f:entry>
+ </j:if>
+ <f:entry title="${%Targets}" help="/help/ant/ant-targets.html">
+ <f:expandableTextbox name="ant.targets" value="${instance.targets}" />
</f:entry>
- <f:entry title="${%Java Options}" help="/help/ant/ant-opts.html">
- <f:expandableTextbox name="ant.antOpts" value="${instance.antOpts}"/>
- </f:entry>
- </f:advanced>
+ <f:advanced>
+ <f:entry title="${%Build File}" help="/help/ant/ant-buildfile.html">
+ <f:textbox name="ant.buildFile" value="${instance.buildFile}"/>
+ </f:entry>
+ <f:entry title="${%Properties}" help="/help/ant/ant-properties.html">
+ <f:textarea name="ant.properties" value="${instance.properties}"/>
+ </f:entry>
+ <f:entry title="${%Java Options}" help="/help/ant/ant-opts.html">
+ <f:expandableTextbox name="ant.antOpts" value="${instance.antOpts}"/>
+ </f:entry>
+ </f:advanced>
</j:jelly>
diff --git a/hudson-core/src/main/resources/hudson/tasks/BatchFile/config.jelly b/hudson-core/src/main/resources/hudson/tasks/BatchFile/config.jelly
index cd454767..baaa310b 100644
--- a/hudson-core/src/main/resources/hudson/tasks/BatchFile/config.jelly
+++ b/hudson-core/src/main/resources/hudson/tasks/BatchFile/config.jelly
@@ -17,8 +17,15 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
- <f:entry title="${%Command}"
- description="${%description(rootURL)}">
- <f:textarea name="command" value="${instance.command}" class="fixed-width" />
- </f:entry>
+ <f:entry title="" help="/help/disable-builder.html">
+ <f:checkbox name="disabled" checked="${instance.disabled}"
+ title="${%Temporarily disable this builder}"/>
+ </f:entry>
+ <f:entry title="${%Description}">
+ <f:textarea name="description" value="${instance.description}" class="fixed-width" />
+ </f:entry>
+ <f:entry title="${%Command}"
+ description="${%description(rootURL)}">
+ <f:textarea name="command" value="${instance.command}" class="fixed-width" />
+ </f:entry>
</j:jelly>
diff --git a/hudson-core/src/main/resources/hudson/tasks/Maven/config.jelly b/hudson-core/src/main/resources/hudson/tasks/Maven/config.jelly
index ac46aee8..de3a4c92 100644
--- a/hudson-core/src/main/resources/hudson/tasks/Maven/config.jelly
+++ b/hudson-core/src/main/resources/hudson/tasks/Maven/config.jelly
@@ -17,7 +17,14 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
- <j:if test="${!empty(descriptor.installations)}">
+ <f:entry title="" help="/help/disable-builder.html">
+ <f:checkbox name="disabled" checked="${instance.disabled}"
+ title="${%Temporarily disable this builder}"/>
+ </f:entry>
+ <f:entry title="${%Description}">
+ <f:textarea name="description" value="${instance.description}" class="fixed-width" />
+ </f:entry>
+ <j:if test="${!empty(descriptor.installations)}">
<f:entry title="${%Maven Version}">
<select class="setting-input" name="maven.name">
<option value="(Default)">(${%Default})</option>
diff --git a/hudson-core/src/main/resources/hudson/tasks/Shell/config.jelly b/hudson-core/src/main/resources/hudson/tasks/Shell/config.jelly
index 9670ca01..f0f21fb8 100644
--- a/hudson-core/src/main/resources/hudson/tasks/Shell/config.jelly
+++ b/hudson-core/src/main/resources/hudson/tasks/Shell/config.jelly
@@ -17,7 +17,14 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
- <f:entry title="${%Command}" description="${%description(rootURL)}">
- <f:textarea name="command" value="${instance.command}" class="fixed-width" />
- </f:entry>
+ <f:entry title="" help="/help/disable-builder.html">
+ <f:checkbox name="disabled" checked="${instance.disabled}"
+ title="${%Temporarily disable this builder}"/>
+ </f:entry>
+ <f:entry title="${%Description}">
+ <f:textarea name="description" value="${instance.description}" class="fixed-width" />
+ </f:entry>
+ <f:entry title="${%Command}" description="${%description(rootURL)}">
+ <f:textarea name="command" value="${instance.command}" class="fixed-width" />
+ </f:entry>
</j:jelly>
diff --git a/hudson-core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly b/hudson-core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly
index 5637185f..9ddf2ff2 100644
--- a/hudson-core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly
+++ b/hudson-core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly
@@ -7,11 +7,11 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
-# Contributors:
+# Contributors:
#
# Kohsuke Kawaguchi, Winston Prakash
-#
-#************************************************************************** -->
+#
+#************************************************************************** -->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
@@ -30,6 +30,13 @@
</j:parse>
<div id="buildHistoryDiv">
<script>
+ function replace(a, b) {
+ var p = a.parentNode;
+ var next = a.nextSibling;
+ p.removeChild(a);
+ p.insertBefore(b,next);
+ }
+
function loadAllBuildHistory() {
// first display the "loading..." icon
var box = $("loadAllBuildHistory");
@@ -40,15 +47,19 @@
method: "get",
onComplete: function(rsp,_) {
<!-- neither outerHTML nor responseXML works in Firefox 2.0 -->
+ // Save headers from buildHistory
var hist = $$("buildHistory");
- var p = hist.parentNode;
- var next = hist.nextSibling;
- p.removeChild(hist);
+ var histheaders = hist.headers;
- var div = document.createElement('div');
- div.innerHTML = rsp.responseText;
+ // Swap the divs
+ var olddiv = $$("buildHistoryDiv");
+ var newdiv = document.createElement('div');
+ newdiv.innerHTML = rsp.responseText;
+ replace(olddiv, newdiv);
- p.insertBefore(div,next);
+ // Add headers to new buildHistory
+ hist = $$("buildHistory");
+ hist.headers = histheaders;
}
});
}
@@ -87,8 +98,8 @@
</td>
</tr>
</l:pane>
+ <script defer="true">
+ updateBuildHistory("${it.baseUrl}/buildHistory/ajax",${it.nextBuildNumberToFetch});
+ </script>
</div>
- <script defer="true">
- updateBuildHistory("${it.baseUrl}/buildHistory/ajax",${it.nextBuildNumberToFetch});
- </script>
</j:jelly>
diff --git a/hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/index_ja.properties b/hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/index_ja.properties
new file mode 100644
index 00000000..973bc4c6
--- /dev/null
+++ b/hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/index_ja.properties
@@ -0,0 +1,16 @@
+# Copyright (c) 2015 Hudson.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Hudson - initial API and implementation and/or initial documentation
+
+Update=\u66f4\u65b0
+Search=\u691c\u7d22
+Install=\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb
+Test\ and\ Setup=\u30c6\u30b9\u30c8\u3057\u3066\u8a2d\u5b9a
+Upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
+Configure=\u69cb\u6210
+Refresh=\u6700\u65b0\u306e\u60c5\u5831\u306b\u66f4\u65b0
diff --git a/hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/sidepanel_ja.properties b/hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/sidepanel_ja.properties
new file mode 100644
index 00000000..42b3a3b6
--- /dev/null
+++ b/hudson-core/src/main/resources/org/eclipse/hudson/plugins/PluginCenter/sidepanel_ja.properties
@@ -0,0 +1,18 @@
+# Copyright (c) 2015 Hudson.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Hudson - initial API and implementation and/or initial documentation
+
+Back\ to\ Main\ Dashboard=\u30e1\u30a4\u30f3 \u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306b\u623b\u308b
+New\ Job=\u65b0\u3057\u3044\u30b8\u30e7\u30d6
+Manage\ Hudson=Hudson \u306e\u7ba1\u7406
+People=\u4eba
+Build\ History=\u30d3\u30eb\u30c9\u5c65\u6b74
+Configure\ View=\u30d3\u30e5\u30fc\u306e\u69cb\u6210
+Delete\ View=\u30d3\u30e5\u30fc\u306e\u524a\u9664
+Job\ Relationship=\u30b8\u30e7\u30d6\u95a2\u4fc2
+Check\ File\ Fingerprint=\u30d5\u30a1\u30a4\u30eb\u6307\u7d0b\u306e\u78ba\u8a8d
diff --git a/hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/index_ja.properties b/hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/index_ja.properties
new file mode 100644
index 00000000..5bddbdf6
--- /dev/null
+++ b/hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/index_ja.properties
@@ -0,0 +1,19 @@
+# Copyright (c) 2015 Hudson.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Hudson - initial API and implementation and/or initial documentation
+
+Configure\ Security=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u306e\u69cb\u6210
+Enable\ security=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u3092\u6709\u52b9\u306b\u3059\u308b
+TCP\ port\ for\ JNLP\ slave\ agents=JNLP \u30b9\u30ec\u30fc\u30d6 \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u7528 TCP \u30dd\u30fc\u30c8
+Fixed=\u56fa\u5b9a
+Random=\u30e9\u30f3\u30c0\u30e0
+Disable=\u7121\u52b9\u306b\u3059\u308b
+Access\ Control=\u30a2\u30af\u30bb\u30b9\u5236\u5fa1
+Security\ Realm=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u9818\u57df
+Authorization=\u627f\u8a8d
+Save=\u4fdd\u5b58
diff --git a/hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/sidepanel_ja.properties b/hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/sidepanel_ja.properties
new file mode 100644
index 00000000..42b3a3b6
--- /dev/null
+++ b/hudson-core/src/main/resources/org/eclipse/hudson/security/HudsonSecurityManager/sidepanel_ja.properties
@@ -0,0 +1,18 @@
+# Copyright (c) 2015 Hudson.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Hudson - initial API and implementation and/or initial documentation
+
+Back\ to\ Main\ Dashboard=\u30e1\u30a4\u30f3 \u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306b\u623b\u308b
+New\ Job=\u65b0\u3057\u3044\u30b8\u30e7\u30d6
+Manage\ Hudson=Hudson \u306e\u7ba1\u7406
+People=\u4eba
+Build\ History=\u30d3\u30eb\u30c9\u5c65\u6b74
+Configure\ View=\u30d3\u30e5\u30fc\u306e\u69cb\u6210
+Delete\ View=\u30d3\u30e5\u30fc\u306e\u524a\u9664
+Job\ Relationship=\u30b8\u30e7\u30d6\u95a2\u4fc2
+Check\ File\ Fingerprint=\u30d5\u30a1\u30a4\u30eb\u6307\u7d0b\u306e\u78ba\u8a8d
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-core/src/test/java/hudson/tasks/AntEqualsHashCodeTest.java b/hudson-core/src/test/java/hudson/tasks/AntEqualsHashCodeTest.java
index 50b7b249..3ab7647d 100644
--- a/hudson-core/src/test/java/hudson/tasks/AntEqualsHashCodeTest.java
+++ b/hudson-core/src/test/java/hudson/tasks/AntEqualsHashCodeTest.java
@@ -15,10 +15,9 @@
*******************************************************************************/
package hudson.tasks;
-import org.junit.Test;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
+import org.junit.Test;
/**
* Verify equals and hashCode methods for Ant object.
diff --git a/hudson-core/src/test/java/hudson/tasks/BatchFileEqualsHashCodeTest.java b/hudson-core/src/test/java/hudson/tasks/BatchFileEqualsHashCodeTest.java
index b21876d2..0a52123f 100644
--- a/hudson-core/src/test/java/hudson/tasks/BatchFileEqualsHashCodeTest.java
+++ b/hudson-core/src/test/java/hudson/tasks/BatchFileEqualsHashCodeTest.java
@@ -16,10 +16,9 @@
package hudson.tasks;
-import org.junit.Test;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
+import org.junit.Test;
/**
* Verify equals and hashCode methods for BatchFile object.
diff --git a/hudson-core/src/test/java/hudson/tasks/MavenEqualsHashCodeTest.java b/hudson-core/src/test/java/hudson/tasks/MavenEqualsHashCodeTest.java
index e1ad3116..5063fb07 100644
--- a/hudson-core/src/test/java/hudson/tasks/MavenEqualsHashCodeTest.java
+++ b/hudson-core/src/test/java/hudson/tasks/MavenEqualsHashCodeTest.java
@@ -15,10 +15,9 @@
*******************************************************************************/
package hudson.tasks;
-import org.junit.Test;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
+import org.junit.Test;
/**
* Verify equals and hashCode methods for Maven object.
@@ -29,24 +28,24 @@ import static junit.framework.Assert.assertFalse;
*/
public class MavenEqualsHashCodeTest {
- private Maven maven = new Maven("targets", "name", "pom", "properties", "jvmOptions", false);
+ private Maven maven = new Maven("targets", "name", "pom", "properties", "jvmOptions", false );
@Test
public void testHashCode() {
assertEquals(maven.hashCode(),
- new Maven("targets", "name", "pom", "properties", "jvmOptions", false).hashCode());
+ new Maven("targets", "name", "pom", "properties", "jvmOptions", false ).hashCode());
assertFalse(
- maven.hashCode() == new Maven("targets", "name", "pom", "properties", "jvmOptions", true).hashCode());
+ maven.hashCode() == new Maven("targets", "name", "pom", "properties", "jvmOptions", true ).hashCode());
assertFalse(
- maven.hashCode() == new Maven("targets", "name", "pom", "properties", "jvmOptions1", false).hashCode());
+ maven.hashCode() == new Maven("targets", "name", "pom", "properties", "jvmOptions1", false ).hashCode());
assertFalse(
- maven.hashCode() == new Maven("targets", "name", "pom", "properties1", "jvmOptions", false).hashCode());
+ maven.hashCode() == new Maven("targets", "name", "pom", "properties1", "jvmOptions", false ).hashCode());
assertFalse(
- maven.hashCode() == new Maven("targets", "name", "pom1", "properties", "jvmOptions", false).hashCode());
+ maven.hashCode() == new Maven("targets", "name", "pom1", "properties", "jvmOptions", false ).hashCode());
assertFalse(
- maven.hashCode() == new Maven("targets", "name1", "pom", "properties", "jvmOptions", false).hashCode());
+ maven.hashCode() == new Maven("targets", "name1", "pom", "properties", "jvmOptions", false ).hashCode());
assertFalse(
- maven.hashCode() == new Maven("targets1", "name", "pom", "properties", "jvmOptions", false).hashCode());
+ maven.hashCode() == new Maven("targets1", "name", "pom", "properties", "jvmOptions", false ).hashCode());
}
@Test
@@ -54,12 +53,12 @@ public class MavenEqualsHashCodeTest {
assertEquals(maven, maven);
assertFalse(maven.equals(null));
assertFalse(maven.equals(new Object()));
- assertEquals(maven, new Maven("targets", "name", "pom", "properties", "jvmOptions", false));
- assertFalse(maven.equals(new Maven("targets", "name", "pom", "properties", "jvmOptions", true)));
- assertFalse(maven.equals(new Maven("targets", "name", "pom", "properties", "jvmOptions1", false)));
- assertFalse(maven.equals(new Maven("targets", "name", "pom1", "properties", "jvmOptions", false)));
- assertFalse(maven.equals(new Maven("targets", "name1", "pom", "properties", "jvmOptions", false)));
- assertFalse(maven.equals(new Maven("targets1", "name", "pom", "properties", "jvmOptions", false)));
- assertFalse(maven.equals(new Maven("targets1", "name1", "pom1", "properties1", "jvmOptions1", true)));
+ assertEquals(maven, new Maven("targets", "name", "pom", "properties", "jvmOptions", false ));
+ assertFalse(maven.equals(new Maven("targets", "name", "pom", "properties", "jvmOptions", true )));
+ assertFalse(maven.equals(new Maven("targets", "name", "pom", "properties", "jvmOptions1", false )));
+ assertFalse(maven.equals(new Maven("targets", "name", "pom1", "properties", "jvmOptions", false )));
+ assertFalse(maven.equals(new Maven("targets", "name1", "pom", "properties", "jvmOptions", false )));
+ assertFalse(maven.equals(new Maven("targets1", "name", "pom", "properties", "jvmOptions", false )));
+ assertFalse(maven.equals(new Maven("targets1", "name1", "pom1", "properties1", "jvmOptions1", true )));
}
}
diff --git a/hudson-core/src/test/java/hudson/tasks/ShellEqualsHashCodeTest.java b/hudson-core/src/test/java/hudson/tasks/ShellEqualsHashCodeTest.java
index d5684e35..6b15b1cb 100644
--- a/hudson-core/src/test/java/hudson/tasks/ShellEqualsHashCodeTest.java
+++ b/hudson-core/src/test/java/hudson/tasks/ShellEqualsHashCodeTest.java
@@ -15,10 +15,9 @@
*******************************************************************************/
package hudson.tasks;
-import org.junit.Test;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
+import org.junit.Test;
/**
* Verify equals and hashCode methods for Shell object.
diff --git a/hudson-core/src/test/java/hudson/util/CopyOnWriteListEqualsHashCodeTest.java b/hudson-core/src/test/java/hudson/util/CopyOnWriteListEqualsHashCodeTest.java
index 2a38566a..4e32d1fa 100644
--- a/hudson-core/src/test/java/hudson/util/CopyOnWriteListEqualsHashCodeTest.java
+++ b/hudson-core/src/test/java/hudson/util/CopyOnWriteListEqualsHashCodeTest.java
@@ -19,11 +19,10 @@ import hudson.tasks.Builder;
import hudson.tasks.Shell;
import java.util.ArrayList;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
+import org.junit.Before;
+import org.junit.Test;
/**
* Verify equals and hashCode methods for CopyOnWriteList object.
diff --git a/hudson-core/src/test/java/hudson/util/PersistedListEqualsHashCodeTest.java b/hudson-core/src/test/java/hudson/util/PersistedListEqualsHashCodeTest.java
index 64b93fa4..0929243b 100644
--- a/hudson-core/src/test/java/hudson/util/PersistedListEqualsHashCodeTest.java
+++ b/hudson-core/src/test/java/hudson/util/PersistedListEqualsHashCodeTest.java
@@ -21,11 +21,10 @@ import hudson.model.Saveable;
import hudson.tasks.Shell;
import java.io.IOException;
import java.util.Arrays;
-import org.junit.Before;
-import org.junit.Test;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
+import org.junit.Before;
+import org.junit.Test;
/**
* Verify equals and hashCode methods for PersistedList object.
diff --git a/hudson-core/src/test/java/hudson/util/XStream2Test.java b/hudson-core/src/test/java/hudson/util/XStream2Test.java
index 2dafcf1f..369a6f88 100644
--- a/hudson-core/src/test/java/hudson/util/XStream2Test.java
+++ b/hudson-core/src/test/java/hudson/util/XStream2Test.java
@@ -17,11 +17,10 @@
package hudson.util;
import com.google.common.collect.ImmutableMap;
-import junit.framework.TestCase;
import hudson.model.Result;
import hudson.model.Run;
-
import java.util.Map;
+import junit.framework.TestCase;
/**
* Tests for XML serialization of java objects.
@@ -44,16 +43,7 @@ public class XStream2Test extends TestCase {
private static class Bar {
String s;
}
-
- /**
- * Test ability to read old XML from Hudson 1.105 or older.
- */
- public void testXStream11Compatibility() {
- Bar b = (Bar)new XStream2().fromXML(
- "<hudson.util.XStream2Test-Bar><s>foo</s></hudson.util.XStream2Test-Bar>");
- assertEquals("foo", b.s);
- }
-
+
public static final class __Foo_Bar$Class {
String under_1 = "1", under__2 = "2",
_leadUnder1 = "L1", __leadUnder2 = "L2",
diff --git a/hudson-core/src/test/java/org/eclipse/hudson/model/project/property/DescribableListProjectPropertyTest.java b/hudson-core/src/test/java/org/eclipse/hudson/model/project/property/DescribableListProjectPropertyTest.java
index 09cc9067..c51eb428 100644
--- a/hudson-core/src/test/java/org/eclipse/hudson/model/project/property/DescribableListProjectPropertyTest.java
+++ b/hudson-core/src/test/java/org/eclipse/hudson/model/project/property/DescribableListProjectPropertyTest.java
@@ -19,14 +19,13 @@ import hudson.model.FreeStyleProjectMock;
import hudson.tasks.Shell;
import hudson.util.DescribableList;
import java.util.Arrays;
-import org.junit.Before;
-import org.junit.Test;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
+import org.junit.Before;
+import org.junit.Test;
/**
* Contains test-cases for {@link DescribableListProjectProperty}.
diff --git a/hudson-inject/pom.xml b/hudson-inject/pom.xml
index 61e79ff5..716ddfd2 100644
--- a/hudson-inject/pom.xml
+++ b/hudson-inject/pom.xml
@@ -19,12 +19,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-inject</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Inject (JSR-330 Strategy)</name>
<description>
@@ -48,7 +48,7 @@
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
+ <groupId>${guava.groupid}</groupId>
<artifactId>guava</artifactId>
<exclusions>
<exclusion>
@@ -98,7 +98,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<configuration>
- <complianceLevel>1.6</complianceLevel>
+ <complianceLevel>1.7</complianceLevel>
<includes>
<include>**/*.java</include>
<include>**/*.aj</include>
diff --git a/hudson-jetty-war-executable/pom.xml b/hudson-jetty-war-executable/pom.xml
index 236d677e..96b3afbe 100755
--- a/hudson-jetty-war-executable/pom.xml
+++ b/hudson-jetty-war-executable/pom.xml
@@ -19,12 +19,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-jetty-war-executable</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hudson :: jetty-war-executable</name>
@@ -32,8 +32,25 @@
<description>
Class needed for Jetty server based executable war
</description>
-
-
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ Though JDK 7 is required to build Hudson 3.x,
+ launcher itself is built with source level 1.5
+ so if run with JDK 5 or 6, the launcher class will
+ load but will exit with warning JDK 7 and above is
+ required to run Hudson
+ -->
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@@ -54,7 +71,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.2</version>
<scope>test</scope>
<type>jar</type>
</dependency>
@@ -62,7 +78,7 @@
<artifactId>jetty-continuation</artifactId>
<groupId>org.eclipse.jetty</groupId>
<type>jar</type>
- <version>8.1.7.v20120910</version>
+ <version>${jetty.server.version}</version>
</dependency>
</dependencies>
diff --git a/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/jetty/JettyLauncher.java b/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/jetty/JettyLauncher.java
index d6438748..f54c8c07 100644
--- a/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/jetty/JettyLauncher.java
+++ b/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/jetty/JettyLauncher.java
@@ -23,10 +23,13 @@ import java.util.List;
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.security.LoginService;
import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.server.ssl.SslSocketConnector;
-import org.eclipse.jetty.http.ssl.SslContextFactory;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.SslConnectionFactory;
+import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.webapp.WebAppContext;
/**
@@ -45,6 +48,7 @@ public class JettyLauncher {
String keyStorePath = null;
String keyStorePassword = null;
+ String keyManagerPassword = null;
String updateServer = null;
@@ -70,6 +74,10 @@ public class JettyLauncher {
keyStorePassword = args[i].substring("--httpsKeyStorePassword=".length());
}
+ if (args[i].startsWith("--httpsKeyManagerPassword=")) {
+ keyManagerPassword = args[i].substring("--httpsKeyManagerPassword=".length());
+ }
+
if (args[i].startsWith("--prefix=")) {
String prefix = args[i].substring("--prefix=".length());
if (prefix.startsWith("/")) {
@@ -85,7 +93,7 @@ public class JettyLauncher {
if (args[i].startsWith("--disableUpdateCenterSwitch")) {
disableUpdateCenterSwitch = true;
}
-
+
if (args[i].startsWith("--skipInitSetup")) {
skipInitSetup = true;
}
@@ -95,32 +103,41 @@ public class JettyLauncher {
List<Connector> connectors = new ArrayList<Connector>();
- // HTTP connector
- if (httpPort != -1) {
- SelectChannelConnector httpConnector = new SelectChannelConnector();
- httpConnector.setPort(httpPort);
- connectors.add(httpConnector);
- }
+ HttpConfiguration http_config = new HttpConfiguration();
+ http_config.setOutputBufferSize(32768);
+
+ ServerConnector httpConnector = new ServerConnector(server,
+ new HttpConnectionFactory(http_config));
+ httpConnector.setPort(httpPort);
+ httpConnector.setIdleTimeout(30000);
+
+ connectors.add(httpConnector);
- // HTTPS (SSL) connector
if (httpsPort != -1) {
- // Switch to using a ContextFactory this helps us to
- // address 447469 - disable SSL3 to prevent Poodle attacks
+
SslContextFactory sslContextFactory = new SslContextFactory();
- sslContextFactory.addExcludeProtocols("SSLv3");
-
- //KeyStore path and password now injected via this new context rather
- //than being added directly to the connection (those APIs are deprecated
- // in any case so this is the better approach
+
if (keyStorePath != null) {
- sslContextFactory.setKeyStore(keyStorePath);
+ sslContextFactory.setKeyStorePath(keyStorePath);
}
if (keyStorePassword != null) {
- sslContextFactory.setKeyManagerPassword(keyStorePassword);
+ sslContextFactory.setKeyStorePassword(keyStorePassword);
+ }
+
+ if (keyManagerPassword != null) {
+ sslContextFactory.setKeyManagerPassword(keyManagerPassword);
}
-
- SslSocketConnector httpsConnector = new SslSocketConnector(sslContextFactory);
+
+ HttpConfiguration https_config = new HttpConfiguration(http_config);
+ https_config.addCustomizer(new SecureRequestCustomizer());
+ https_config.setOutputBufferSize(32768);
+
+ ServerConnector httpsConnector = new ServerConnector(server,
+ new SslConnectionFactory(sslContextFactory, "http/1.1"),
+ new HttpConnectionFactory(https_config));
httpsConnector.setPort(httpsPort);
+ httpsConnector.setIdleTimeout(500000);
+
connectors.add(httpsConnector);
}
@@ -129,8 +146,8 @@ public class JettyLauncher {
WebAppContext context = new WebAppContext();
File tempDir = new File(getHomeDir(), "war");
- if (tempDir.exists()){
- tempDir.delete();
+ if (tempDir.exists()) {
+ deleteFileRecursively(tempDir);
}
tempDir.mkdirs();
context.setTempDirectory(tempDir);
@@ -139,8 +156,8 @@ public class JettyLauncher {
context.setDescriptor(warUrl.toExternalForm() + "/WEB-INF/web.xml");
context.setServer(server);
context.setWar(warUrl.toExternalForm());
-
- LoginService loginService = new HashLoginService("defaultLoginService");
+
+ LoginService loginService = new HashLoginService("defaultLoginService");
context.getSecurityHandler().setLoginService(loginService);
// This is used by Windows Service Installer in Hudson Management
@@ -154,7 +171,7 @@ public class JettyLauncher {
if (disableUpdateCenterSwitch) {
System.setProperty("hudson.pluginManager.disableUpdateCenterSwitch", "true");
}
-
+
if (skipInitSetup) {
System.setProperty("skipInitSetup", "true");
}
@@ -191,4 +208,18 @@ public class JettyLauncher {
// Default hudson home
return new File(new File(System.getProperty("user.home")), ".hudson");
}
+
+ private static boolean deleteFileRecursively(File path) {
+ if (path.isDirectory()) {
+ File[] files = path.listFiles();
+ for (File file : files) {
+ deleteFileRecursively(file);
+ }
+ }
+ boolean deleted = path.delete();
+ if (!deleted) {
+ System.out.println("Failed to delete - " + path);
+ }
+ return deleted;
+ }
}
diff --git a/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/war/Executable.java b/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/war/Executable.java
index 63b9119b..e793ee40 100755
--- a/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/war/Executable.java
+++ b/hudson-jetty-war-executable/src/main/java/org/eclipse/hudson/war/Executable.java
@@ -16,12 +16,20 @@ package org.eclipse.hudson.war;
*
******************************************************************************
*/
-import java.io.*;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.ProtectionDomain;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
@@ -34,37 +42,33 @@ import java.util.jar.Manifest;
public class Executable {
private final String[] jettyJars = {
- "libs/jetty.jar",
+ "libs/jetty-server.jar",
"libs/jetty-web-app.jar",
"libs/jetty-continuation.jar",
- "libs/jetty-util.jar",
"libs/jetty-http.jar",
"libs/jetty-io.jar",
"libs/jetty-security.jar",
"libs/jetty-servlet.jar",
- "libs/jetty-servlet-api.jar",
+ "libs/jetty-util.jar",
"libs/jetty-xml.jar",
+ "libs/javax-servlet-api.jar",
"libs/hudson-jetty-war-executable.jar"
};
private List<String> arguments;
+
+ public static final int MIN_REQUIRED_JAVA_VERSION = 7;
public static void main(String[] args) throws Exception {
- String javaVersion = System.getProperty("java.version");
-
- StringTokenizer tokens = new StringTokenizer(javaVersion, ".-_");
+ String javaVersionStr = System.getProperty("java.version");
+ String[] javaVersionElements = javaVersionStr.split("\\.");
+ int major = Integer.parseInt(javaVersionElements[1]);
- int majorVersion = Integer.parseInt(tokens.nextToken());
- int minorVersion = Integer.parseInt(tokens.nextToken());
-
- // Make sure Java version is 1.6 or later
- if (majorVersion < 2) {
- if (minorVersion < 6) {
- System.err.println("Hudson requires Java 6 or later.");
- System.err.println("Your java version is " + javaVersion);
- System.err.println("Java Home: " + System.getProperty("java.home"));
- System.exit(0);
- }
+ if (major < MIN_REQUIRED_JAVA_VERSION) {
+ System.err.println("Hudson 3.3.x and above requires JDK " + MIN_REQUIRED_JAVA_VERSION + " or later.");
+ System.err.println("Your java version is " + javaVersionStr);
+ System.err.println("Java Home: " + System.getProperty("java.home"));
+ System.exit(0);
}
Executable executable = new Executable();
@@ -99,17 +103,18 @@ public class Executable {
+ "Usage: java -jar hudson.war [--option=value] [--option=value] ... \n"
+ "\n"
+ "Options:\n"
- + " --version Show Hudson version and quit\n"
- + " --logfile=<filename> Send the output log to this file\n"
- + " --prefix=<prefix-string> Add this prefix to all URLs (eg http://localhost:8080/prefix/resource). Default is none\n\n"
- + " --httpPort=<value> HTTP listening port. Default value is 8080\n\n"
- + " --httpsPort=<value> HTTPS listening port. Disabled by default\n"
- + " --httpsKeyStore=<filepath> Location of the SSL KeyStore file.\n"
- + " --httpsKeyStorePassword=<value> Password for the SSL KeyStore file\n\n"
- + " --updateServer=<your server> Specify your own update server (eg http://updates.mycompany.com/).\n"
- + " For details see http://wiki.hudson-ci.org/Alternate+Update+Server\n\n"
- + " --disableUpdateCenterSwitch Disable the ability to specify alternate Update Center URL via Plugin Manager Advanced tab\n\n"
- + " --skipInitSetup Skip the initial setup screen and start Hudson directly";
+ + " --version Show Hudson version and quit\n"
+ + " --logfile=<filename> Send the output log to this file\n"
+ + " --prefix=<prefix-string> Add this prefix to all URLs (eg http://localhost:8080/prefix/resource). Default is none\n\n"
+ + " --httpPort=<value> HTTP listening port. Default value is 8080\n\n"
+ + " --httpsPort=<value> HTTPS listening port. Disabled by default\n"
+ + " --httpsKeyStore=<filepath> Location of the SSL KeyStore file.\n"
+ + " --httpsKeyStorePassword=<value> Password for the SSL KeyStore file\n\n"
+ + " --httpsKeyManagerPassword=<value> Manager Password for the trustStore \n\n"
+ + " --updateServer=<your server> Specify your own update server (eg http://updates.mycompany.com/).\n"
+ + " For details see http://wiki.hudson-ci.org/Alternate+Update+Server\n\n"
+ + " --disableUpdateCenterSwitch Disable the ability to specify alternate Update Center URL via Plugin Manager Advanced tab\n\n"
+ + " --skipInitSetup Skip the initial setup screen and start Hudson directly";
System.out.println(usageStr);
System.exit(0);
diff --git a/hudson-plugin-parent/pom.xml b/hudson-plugin-parent/pom.xml
index 8f769fc5..bfda0ba5 100644
--- a/hudson-plugin-parent/pom.xml
+++ b/hudson-plugin-parent/pom.xml
@@ -19,13 +19,13 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.eclipse.hudson.plugins</groupId>
<artifactId>hudson-plugin-parent</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Plugin Parent POM</name>
<packaging>pom</packaging>
@@ -51,19 +51,19 @@
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-war</artifactId>
<type>war</type>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-core</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-test-framework</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/hudson-plugin-utils/pom.xml b/hudson-plugin-utils/pom.xml
index c46fbb5a..5dfee31a 100644
--- a/hudson-plugin-utils/pom.xml
+++ b/hudson-plugin-utils/pom.xml
@@ -19,12 +19,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-plugin-utils</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Plugin Utilities</name>
<description>
diff --git a/hudson-service/pom.xml b/hudson-service/pom.xml
index 1de3e2ad..a12c99ba 100644
--- a/hudson-service/pom.xml
+++ b/hudson-service/pom.xml
@@ -19,12 +19,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-service</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Service</name>
<dependencies>
diff --git a/hudson-test-framework/pom.xml b/hudson-test-framework/pom.xml
index 6d5d61bd..c1c571de 100644
--- a/hudson-test-framework/pom.xml
+++ b/hudson-test-framework/pom.xml
@@ -18,12 +18,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-test-framework</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Test Framework</name>
<description>
Contains common classes for testing.
@@ -45,7 +45,7 @@
-->
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-war</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<classifier>war-for-test</classifier>
<exclusions>
<exclusion>
@@ -59,6 +59,7 @@
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
+ <version>6.1.26</version>
</dependency>
<dependency>
@@ -152,6 +153,14 @@
</exclusion>
</exclusions>
</dependency>
+
+
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>1.15</version>
+ </dependency>
+
</dependencies>
<build>
diff --git a/hudson-test-framework/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/hudson-test-framework/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
index 541bea33..2fee1f7e 100644
--- a/hudson-test-framework/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
+++ b/hudson-test-framework/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
@@ -50,6 +50,7 @@ import hudson.tasks.Maven.MavenInstallation;
import hudson.util.PersistedList;
import hudson.util.ReflectionUtils;
import hudson.util.StreamTaskListener;
+import hudson.util.PluginServletFilter;
import hudson.model.Node.Mode;
@@ -133,11 +134,17 @@ import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.WebRequestSettings;
import com.gargoylesoftware.htmlunit.xml.XmlPage;
import com.gargoylesoftware.htmlunit.html.*;
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.api.client.config.ClientConfig;
+import com.sun.jersey.api.client.config.DefaultClientConfig;
import hudson.slaves.ComputerListener;
import java.util.concurrent.CountDownLatch;
import hudson.maven.MavenEmbedder;
import hudson.maven.MavenRequest;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.nio.charset.Charset;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
@@ -316,6 +323,7 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
clients.clear();
} finally {
server.stop();
+
for (LenientRunnable r : tearDowns) {
r.run();
}
@@ -328,6 +336,15 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
// Force the container bits to reset
SmoothieUtil.reset();
+ // Clear hudson refrence
+
+ hudson = null;
+ server = null;
+
+ // Clear any filters stored in this singlton
+
+ PluginServletFilter.clearFilters();
+
// Hudson creates ClassLoaders for plugins that hold on to file descriptors of its jar files,
// but because there's no explicit dispose method on ClassLoader, they won't get GC-ed until
// at some later point, leading to possible file descriptor overflow. So encourage GC now.
@@ -1295,7 +1312,27 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
if (shortName == null) {
throw new Error(hpl + " doesn't have the Short-Name attribute");
}
- FileUtils.copyURLToFile(hpl, new File(home, "plugins/" + shortName + ".hpl"));
+ final File targetLocation = new File(home, "plugins/" + shortName + ".hpl");
+ FileUtils.copyURLToFile(hpl, targetLocation);
+
+ // Clear libraries and resource-path to prevent duplicate classes
+ //
+
+ {
+ Manifest copied = null;
+ try (FileInputStream fis = new FileInputStream(targetLocation))
+ {
+ copied = new Manifest(fis);
+ copied.getMainAttributes().putValue("Libraries", "");
+ copied.getMainAttributes().putValue("Resource-Path", "");
+
+ }
+
+ try (FileOutputStream fos = new FileOutputStream(targetLocation))
+ {
+ copied.write(fos);
+ }
+ }
// make dependency plugins available
// TODO: probably better to read POM, but where to read from?
@@ -1435,7 +1472,27 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
private Object writeReplace() {
throw new AssertionError("HudsonTestCase " + getName() + " is not supposed to be serialized");
}
+
+ /**
+ * @return A resource that allows testing of REST services, at the root
+ * of the application
+ */
+ public WebResource createJaxRSClient() {
+
+ Client client = Client.create(customizeJaxRSClient(new DefaultClientConfig()));
+ return client.resource("http://localhost:" + localPort + contextPath + "/");
+ }
+
+ /**
+ * All sub classes to customize the client configuration
+ * @param client
+ */
+ protected ClientConfig customizeJaxRSClient(ClientConfig client) {
+ // To be overridden
+ return client;
+ }
+
/**
* This is to assist Groovy test clients who are incapable of instantiating
* the inner classes properly.
diff --git a/hudson-test-utils/pom.xml b/hudson-test-utils/pom.xml
index dad8242d..66c67382 100644
--- a/hudson-test-utils/pom.xml
+++ b/hudson-test-utils/pom.xml
@@ -18,12 +18,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-test-utils</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Test Utilities</name>
<description>
@@ -43,7 +43,7 @@
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
+ <groupId>${guava.groupid}</groupId>
<artifactId>guava</artifactId>
</dependency>
diff --git a/hudson-utils/pom.xml b/hudson-utils/pom.xml
index a1103204..78cd8371 100644
--- a/hudson-utils/pom.xml
+++ b/hudson-utils/pom.xml
@@ -19,12 +19,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-utils</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<name>Hudson :: Common Utilities</name>
<description>
@@ -48,7 +48,7 @@
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
+ <groupId>${guava.groupid}</groupId>
<artifactId>guava</artifactId>
</dependency>
@@ -59,7 +59,7 @@
</dependency>
<dependency>
- <groupId>org.hudsonci.tools</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
diff --git a/hudson-war/pom.xml b/hudson-war/pom.xml
index a62e0eef..bc57d9e2 100644
--- a/hudson-war/pom.xml
+++ b/hudson-war/pom.xml
@@ -18,12 +18,12 @@
<parent>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version> 3.2.2-SNAPSHOT</version>
+ <version> 3.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hudson-war</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>Hudson :: War</name>
@@ -138,7 +138,7 @@
<version>${jetty.server.version}</version>
<overWrite>true</overWrite>
<outputDirectory>target/generated-resources/libs</outputDirectory>
- <destFileName>jetty.jar</destFileName>
+ <destFileName>jetty-server.jar</destFileName>
</artifactItem>
<dependency>
<groupId>org.eclipse.jetty</groupId>
@@ -205,12 +205,12 @@
<destFileName>jetty-servlet.jar</destFileName>
</artifactItem>
<artifactItem>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>javax.servlet</artifactId>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
<version>${jetty.javax.serverlet.version}</version>
<overWrite>true</overWrite>
<outputDirectory>target/generated-resources/libs</outputDirectory>
- <destFileName>jetty-servlet-api.jar</destFileName>
+ <destFileName>javax-servlet-api.jar</destFileName>
</artifactItem>
<!-- dependencies that goes to WEB-INF for unusual usage -->
@@ -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>
@@ -340,7 +340,7 @@
</plugin>
<plugin>
- <groupId>org.mortbay.jetty</groupId>
+ <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.server.version}</version>
<configuration>
diff --git a/hudson-war/src/main/webapp/WEB-INF/jboss-all.xml b/hudson-war/src/main/webapp/WEB-INF/jboss-all.xml
new file mode 100644
index 00000000..e8922ce4
--- /dev/null
+++ b/hudson-war/src/main/webapp/WEB-INF/jboss-all.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This file explicitly disables CDI on WildFly and JBoss AS.
+ It is just a temporary measure until Java EE 7 (CDI 1.1) support is finally
+ added to Hudson.
+-->
+<jboss xmlns="urn:jboss:1.0">
+ <weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
+</jboss>
diff --git a/hudson-war/src/main/webapp/help/disable-builder.html b/hudson-war/src/main/webapp/help/disable-builder.html
new file mode 100644
index 00000000..d9611c21
--- /dev/null
+++ b/hudson-war/src/main/webapp/help/disable-builder.html
@@ -0,0 +1,18 @@
+<!-- **************************************************************************
+#
+# Copyright (C) 2015 Oracle Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Winston Prakash
+#
+#************************************************************************** -->
+
+<div>
+ <p>When checked, this builder will be disabled temporarily until enabled again.
+ At build time the builder will not perform it's task.</p>
+</div>
diff --git a/hudson-war/src/main/webapp/scripts/hudson-behavior.js b/hudson-war/src/main/webapp/scripts/hudson-behavior.js
index dc6b4f81..3a727dd8 100644
--- a/hudson-war/src/main/webapp/scripts/hudson-behavior.js
+++ b/hudson-war/src/main/webapp/scripts/hudson-behavior.js
@@ -1587,31 +1587,34 @@ function updateBuildHistory(ajaxUrl,nBuild) {
function updateBuilds() {
var bh = $('buildHistory');
- new Ajax.Request(ajaxUrl, {
- requestHeaders: bh.headers,
- onSuccess: function(rsp) {
- var rows = bh.rows;
-
- //delete rows with transitive data
- while (rows.length > 2 && Element.hasClassName(rows[1], "transitive"))
- Element.remove(rows[1]);
-
- // insert new rows
- var div = document.createElement('div');
- div.innerHTML = rsp.responseText;
- Behaviour.applySubtree(div);
-
- var pivot = rows[0];
- var newRows = div.firstChild.rows;
- for (var i = newRows.length - 1; i >= 0; i--) {
- pivot.parentNode.insertBefore(newRows[i], pivot.nextSibling);
+ // There may be a race while loadAllBuildHistory is changing dom.
+ if (typeof bh.headers != "undefined") {
+ new Ajax.Request(ajaxUrl, {
+ requestHeaders: bh.headers,
+ onSuccess: function(rsp) {
+ var rows = bh.rows;
+
+ //delete rows with transitive data
+ while (rows.length > 2 && Element.hasClassName(rows[1], "transitive"))
+ Element.remove(rows[1]);
+
+ // insert new rows
+ var div = document.createElement('div');
+ div.innerHTML = rsp.responseText;
+ Behaviour.applySubtree(div);
+
+ var pivot = rows[0];
+ var newRows = div.firstChild.rows;
+ for (var i = newRows.length - 1; i >= 0; i--) {
+ pivot.parentNode.insertBefore(newRows[i], pivot.nextSibling);
+ }
+
+ // next update
+ bh.headers = ["n",rsp.getResponseHeader("n")];
+ window.setTimeout(updateBuilds, 5000);
}
-
- // next update
- bh.headers = ["n",rsp.getResponseHeader("n")];
- window.setTimeout(updateBuilds, 5000);
- }
- });
+ });
+ }
}
window.setTimeout(updateBuilds, 5000);
}
diff --git a/pom.xml b/pom.xml
index 6d493fb8..9403ef2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-parent</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Hudson</name>
@@ -111,12 +111,12 @@
<cbi-plugins.version>1.0.5</cbi-plugins.version>
- <jetty.server.version>8.1.7.v20120910</jetty.server.version>
- <jetty.javax.serverlet.version>3.0.0.v201112011016</jetty.javax.serverlet.version>
+ <jetty.server.version>9.2.10.v20150310</jetty.server.version>
+ <jetty.javax.serverlet.version>3.1.0</jetty.javax.serverlet.version>
- <maven-hpi-plugin.version>3.0.2</maven-hpi-plugin.version>
- <stapler.version>3.0.0</stapler.version>
- <maven-stapler-plugin.version>3.0.1</maven-stapler-plugin.version>
+ <maven-hpi-plugin.version>3.0.3</maven-hpi-plugin.version>
+ <stapler.version>3.0.3</stapler.version>
+ <maven-stapler-plugin.version>3.0.2</maven-stapler-plugin.version>
<!--GWT properties-->
<gwt.draftCompile>false</gwt.draftCompile>
@@ -129,7 +129,7 @@
<aspectj.version>1.8.0</aspectj.version>
<sisuGuice.version>3.0.3</sisuGuice.version>
<sisuInject.version>2.2.3</sisuInject.version>
- <jetty.version>6.1.26</jetty.version>
+
<wagon-http.version>1.0-beta-7</wagon-http.version>
<test-annotations.version>1.0</test-annotations.version>
<servlet-api.version>2.4</servlet-api.version>
@@ -137,10 +137,12 @@
<slf4j.version>1.6.1</slf4j.version>
<logback-classic.version>0.9.28</logback-classic.version>
<guava.version>14.0.1</guava.version>
+ <guava.groupid>com.google.guava</guava.groupid>
+ <!--guava.groupid>org.hudsonci.lib</guava.groupid-->
<ant.version>1.8.2</ant.version>
- <xstream.version>1.4.1-hudson-2</xstream.version>
+ <xstream.version>1.4.8</xstream.version>
<jsr305.version>1.3.9</jsr305.version>
- <commons-lang.version>3.0.1</commons-lang.version>
+ <commons-lang.version>3.4</commons-lang.version>
<commons-io.version>2.0.1</commons-io.version>
<commons-codec.version>1.4</commons-codec.version>
<aether.version>1.11</aether.version>
@@ -153,7 +155,6 @@
<aspectjVersion>${aspectj.version}</aspectjVersion>
<sisuGuiceVersion>${sisuGuice.version}</sisuGuiceVersion>
<sisuInjectVersion>${sisuInject.version}</sisuInjectVersion>
- <jetty-version>${jetty.version}</jetty-version>
<!--Plugins-->
<maven-antrun-extended-plugin.version>1.42</maven-antrun-extended-plugin.version>
@@ -176,7 +177,7 @@
<maven-pmd-plugin.version>2.5</maven-pmd-plugin.version>
<maven-release-plugin.version>2.1</maven-release-plugin.version>
<maven-remote-resources-plugin.version>1.1</maven-remote-resources-plugin.version>
- <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
+ <maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
<maven-enforcer-plugin.version>1.0</maven-enforcer-plugin.version>
<maven-deploy-plugin.version>2.5</maven-deploy-plugin.version>
<maven-install-plugin.version>2.3.1</maven-install-plugin.version>
@@ -280,8 +281,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.7</source>
+ <target>1.7</target>
</configuration>
</plugin>
@@ -384,9 +385,6 @@
<groupId>org.eclipse.hudson.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<version>${maven-hpi-plugin.version}</version>
- <configuration>
- <showDeprecation>true</showDeprecation>
- </configuration>
</plugin>
<plugin>
@@ -524,8 +522,8 @@
<configuration>
<Xlint>ignore</Xlint>
<XaddSerialVersionUID>true</XaddSerialVersionUID>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.7</source>
+ <target>1.7</target>
</configuration>
</plugin>
@@ -596,9 +594,8 @@
</goals>
<configuration>
<rules>
- <!-- There is a bug in JDK 1.5's compiler therefore need to compile with 1.6 -->
<requireJavaVersion>
- <version>[1.6.0,]</version>
+ <version>[1.7.0,]</version>
</requireJavaVersion>
<requireMavenVersion>
<version>[3.0.0,]</version>
@@ -717,7 +714,7 @@
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
+ <groupId>${guava.groupid}</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
@@ -765,7 +762,7 @@
</dependency>
<dependency>
- <groupId>org.hudsonci.tools</groupId>
+ <groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>
@@ -789,12 +786,6 @@
</dependency>
<dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <version>${jetty.version}</version>
- </dependency>
-
- <dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
@@ -871,71 +862,71 @@
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-test-utils</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-utils</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-core</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-inject</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-inject</artifactId>
<classifier>tests</classifier>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-service</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-plugin-utils</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-cli</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-cli</artifactId>
<classifier>jar-with-dependencies</classifier>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-war</artifactId>
<type>war</type>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.eclipse.hudson</groupId>
<artifactId>hudson-test-framework</artifactId>
- <version>3.2.2-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
</dependency>
</dependencies>
@@ -961,7 +952,7 @@
<!--rulesets>
<ruleset>ruleset.xml</ruleset>
</rulesets-->
- <targetJdk>1.5</targetJdk>
+ <targetJdk>1.7</targetJdk>
</configuration>
</plugin>

Back to the top