From c4d9fe8e0707330d1d59d6f30a3a2e32b36a88c0 Mon Sep 17 00:00:00 2001 From: bap2000 Date: Sat, 21 May 2011 14:41:25 +0100 Subject: [PATCH 01/91] [FIXED JENKINS-4000] , [FIXED JENKINS-4002] encrypt proxy password Proxy password is encrypted in xml config file, and in the UI --- .../main/java/hudson/ProxyConfiguration.java | 34 ++++++++++++++++--- .../hudson/PluginManager/advanced.jelly | 2 +- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/hudson/ProxyConfiguration.java b/core/src/main/java/hudson/ProxyConfiguration.java index 6ff8c33ce6..1601dcc2d7 100644 --- a/core/src/main/java/hudson/ProxyConfiguration.java +++ b/core/src/main/java/hudson/ProxyConfiguration.java @@ -27,6 +27,7 @@ import hudson.model.Hudson; import hudson.model.Saveable; import hudson.model.listeners.SaveableListener; import hudson.util.Scrambler; +import hudson.util.Secret; import hudson.util.XStream2; import java.io.File; @@ -59,10 +60,17 @@ public final class ProxyConfiguration implements Saveable { public final int port; /** - * Possibly null proxy user name and password. - * Password is base64 scrambled since this is persisted to disk. + * Possibly null proxy user name. */ - private final String userName,password; + private final String userName; + /** + * null + */ + private String password; + /** + * encrypted password + */ + private Secret secretPassword; public ProxyConfiguration(String name, int port) { this(name,port,null,null); @@ -72,15 +80,24 @@ public final class ProxyConfiguration implements Saveable { this.name = name; this.port = port; this.userName = userName; - this.password = Scrambler.scramble(password); + this.secretPassword = Secret.fromString(password); } public String getUserName() { return userName; } +// This method is public, if it was public only for jelly, then should make it private (or inline contents) +// Have left public, as can't tell if anyone else is using from plugins + /** + * @return the password in plain text + */ public String getPassword() { - return Scrambler.descramble(password); + return Secret.toString(secretPassword); + } + + public String getEncryptedPassword() { + return (secretPassword == null) ? null : secretPassword.getEncryptedValue(); } public Proxy createProxy() { @@ -94,6 +111,13 @@ public final class ProxyConfiguration implements Saveable { SaveableListener.fireOnChange(this, config); } + public Object readResolve() { + if (secretPassword == null) + secretPassword = Secret.fromString(Scrambler.descramble(password)); + password = null; + return this; + } + public static XmlFile getXmlFile() { return new XmlFile(XSTREAM, new File(Hudson.getInstance().getRootDir(), "proxy.xml")); } diff --git a/core/src/main/resources/hudson/PluginManager/advanced.jelly b/core/src/main/resources/hudson/PluginManager/advanced.jelly index f5260e426e..904d3d6c1f 100644 --- a/core/src/main/resources/hudson/PluginManager/advanced.jelly +++ b/core/src/main/resources/hudson/PluginManager/advanced.jelly @@ -48,7 +48,7 @@ THE SOFTWARE. - + From cee7a8584e877a6115b249b4a1f5ad32bb4fc873 Mon Sep 17 00:00:00 2001 From: laurents59 Date: Mon, 23 May 2011 09:37:44 +0200 Subject: [PATCH 02/91] Update french translation of UpdateCenter --- .../UpdateCenter/DownloadJob/Failure/status_fr.properties | 2 +- .../resources/hudson/model/UpdateCenter/index_fr.properties | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status_fr.properties b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status_fr.properties index c24d51bd7a..c2818cda8c 100644 --- a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status_fr.properties +++ b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status_fr.properties @@ -20,4 +20,4 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Failure= +Failure=\u00C9chec diff --git a/core/src/main/resources/hudson/model/UpdateCenter/index_fr.properties b/core/src/main/resources/hudson/model/UpdateCenter/index_fr.properties index 2eabc841ee..739f0e7955 100644 --- a/core/src/main/resources/hudson/model/UpdateCenter/index_fr.properties +++ b/core/src/main/resources/hudson/model/UpdateCenter/index_fr.properties @@ -20,9 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +Update\ Center=Centre de mise à jour warning=Une fois l''installation terminée, Jenkins doit être redémarré \ pour prendre en compte les nouveaux plugins. -Restart\ When\ No\ Jobs\ Are\ Running=Red\u00E9marrer quand aucun job n''est en cours -Update\ Center=Centre de mise à jour Installing\ Plugins/Upgrades=Installation/Mise \u00E0 jour des Plugins -Restart\ Now=Redémarrer maintenant +Schedule\ Restart=Programmer un red\u00E9marrage \ No newline at end of file From 76d0e891bb378a7fb385ac3441078a81dd1ccc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Thu, 19 May 2011 08:58:24 +0200 Subject: [PATCH 03/91] Maven Best Practice : Always define plugins versions in the pluginManagement of the root POM --- cli/pom.xml | 3 +- core/pom.xml | 20 ++++++++---- maven-plugin/pom.xml | 7 ++-- plugins/pom.xml | 5 +-- pom.xml | 67 +++++++++++++++++++++++++++++++++++++++ remoting/pom.xml | 6 ++-- test/pom.xml | 16 +++------- ui-samples-plugin/pom.xml | 4 +-- war/pom.xml | 10 ++++-- 9 files changed, 108 insertions(+), 30 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index 60876efd7b..ace8b6f299 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -13,6 +13,7 @@ maven-assembly-plugin + @@ -33,7 +34,7 @@ org.jvnet.localizer maven-localizer-plugin - 1.10 + diff --git a/core/pom.xml b/core/pom.xml index 48920c6bb7..34f390b5d8 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -48,7 +48,7 @@ THE SOFTWARE. org.jvnet.hudson.tools maven-encoding-plugin - 1.1 + @@ -61,7 +61,7 @@ THE SOFTWARE. com.infradna.tool bridge-method-injector - 1.4 + @@ -73,6 +73,7 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin + true @@ -89,7 +90,7 @@ THE SOFTWARE. org.jvnet.localizer maven-localizer-plugin - 1.10 + @@ -105,7 +106,7 @@ THE SOFTWARE. org.kohsuke access-modifier-checker - 1.0 + @@ -117,7 +118,7 @@ THE SOFTWARE. org.codehaus.mojo antlr-maven-plugin - 2.1 + cron @@ -144,6 +145,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + generate-resources @@ -181,6 +183,7 @@ THE SOFTWARE. maven-jar-plugin + @@ -198,7 +201,7 @@ THE SOFTWARE. --> org.codehaus.mojo apt-maven-plugin - 1.0-alpha-4 + true org.jvnet.hudson.tools.ExtensionPointListerFactory @@ -246,7 +249,7 @@ THE SOFTWARE. org.codehaus.mojo apt-maven-plugin - 1.0-alpha-2 + @@ -263,6 +266,7 @@ THE SOFTWARE. --> org.kohsuke.stapler maven-stapler-plugin + @@ -308,6 +312,7 @@ THE SOFTWARE. org.kohsuke.gmaven gmaven-plugin + @@ -327,6 +332,7 @@ THE SOFTWARE. maven-surefire-plugin + true diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 8047696cc8..8224d0f4ca 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -339,12 +339,13 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin + true org.jvnet.localizer maven-localizer-plugin - 1.8 + @@ -360,6 +361,7 @@ THE SOFTWARE. com.cloudbees maven-license-plugin + target/${project.artifactId}/WEB-INF/licenses.xml @@ -367,6 +369,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + resgen @@ -397,7 +400,7 @@ THE SOFTWARE. org.codehaus.mojo cobertura-maven-plugin - 2.4-apb-SNAPSHOT + true diff --git a/plugins/pom.xml b/plugins/pom.xml index d1ab491b2b..d74220dee3 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -157,7 +157,7 @@ org.codehaus.groovy.maven gmaven-plugin - 1.0-rc-5 + test-in-groovy @@ -178,6 +178,7 @@ maven-surefire-plugin + @@ -190,7 +191,7 @@ com.cloudbees maven-license-plugin - 1.3 + diff --git a/pom.xml b/pom.xml index 8b76bb1f10..b55a9680f1 100644 --- a/pom.xml +++ b/pom.xml @@ -106,6 +106,11 @@ THE SOFTWARE. maven-jar-plugin 2.3.1 + + org.apache.maven.plugins + maven-war-plugin + 2.1-beta-1 + org.apache.maven.plugins maven-surefire-plugin @@ -179,6 +184,68 @@ THE SOFTWARE. + + + org.kohsuke + maven-junit-plugin + 1.9 + + + org.jvnet.localizer + maven-localizer-plugin + 1.10 + + + org.jvnet.hudson.tools + maven-encoding-plugin + 1.1 + + + com.infradna.tool + bridge-method-injector + 1.4 + + + org.codehaus.mojo + antlr-maven-plugin + 2.1 + + + org.codehaus.mojo + apt-maven-plugin + 1.0-alpha-4 + + + org.codehaus.mojo + cobertura-maven-plugin + 2.4-apb-SNAPSHOT + + + org.codehaus.mojo + findbugs-maven-plugin + 2.1 + + + org.apache.maven.plugins + maven-pmd-plugin + 2.5 + + + + org.jenkins-ci.tools + maven-jenkins-dev-plugin + 6.1.26-jenkins-1 + + + org.jvnet.updatecenter2 + maven-makepkgs-plugin + 0.3 + + + org.apache.maven.plugins + maven-antrun-plugin + 1.5 + diff --git a/remoting/pom.xml b/remoting/pom.xml index f3cb2d65d3..3581da2c1e 100644 --- a/remoting/pom.xml +++ b/remoting/pom.xml @@ -44,7 +44,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 2.1 + High @@ -52,7 +52,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-pmd-plugin - 2.5 + @@ -91,6 +92,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + generate-resources diff --git a/test/pom.xml b/test/pom.xml index 9577adaa42..3e466c3170 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -47,6 +47,7 @@ THE SOFTWARE. maven-surefire-plugin + true @@ -55,7 +56,7 @@ THE SOFTWARE. org.kohsuke maven-junit-plugin - 1.9 + @@ -92,7 +93,7 @@ THE SOFTWARE. org.kohsuke.gmaven gmaven-plugin - 1.0-rc-5-patch-2 + preset-packager @@ -123,7 +124,7 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin - 1.15 + true @@ -230,6 +231,7 @@ THE SOFTWARE. org.kohsuke.gmaven gmaven-plugin + @@ -247,14 +249,6 @@ THE SOFTWARE. - - - com.sun.maven - maven-junit-plugin - - true - - diff --git a/ui-samples-plugin/pom.xml b/ui-samples-plugin/pom.xml index 46d5896ad7..a6a9ff03d9 100644 --- a/ui-samples-plugin/pom.xml +++ b/ui-samples-plugin/pom.xml @@ -92,13 +92,13 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin - 1.15 + true org.jvnet.localizer maven-localizer-plugin - 1.8 + diff --git a/war/pom.xml b/war/pom.xml index ae1dcef118..2335f84b59 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -44,7 +44,7 @@ THE SOFTWARE. maven-war-plugin - 2.1-beta-1 + true @@ -68,6 +68,7 @@ THE SOFTWARE. maven-dependency-plugin + generate-resources @@ -83,6 +84,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + package @@ -135,6 +137,7 @@ THE SOFTWARE. com.cloudbees maven-license-plugin + target/classes/META-INF/licenses.xml @@ -152,7 +155,7 @@ THE SOFTWARE. org.jenkins-ci.tools maven-jenkins-dev-plugin - 6.1.26-jenkins-1 + ${contextPath} @@ -341,6 +344,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-antrun-plugin + From d091f85484ecbbf52802dd90c9be1dcbb7d48200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sat, 21 May 2011 00:21:47 +0200 Subject: [PATCH 04/91] Remove hardcoded http wagon. It is provide by maven itself and it creates a conflict with the one used by the core (3.x for exemple) --- pom.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pom.xml b/pom.xml index b55a9680f1..53b0024cce 100644 --- a/pom.xml +++ b/pom.xml @@ -344,13 +344,6 @@ THE SOFTWARE. --> - - - org.apache.maven.wagon - wagon-http - 1.0-beta-5 - - From 520000d020f3a650e427cb79c6279653d77e2f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:03:51 +0200 Subject: [PATCH 05/91] upgrade maven-antrun-extended-plugin 1.39 -> 1.42 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 53b0024cce..e036ffe8ad 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin - 1.39 + 1.42 org.apache.maven.plugins From e79ad5d03f38ed50459f2f1b4cf646b14f21c34a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:04:48 +0200 Subject: [PATCH 06/91] Upgrade maven-project-info-reports-plugin 2.1 -> 2.4 --- core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index 34f390b5d8..58973b18eb 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -841,7 +841,7 @@ THE SOFTWARE. maven-project-info-reports-plugin - 2.1 + 2.4 false From 2eb52961fb60bbcc728094cce2b538c9d2919323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:05:54 +0200 Subject: [PATCH 07/91] Upgrade maven-deploy-plugin from 2.5 to 2.6 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e036ffe8ad..d9b2e908e0 100644 --- a/pom.xml +++ b/pom.xml @@ -89,8 +89,8 @@ THE SOFTWARE. org.apache.maven.plugins maven-deploy-plugin - 2.5 - + 2.6 + org.apache.maven.plugins maven-install-plugin From 14ef8fec04ba54c0ced297e8a01f28465ce1698e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:07:46 +0200 Subject: [PATCH 08/91] Upgrade maven-javadoc-plugin from 2.6.1 to 2.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9b2e908e0..9ccb68a3e4 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-javadoc-plugin - 2.6.1 + 2.8 org.apache.maven.plugins From c38fdd1f8b24548d9f37f61b77a07c6ec16ca671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:08:23 +0200 Subject: [PATCH 09/91] Upgrade maven-war-plugin 2.1-beta-1 to 2.1.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ccb68a3e4..5c6bb88dbb 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-war-plugin - 2.1-beta-1 + 2.1.1 org.apache.maven.plugins From 968f202d25e39c29ae0a16dc7e19d3566923fc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:09:19 +0200 Subject: [PATCH 10/91] Upgrade maven-surefire-plugin 2.8 to 2.8.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c6bb88dbb..0e1e0ff6bb 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-surefire-plugin - 2.8 + 2.8.1 ${project.build.directory} From ca2576762d45c1f2f44d544fa47cbb1c8a413dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:09:52 +0200 Subject: [PATCH 11/91] Upgrade maven-dependency-plugin 2.1 -> 2.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e1e0ff6bb..f003c7bbb3 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-dependency-plugin - 2.1 + 2.2 org.apache.maven.plugins From b7c884da3063f55db85d41d809ba71fae334b320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:13:36 +0200 Subject: [PATCH 12/91] Upgrade maven-resources-plugin 2.4.3 -> 2.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f003c7bbb3..ecfc23b6f6 100644 --- a/pom.xml +++ b/pom.xml @@ -135,7 +135,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-resources-plugin - 2.4.3 + 2.5 org.jenkins-ci.tools maven-jenkins-dev-plugin - 6.1.26-jenkins-1 + 6.1.26-jenkins-2 org.jenkins-ci.tools maven-jenkins-dev-plugin - 6.1.26-jenkins-1 + 6.1.26-jenkins-2 org.jvnet.updatecenter2 From c5c805b85809cb59467fa0455fe0338be67f9bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:30:10 +0200 Subject: [PATCH 20/91] Upgrade maven-makepkgs-plugin 0.3 -> 0.5.1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0d04a4feaf..7478460010 100644 --- a/pom.xml +++ b/pom.xml @@ -239,8 +239,8 @@ THE SOFTWARE. org.jvnet.updatecenter2 maven-makepkgs-plugin - 0.3 - + 0.5.1 + org.apache.maven.plugins maven-antrun-plugin From a78812bfb2803c922f1ef6325eb062e38bf26f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:30:43 +0200 Subject: [PATCH 21/91] Upgrade maven-antrun-plugin 1.5 -> 1.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7478460010..e8c20da9fa 100644 --- a/pom.xml +++ b/pom.xml @@ -244,7 +244,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-antrun-plugin - 1.5 + 1.6 From 65e55c677f239d772ecd3796d853dabe5b27c88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:08:54 +0200 Subject: [PATCH 22/91] Set version of maven-gpg-plugin to 1.2 --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index e8c20da9fa..928f5987bd 100644 --- a/pom.xml +++ b/pom.xml @@ -91,6 +91,10 @@ THE SOFTWARE. maven-deploy-plugin 2.6 + + maven-gpg-plugin + 1.2 + org.apache.maven.plugins maven-install-plugin From c5a4d1631afbca89c4f159cc862dcc76b7379fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:01:46 +0200 Subject: [PATCH 23/91] Set findbugs-maven-plugin 2.3.2 --- core/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 58973b18eb..6e96d4815d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -291,7 +291,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 1.2 + 2.3.2 Max Normal diff --git a/pom.xml b/pom.xml index 928f5987bd..0eb361cbb9 100644 --- a/pom.xml +++ b/pom.xml @@ -227,7 +227,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 2.1 + 2.3.2 org.apache.maven.plugins @@ -403,7 +403,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 2.4 + 2.3.2 High From 073734f363487abcfef815a0c0a3d5dda3876649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:31:18 +0200 Subject: [PATCH 24/91] Add maven-hpi-plugin 1.69 definition --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 0eb361cbb9..28685f19f3 100644 --- a/pom.xml +++ b/pom.xml @@ -250,6 +250,11 @@ THE SOFTWARE. maven-antrun-plugin 1.6 + + org.jenkins-ci.tools + maven-hpi-plugin + 1.69 + From 3c88fc56dd82f41c41d80972b013bd151cd06aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sat, 28 May 2011 12:13:30 +0200 Subject: [PATCH 25/91] JENKINS-9788 : Put test-harness execution in a profile. You can skip them by adding -P-run-test-harness in the build command line --- test/pom.xml | 118 ++++++++++++++++++++++++++++----------------------- 1 file changed, 65 insertions(+), 53 deletions(-) diff --git a/test/pom.xml b/test/pom.xml index 9577adaa42..af79f5ccf8 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -46,48 +46,17 @@ THE SOFTWARE. - maven-surefire-plugin - - true - + org.kohsuke.stapler + maven-stapler-plugin + 1.15 + true - - org.kohsuke - maven-junit-plugin - 1.9 - - - - test - - - true - ${concurrency} - -Dfile.encoding=UTF-8 - 300 - - - - hudson.ClassicPluginStrategy.useAntClassLoader - true - - - hudson.maven.debug - ${mavenDebug} - - - java.io.tmpdir - ${project.build.directory} - - - buildDirectory - ${project.build.directory} - - - - - + maven-surefire-plugin + + true + + org.kohsuke.gmaven @@ -120,15 +89,9 @@ THE SOFTWARE. - - org.kohsuke.stapler - maven-stapler-plugin - 1.15 - true - - + + compile + org.jvnet.mock-javamail @@ -181,11 +145,11 @@ THE SOFTWARE. htmlunit 2.6-jenkins-4 - - - xml-apis - xml-apis - + + + xml-apis + xml-apis + @@ -214,6 +178,54 @@ THE SOFTWARE. + + + run-test-harness + + + + + org.kohsuke + maven-junit-plugin + 1.9 + + + + test + + + true + ${concurrency} + -Dfile.encoding=UTF-8 + 300 + + + + hudson.ClassicPluginStrategy.useAntClassLoader + true + + + hudson.maven.debug + ${mavenDebug} + + + java.io.tmpdir + ${project.build.directory} + + + buildDirectory + ${project.build.directory} + + + + + + + + + + + light-test From 72ecd06cb5ca23d198dd41acef2dde988d7ab20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Thu, 19 May 2011 08:58:24 +0200 Subject: [PATCH 26/91] Maven Best Practice : Always define plugins versions in the pluginManagement of the root POM --- cli/pom.xml | 3 +- core/pom.xml | 20 ++++++++---- maven-plugin/pom.xml | 7 ++-- plugins/pom.xml | 5 +-- pom.xml | 67 +++++++++++++++++++++++++++++++++++++++ remoting/pom.xml | 6 ++-- test/pom.xml | 16 +++------- ui-samples-plugin/pom.xml | 4 +-- war/pom.xml | 10 ++++-- 9 files changed, 108 insertions(+), 30 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index 60876efd7b..ace8b6f299 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -13,6 +13,7 @@ maven-assembly-plugin + @@ -33,7 +34,7 @@ org.jvnet.localizer maven-localizer-plugin - 1.10 + diff --git a/core/pom.xml b/core/pom.xml index 48920c6bb7..34f390b5d8 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -48,7 +48,7 @@ THE SOFTWARE. org.jvnet.hudson.tools maven-encoding-plugin - 1.1 + @@ -61,7 +61,7 @@ THE SOFTWARE. com.infradna.tool bridge-method-injector - 1.4 + @@ -73,6 +73,7 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin + true @@ -89,7 +90,7 @@ THE SOFTWARE. org.jvnet.localizer maven-localizer-plugin - 1.10 + @@ -105,7 +106,7 @@ THE SOFTWARE. org.kohsuke access-modifier-checker - 1.0 + @@ -117,7 +118,7 @@ THE SOFTWARE. org.codehaus.mojo antlr-maven-plugin - 2.1 + cron @@ -144,6 +145,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + generate-resources @@ -181,6 +183,7 @@ THE SOFTWARE. maven-jar-plugin + @@ -198,7 +201,7 @@ THE SOFTWARE. --> org.codehaus.mojo apt-maven-plugin - 1.0-alpha-4 + true org.jvnet.hudson.tools.ExtensionPointListerFactory @@ -246,7 +249,7 @@ THE SOFTWARE. org.codehaus.mojo apt-maven-plugin - 1.0-alpha-2 + @@ -263,6 +266,7 @@ THE SOFTWARE. --> org.kohsuke.stapler maven-stapler-plugin + @@ -308,6 +312,7 @@ THE SOFTWARE. org.kohsuke.gmaven gmaven-plugin + @@ -327,6 +332,7 @@ THE SOFTWARE. maven-surefire-plugin + true diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 8047696cc8..8224d0f4ca 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -339,12 +339,13 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin + true org.jvnet.localizer maven-localizer-plugin - 1.8 + @@ -360,6 +361,7 @@ THE SOFTWARE. com.cloudbees maven-license-plugin + target/${project.artifactId}/WEB-INF/licenses.xml @@ -367,6 +369,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + resgen @@ -397,7 +400,7 @@ THE SOFTWARE. org.codehaus.mojo cobertura-maven-plugin - 2.4-apb-SNAPSHOT + true diff --git a/plugins/pom.xml b/plugins/pom.xml index d1ab491b2b..d74220dee3 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -157,7 +157,7 @@ org.codehaus.groovy.maven gmaven-plugin - 1.0-rc-5 + test-in-groovy @@ -178,6 +178,7 @@ maven-surefire-plugin + @@ -190,7 +191,7 @@ com.cloudbees maven-license-plugin - 1.3 + diff --git a/pom.xml b/pom.xml index 8b76bb1f10..b55a9680f1 100644 --- a/pom.xml +++ b/pom.xml @@ -106,6 +106,11 @@ THE SOFTWARE. maven-jar-plugin 2.3.1 + + org.apache.maven.plugins + maven-war-plugin + 2.1-beta-1 + org.apache.maven.plugins maven-surefire-plugin @@ -179,6 +184,68 @@ THE SOFTWARE. + + + org.kohsuke + maven-junit-plugin + 1.9 + + + org.jvnet.localizer + maven-localizer-plugin + 1.10 + + + org.jvnet.hudson.tools + maven-encoding-plugin + 1.1 + + + com.infradna.tool + bridge-method-injector + 1.4 + + + org.codehaus.mojo + antlr-maven-plugin + 2.1 + + + org.codehaus.mojo + apt-maven-plugin + 1.0-alpha-4 + + + org.codehaus.mojo + cobertura-maven-plugin + 2.4-apb-SNAPSHOT + + + org.codehaus.mojo + findbugs-maven-plugin + 2.1 + + + org.apache.maven.plugins + maven-pmd-plugin + 2.5 + + + + org.jenkins-ci.tools + maven-jenkins-dev-plugin + 6.1.26-jenkins-1 + + + org.jvnet.updatecenter2 + maven-makepkgs-plugin + 0.3 + + + org.apache.maven.plugins + maven-antrun-plugin + 1.5 + diff --git a/remoting/pom.xml b/remoting/pom.xml index f3cb2d65d3..3581da2c1e 100644 --- a/remoting/pom.xml +++ b/remoting/pom.xml @@ -44,7 +44,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 2.1 + High @@ -52,7 +52,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-pmd-plugin - 2.5 + @@ -91,6 +92,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + generate-resources diff --git a/test/pom.xml b/test/pom.xml index af79f5ccf8..5437c86319 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -48,11 +48,12 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin - 1.15 + true maven-surefire-plugin + true @@ -61,7 +62,7 @@ THE SOFTWARE. org.kohsuke.gmaven gmaven-plugin - 1.0-rc-5-patch-2 + preset-packager @@ -187,7 +188,7 @@ THE SOFTWARE. org.kohsuke maven-junit-plugin - 1.9 + @@ -242,6 +243,7 @@ THE SOFTWARE. org.kohsuke.gmaven gmaven-plugin + @@ -259,14 +261,6 @@ THE SOFTWARE. - - - com.sun.maven - maven-junit-plugin - - true - - diff --git a/ui-samples-plugin/pom.xml b/ui-samples-plugin/pom.xml index 46d5896ad7..a6a9ff03d9 100644 --- a/ui-samples-plugin/pom.xml +++ b/ui-samples-plugin/pom.xml @@ -92,13 +92,13 @@ THE SOFTWARE. org.kohsuke.stapler maven-stapler-plugin - 1.15 + true org.jvnet.localizer maven-localizer-plugin - 1.8 + diff --git a/war/pom.xml b/war/pom.xml index ae1dcef118..2335f84b59 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -44,7 +44,7 @@ THE SOFTWARE. maven-war-plugin - 2.1-beta-1 + true @@ -68,6 +68,7 @@ THE SOFTWARE. maven-dependency-plugin + generate-resources @@ -83,6 +84,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin + package @@ -135,6 +137,7 @@ THE SOFTWARE. com.cloudbees maven-license-plugin + target/classes/META-INF/licenses.xml @@ -152,7 +155,7 @@ THE SOFTWARE. org.jenkins-ci.tools maven-jenkins-dev-plugin - 6.1.26-jenkins-1 + ${contextPath} @@ -341,6 +344,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-antrun-plugin + From 709337aaa85a23c653ca38c9940de5f6ccac03ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sat, 21 May 2011 00:21:47 +0200 Subject: [PATCH 27/91] Remove hardcoded http wagon. It is provide by maven itself and it creates a conflict with the one used by the core (3.x for exemple) --- pom.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pom.xml b/pom.xml index b55a9680f1..53b0024cce 100644 --- a/pom.xml +++ b/pom.xml @@ -344,13 +344,6 @@ THE SOFTWARE. --> - - - org.apache.maven.wagon - wagon-http - 1.0-beta-5 - - From c82be090bb5d2a49217b3dd4a5115f41f4bea6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:03:51 +0200 Subject: [PATCH 28/91] upgrade maven-antrun-extended-plugin 1.39 -> 1.42 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 53b0024cce..e036ffe8ad 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ THE SOFTWARE. org.jvnet.maven-antrun-extended-plugin maven-antrun-extended-plugin - 1.39 + 1.42 org.apache.maven.plugins From e17d7706ec637e18e4746a5c523f3fe13e339d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:04:48 +0200 Subject: [PATCH 29/91] Upgrade maven-project-info-reports-plugin 2.1 -> 2.4 --- core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index 34f390b5d8..58973b18eb 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -841,7 +841,7 @@ THE SOFTWARE. maven-project-info-reports-plugin - 2.1 + 2.4 false From af2a1d38b888fd44985f237a3af7b2de76eb4a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:05:54 +0200 Subject: [PATCH 30/91] Upgrade maven-deploy-plugin from 2.5 to 2.6 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e036ffe8ad..d9b2e908e0 100644 --- a/pom.xml +++ b/pom.xml @@ -89,8 +89,8 @@ THE SOFTWARE. org.apache.maven.plugins maven-deploy-plugin - 2.5 - + 2.6 + org.apache.maven.plugins maven-install-plugin From fd22e3199a043a082c80ddead7a6dfa175a8a119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:07:46 +0200 Subject: [PATCH 31/91] Upgrade maven-javadoc-plugin from 2.6.1 to 2.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9b2e908e0..9ccb68a3e4 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-javadoc-plugin - 2.6.1 + 2.8 org.apache.maven.plugins From ebac3e97c183a22d0830219cdf26da79613ecbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:08:23 +0200 Subject: [PATCH 32/91] Upgrade maven-war-plugin 2.1-beta-1 to 2.1.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ccb68a3e4..5c6bb88dbb 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-war-plugin - 2.1-beta-1 + 2.1.1 org.apache.maven.plugins From fc2358b5c4124ada2389996bdce658e0634ba0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:09:19 +0200 Subject: [PATCH 33/91] Upgrade maven-surefire-plugin 2.8 to 2.8.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c6bb88dbb..0e1e0ff6bb 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-surefire-plugin - 2.8 + 2.8.1 ${project.build.directory} From 3ceed62d6ef4dfafb0b619a36630f96c9e96121a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:09:52 +0200 Subject: [PATCH 34/91] Upgrade maven-dependency-plugin 2.1 -> 2.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e1e0ff6bb..f003c7bbb3 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-dependency-plugin - 2.1 + 2.2 org.apache.maven.plugins From 096a283877240d39db9cd1542ea0fcc0ba0e26b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:13:36 +0200 Subject: [PATCH 35/91] Upgrade maven-resources-plugin 2.4.3 -> 2.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f003c7bbb3..ecfc23b6f6 100644 --- a/pom.xml +++ b/pom.xml @@ -135,7 +135,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-resources-plugin - 2.4.3 + 2.5 org.jenkins-ci.tools maven-jenkins-dev-plugin - 6.1.26-jenkins-1 + 6.1.26-jenkins-2 org.jenkins-ci.tools maven-jenkins-dev-plugin - 6.1.26-jenkins-1 + 6.1.26-jenkins-2 org.jvnet.updatecenter2 From 0213156355ca0ca1ad84ab9adf30a334c477a271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:30:10 +0200 Subject: [PATCH 43/91] Upgrade maven-makepkgs-plugin 0.3 -> 0.5.1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0d04a4feaf..7478460010 100644 --- a/pom.xml +++ b/pom.xml @@ -239,8 +239,8 @@ THE SOFTWARE. org.jvnet.updatecenter2 maven-makepkgs-plugin - 0.3 - + 0.5.1 + org.apache.maven.plugins maven-antrun-plugin From be73451fd446c1f8a39a1d6f588c53ab200cd5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:30:43 +0200 Subject: [PATCH 44/91] Upgrade maven-antrun-plugin 1.5 -> 1.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7478460010..e8c20da9fa 100644 --- a/pom.xml +++ b/pom.xml @@ -244,7 +244,7 @@ THE SOFTWARE. org.apache.maven.plugins maven-antrun-plugin - 1.5 + 1.6 From 1bb75ccce19299cf92efe2b0fe1a3b69c007bb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:08:54 +0200 Subject: [PATCH 45/91] Set version of maven-gpg-plugin to 1.2 --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index e8c20da9fa..928f5987bd 100644 --- a/pom.xml +++ b/pom.xml @@ -91,6 +91,10 @@ THE SOFTWARE. maven-deploy-plugin 2.6 + + maven-gpg-plugin + 1.2 + org.apache.maven.plugins maven-install-plugin From 557d8adecf7c2ef4e5b65e180f67d2715cfe226f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:01:46 +0200 Subject: [PATCH 46/91] Set findbugs-maven-plugin 2.3.2 --- core/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 58973b18eb..6e96d4815d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -291,7 +291,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 1.2 + 2.3.2 Max Normal diff --git a/pom.xml b/pom.xml index 928f5987bd..0eb361cbb9 100644 --- a/pom.xml +++ b/pom.xml @@ -227,7 +227,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 2.1 + 2.3.2 org.apache.maven.plugins @@ -403,7 +403,7 @@ THE SOFTWARE. org.codehaus.mojo findbugs-maven-plugin - 2.4 + 2.3.2 High From 0cfbe3ffe897731cba74cf2149a9adec8004b8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sun, 22 May 2011 23:31:18 +0200 Subject: [PATCH 47/91] Add maven-hpi-plugin 1.69 definition --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 0eb361cbb9..28685f19f3 100644 --- a/pom.xml +++ b/pom.xml @@ -250,6 +250,11 @@ THE SOFTWARE. maven-antrun-plugin 1.6 + + org.jenkins-ci.tools + maven-hpi-plugin + 1.69 + From be03ace384755b785b5d625817a4d8c3de23f308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Sat, 28 May 2011 16:56:31 +0200 Subject: [PATCH 48/91] JENKINS-9791 : Display an error message if the "deploy after build" feature is activated but the "archive artifacts" is disabled --- .../src/main/java/hudson/maven/RedeployPublisher.java | 8 ++++++++ .../resources/hudson/maven/RedeployPublisher/help.html | 4 ++++ .../resources/hudson/maven/RedeployPublisher/help_de.html | 5 +++++ .../resources/hudson/maven/RedeployPublisher/help_fr.html | 4 ++++ .../resources/hudson/maven/RedeployPublisher/help_ja.html | 4 ++++ 5 files changed, 25 insertions(+) diff --git a/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java b/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java index 0e4bebc8dd..8ab914679a 100644 --- a/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java +++ b/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java @@ -122,6 +122,14 @@ public class RedeployPublisher extends Recorder { return true; } + if(build instanceof MavenModuleSetBuild && ((MavenModuleSetBuild)build).getParent().isArchivingDisabled()){ + listener.getLogger().println("[ERROR] You cannot use the \"Deploy artifacts to Maven repository\" feature if you " + + "disabled " + + "automatic artifact archiving"); + build.setResult(Result.FAILURE); + return true; + } + listener.getLogger().println("Deploying artifacts to "+url); try { diff --git a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help.html b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help.html index 5e876525b8..5612392b96 100644 --- a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help.html +++ b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help.html @@ -13,4 +13,8 @@ Note that regardless of this configuration, you can always manually come back to Jenkins and deploy any of the past artifacts to any repository of your choice, after the fact. + +

+ To use this feature you shouldn't deactivate the automatic artifact archiving. +

\ No newline at end of file diff --git a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_de.html b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_de.html index a6b2d79f3e..769dd67abf 100644 --- a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_de.html +++ b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_de.html @@ -11,4 +11,9 @@

Hinweis: Unabhängig von dieser Einstellung können Sie aber auch jederzeit manuell Artefakte aus durchgeführten Builds in beliebige Repositories ausbringen. + +

+ To use this feature you shouldn't deactivate the automatic artifact archiving. +

+ \ No newline at end of file diff --git a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_fr.html b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_fr.html index 5e876525b8..5612392b96 100644 --- a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_fr.html +++ b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_fr.html @@ -13,4 +13,8 @@ Note that regardless of this configuration, you can always manually come back to Jenkins and deploy any of the past artifacts to any repository of your choice, after the fact. + +

+ To use this feature you shouldn't deactivate the automatic artifact archiving. +

\ No newline at end of file diff --git a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_ja.html b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_ja.html index 46c4773ea8..7e1586ab08 100644 --- a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_ja.html +++ b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/help_ja.html @@ -9,4 +9,8 @@

この設定を行っているかによらず、Jenkinsの画面からいつでも過去の成果物を任意のリポジトリにデプロイできます。 + +

+ To use this feature you shouldn't deactivate the automatic artifact archiving. +

\ No newline at end of file From c9a8fe7671ca9068e29f216f6fec4e376a6d3c17 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 30 May 2011 00:47:42 -0700 Subject: [PATCH 49/91] [JENKINS-9791] add changelog entry --- changelog.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.html b/changelog.html index ca1c8c0d45..19aef3e81f 100644 --- a/changelog.html +++ b/changelog.html @@ -62,6 +62,9 @@ Upcoming changes
  • CLI command page now lists all the available commands (issue 9789) +
  • + Improve the post deployment job to make a clear error if you disabled artifacts archives + (issue 9791) From a2c208868976025ce167e2a76c0cafee6c544689 Mon Sep 17 00:00:00 2001 From: Vojtech Juranek Date: Mon, 30 May 2011 11:29:06 +0200 Subject: [PATCH 50/91] Possible fix for JENKINS-9609 - session destroy call add to ensure that socket is free --- .../java/hudson/os/windows/ManagedWindowsServiceLauncher.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/hudson/os/windows/ManagedWindowsServiceLauncher.java b/core/src/main/java/hudson/os/windows/ManagedWindowsServiceLauncher.java index ed2bc669f1..44a0c10690 100644 --- a/core/src/main/java/hudson/os/windows/ManagedWindowsServiceLauncher.java +++ b/core/src/main/java/hudson/os/windows/ManagedWindowsServiceLauncher.java @@ -267,6 +267,8 @@ public class ManagedWindowsServiceLauncher extends ComputerLauncher { afterDisconnect(computer,listener); } }); + //destroy session to free the socket + JISession.destroySession(session); } catch (SmbException e) { e.printStackTrace(listener.error(e.getMessage())); } catch (JIException e) { @@ -315,6 +317,8 @@ public class ManagedWindowsServiceLauncher extends ComputerLauncher { listener.getLogger().println(Messages.ManagedWindowsServiceLauncher_StoppingService()); slaveService.StopService(); } + //destroy session to free the socket + JISession.destroySession(session); } catch (UnknownHostException e) { e.printStackTrace(listener.error(e.getMessage())); } catch (JIException e) { From 63893e8a2d3fc8339bce24debcd03c5dd4b811a7 Mon Sep 17 00:00:00 2001 From: Seiji Sogabe Date: Mon, 30 May 2011 19:24:03 +0900 Subject: [PATCH 51/91] fixed typo. --- .../resources/hudson/model/AbstractProject/main_ja.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/hudson/model/AbstractProject/main_ja.properties b/core/src/main/resources/hudson/model/AbstractProject/main_ja.properties index 25cc20ec66..81fb8b60fc 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/main_ja.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/main_ja.properties @@ -21,7 +21,7 @@ # THE SOFTWARE. Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9 -Recent\ Changes=\u5909\u66f4\u5c65\u6b74s +Recent\ Changes=\u5909\u66f4\u5c65\u6b74 Last\ Successful\ Artifacts=\u6700\u65b0\u6210\u529f\u30d3\u30eb\u30c9\u306e\u6210\u679c\u7269 Latest\ Test\ Result=\u6700\u65b0\u306e\u30c6\u30b9\u30c8\u7d50\u679c Latest\ Aggregated\ Test\ Result=\u6700\u65b0\u306e\u96c6\u7d04\u3055\u308c\u305f\u30c6\u30b9\u30c8\u7d50\u679c From a0fb3a8ffb9529b6da419956dc548d57f0bd8578 Mon Sep 17 00:00:00 2001 From: Seiji Sogabe Date: Mon, 30 May 2011 19:39:08 +0900 Subject: [PATCH 52/91] fixed ja. --- .../resources/hudson/maven/MavenModuleSet/index_ja.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index_ja.properties b/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index_ja.properties index 43605f79be..632219b7d3 100644 --- a/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index_ja.properties +++ b/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/index_ja.properties @@ -1,6 +1,6 @@ # The MIT License # -# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman +# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -21,7 +21,7 @@ # THE SOFTWARE. Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9 -Recent\ Changes=\u6700\u65b0\u306e\u5909\u66f4 +Recent\ Changes=\u5909\u66f4\u5c65\u6b74 Latest\ Test\ Result=\u6700\u65b0\u306e\u30c6\u30b9\u30c8\u7d50\u679c Last\ Successful\ Artifacts=\u6700\u65b0\u6210\u529f\u30d3\u30eb\u30c9\u306e\u6210\u679c\u7269 This\ project\ is\ currently\ disabled=\u73fe\u5728\u3001\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u7121\u52b9\u3067\u3059\u3002 From fe30ad88027bdc1b39fceb82a1ed6f1162a3fbdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Tue, 31 May 2011 10:06:18 +0200 Subject: [PATCH 53/91] JENKINS-9786 : Jenkins can read repositories definitions from Maven POMs to use the deploy task after the build. It's no more necessary to set/duplicate this information in the job configuration. --- changelog.html | 3 + .../java/hudson/maven/RedeployPublisher.java | 97 +++++++++---------- .../reporters/MavenArtifactArchiver.java | 47 ++++----- .../maven/reporters/MavenArtifactRecord.java | 80 ++++++++------- .../maven/RedeployPublisher/config.jelly | 6 +- .../RedeployPublisher/config_fr.properties | 5 +- 6 files changed, 124 insertions(+), 114 deletions(-) diff --git a/changelog.html b/changelog.html index 19aef3e81f..955b806bb8 100644 --- a/changelog.html +++ b/changelog.html @@ -65,6 +65,9 @@ Upcoming changes
  • Improve the post deployment job to make a clear error if you disabled artifacts archives (issue 9791) +
  • + Post-build deploy task for Maven jobs : Repositories definitions can now be read from the POMs. + (issue 9786) diff --git a/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java b/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java index 8ab914679a..09a1ad1505 100644 --- a/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java +++ b/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java @@ -28,31 +28,15 @@ import hudson.FilePath; import hudson.Launcher; import hudson.Util; import hudson.maven.reporters.MavenAbstractArtifactRecord; -import hudson.model.AbstractBuild; -import hudson.model.AbstractProject; -import hudson.model.BuildListener; -import hudson.model.Hudson; -import hudson.model.Node; -import hudson.model.Result; -import hudson.model.TaskListener; +import hudson.maven.reporters.MavenArtifactRecord; +import hudson.model.*; import hudson.remoting.Callable; import hudson.tasks.BuildStepDescriptor; import hudson.tasks.BuildStepMonitor; import hudson.tasks.Maven.MavenInstallation; import hudson.tasks.Publisher; import hudson.tasks.Recorder; -import hudson.util.FormValidation; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map.Entry; -import java.util.Properties; - import net.sf.json.JSONObject; - import org.apache.commons.lang.StringUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; @@ -65,9 +49,13 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.repository.Proxy; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.kohsuke.stapler.DataBoundConstructor; -import org.kohsuke.stapler.QueryParameter; import org.kohsuke.stapler.StaplerRequest; +import java.io.File; +import java.io.IOException; +import java.util.*; +import java.util.Map.Entry; + /** * {@link Publisher} for {@link MavenModuleSetBuild} to deploy artifacts * after a build is fully succeeded. @@ -90,6 +78,7 @@ public class RedeployPublisher extends Recorder { /** * For backward compatibility */ + @Deprecated public RedeployPublisher(String id, String url, boolean uniqueVersion) { this(id, url, uniqueVersion, false); } @@ -105,47 +94,52 @@ public class RedeployPublisher extends Recorder { this.evenIfUnstable = evenIfUnstable; } - public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { - if(build.getResult().isWorseThan(getTreshold())) + public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { + if (build.getResult().isWorseThan(getTreshold())) return true; // build failed. Don't publish - if (url==null) { - listener.getLogger().println("No Repository URL is specified."); + List mavenAbstractArtifactRecords = getActions(build, listener); + if (mavenAbstractArtifactRecords == null || mavenAbstractArtifactRecords.isEmpty()) { + listener.getLogger().println("[ERROR] No artifacts are recorded. Is this a Maven project?"); build.setResult(Result.FAILURE); return true; } - List mars = getActions( build, listener ); - if(mars==null || mars.isEmpty()) { - listener.getLogger().println("No artifacts are recorded. Is this a Maven project?"); - build.setResult(Result.FAILURE); - return true; - } if(build instanceof MavenModuleSetBuild && ((MavenModuleSetBuild)build).getParent().isArchivingDisabled()){ listener.getLogger().println("[ERROR] You cannot use the \"Deploy artifacts to Maven repository\" feature if you " + - "disabled " + - "automatic artifact archiving"); + "disabled automatic artifact archiving"); build.setResult(Result.FAILURE); return true; } - listener.getLogger().println("Deploying artifacts to "+url); + long startupTime = Calendar.getInstance().getTimeInMillis(); + try { - - //MavenEmbedder embedder = MavenUtil.createEmbedder(listener,build); - MavenEmbedder embedder = createEmbedder(listener,build); + MavenEmbedder embedder = createEmbedder(listener, build); ArtifactRepositoryLayout layout = - (ArtifactRepositoryLayout) embedder.lookup( ArtifactRepositoryLayout.ROLE,"default"); + (ArtifactRepositoryLayout) embedder.lookup(ArtifactRepositoryLayout.ROLE, "default"); ArtifactRepositoryFactory factory = - (ArtifactRepositoryFactory) embedder.lookup(ArtifactRepositoryFactory.ROLE); - - final ArtifactRepository repository = factory.createDeploymentArtifactRepository( - id, url, layout, uniqueVersion); - WrappedArtifactRepository repo = new WrappedArtifactRepository(repository,uniqueVersion); - for (MavenAbstractArtifactRecord mar : mars) - mar.deploy(embedder,repo,listener); - + (ArtifactRepositoryFactory) embedder.lookup(ArtifactRepositoryFactory.ROLE); + ArtifactRepository artifactRepository = null; + if (url != null) { + // By default we try to get the repository definition from the job configuration + artifactRepository = getDeploymentRepository(factory, layout, id, url); + } + for (MavenAbstractArtifactRecord mavenAbstractArtifactRecord : mavenAbstractArtifactRecords) { + if (artifactRepository == null && mavenAbstractArtifactRecord instanceof MavenArtifactRecord) { + // If no repository definition is set on the job level we try to take it from the POM + MavenArtifactRecord mavenArtifactRecord = (MavenArtifactRecord) mavenAbstractArtifactRecord; + artifactRepository = getDeploymentRepository(factory, layout, mavenArtifactRecord.repositoryId, mavenArtifactRecord.repositoryUrl); + } + if (artifactRepository == null) { + listener.getLogger().println("[ERROR] No Repository settings defined in the job configuration or distributionManagement of the module."); + build.setResult(Result.FAILURE); + return true; + } + mavenAbstractArtifactRecord.deploy(embedder, artifactRepository, listener); + } + listener.getLogger().println("[INFO] Deployment done in " + Util.getTimeSpanString(Calendar.getInstance().getTimeInMillis() - startupTime)); return true; } catch (MavenEmbedderException e) { e.printStackTrace(listener.error(e.getMessage())); @@ -156,9 +150,17 @@ public class RedeployPublisher extends Recorder { } // failed build.setResult(Result.FAILURE); + listener.getLogger().println("[INFO] Deployment failed after " + Util.getTimeSpanString(Calendar.getInstance().getTimeInMillis() - startupTime)); return true; } + private ArtifactRepository getDeploymentRepository(ArtifactRepositoryFactory factory, ArtifactRepositoryLayout layout, String repositoryId, String repositoryUrl) throws ComponentLookupException { + if (repositoryUrl == null) return null; + final ArtifactRepository repository = factory.createDeploymentArtifactRepository( + repositoryId, repositoryUrl, layout, uniqueVersion); + return new WrappedArtifactRepository(repository, uniqueVersion); + } + /** * * copy from MavenUtil but here we have to ignore localRepo path and setting as thoses paths comes @@ -312,13 +314,6 @@ public class RedeployPublisher extends Recorder { return true; } - public FormValidation doCheckUrl(@QueryParameter String url) { - String fixedUrl = hudson.Util.fixEmptyAndTrim(url); - if (fixedUrl==null) - return FormValidation.error(Messages.RedeployPublisher_RepositoryURL_Mandatory()); - - return FormValidation.ok(); - } } //--------------------------------------------- diff --git a/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java b/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java index 65ea22e006..903a2cab0e 100644 --- a/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java +++ b/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java @@ -23,29 +23,24 @@ */ package hudson.maven.reporters; -import hudson.maven.MavenBuildProxy; -import hudson.maven.MavenModule; -import hudson.maven.MavenReporter; -import hudson.maven.MavenReporterDescriptor; -import hudson.maven.MojoInfo; -import hudson.maven.MavenBuild; +import hudson.Extension; +import hudson.FilePath; +import hudson.Util; +import hudson.maven.*; import hudson.model.BuildListener; import hudson.util.InvocationInterceptor; -import hudson.FilePath; -import hudson.Extension; -import hudson.Util; import org.apache.maven.artifact.Artifact; import org.apache.maven.project.MavenProject; -import java.io.IOException; import java.io.File; import java.io.FileInputStream; +import java.io.IOException; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Set; -import java.util.HashSet; -import java.lang.reflect.Method; -import java.lang.reflect.InvocationHandler; /** * Archives artifacts of the build. @@ -99,41 +94,47 @@ public class MavenArtifactArchiver extends MavenReporter { // artifacts that are known to Maven. Set mavenArtifacts = new HashSet(); - if(pom.getFile()!=null) {// goals like 'clean' runs without loading POM, apparently. + if (pom.getFile() != null) {// goals like 'clean' runs without loading POM, apparently. // record POM final MavenArtifact pomArtifact = new MavenArtifact( - pom.getGroupId(), pom.getArtifactId(), pom.getVersion(), null, "pom", pom.getFile().getName(), Util.getDigestOf(new FileInputStream(pom.getFile()))); + pom.getGroupId(), pom.getArtifactId(), pom.getVersion(), null, "pom", pom.getFile().getName(), Util.getDigestOf(new FileInputStream(pom.getFile()))); + + final String repositoryUrl = pom.getDistributionManagementArtifactRepository() == null ? null : Util.fixEmptyAndTrim(pom.getDistributionManagementArtifactRepository().getUrl()); + final String repositoryId = pom.getDistributionManagementArtifactRepository() == null ? null : Util.fixEmptyAndTrim(pom.getDistributionManagementArtifactRepository().getId()); + mavenArtifacts.add(pom.getFile()); - pomArtifact.archive(build,pom.getFile(),listener); + pomArtifact.archive(build, pom.getFile(), listener); // record main artifact (if packaging is POM, this doesn't exist) final MavenArtifact mainArtifact = MavenArtifact.create(pom.getArtifact()); - if(mainArtifact!=null) { + if (mainArtifact != null) { File f = pom.getArtifact().getFile(); mavenArtifacts.add(f); - mainArtifact.archive(build, f,listener); + mainArtifact.archive(build, f, listener); } // record attached artifacts final List attachedArtifacts = new ArrayList(); - for( Artifact a : (List)pom.getAttachedArtifacts() ) { + for (Artifact a : (List) pom.getAttachedArtifacts()) { MavenArtifact ma = MavenArtifact.create(a); - if(ma!=null) { + if (ma != null) { mavenArtifacts.add(a.getFile()); - ma.archive(build,a.getFile(),listener); + ma.archive(build, a.getFile(), listener); attachedArtifacts.add(ma); } } // record the action - build.executeAsync(new MavenBuildProxy.BuildCallable() { + build.executeAsync(new MavenBuildProxy.BuildCallable() { public Void call(MavenBuild build) throws IOException, InterruptedException { // if a build forks lifecycles, this method can be called multiple times List old = Util.filter(build.getActions(), MavenArtifactRecord.class); if (!old.isEmpty()) build.getActions().removeAll(old); - MavenArtifactRecord mar = new MavenArtifactRecord(build,pomArtifact,mainArtifact,attachedArtifacts); + MavenArtifactRecord mar = new MavenArtifactRecord(build, pomArtifact, mainArtifact, attachedArtifacts, + repositoryUrl, + repositoryId); build.addAction(mar); mar.recordFingerprints(); diff --git a/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java b/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java index f2d3bf5106..8c49e56baa 100644 --- a/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java +++ b/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java @@ -23,23 +23,10 @@ */ package hudson.maven.reporters; -import hudson.maven.AggregatableAction; -import hudson.maven.MavenAggregatedReport; -import hudson.maven.MavenBuild; -import hudson.maven.MavenEmbedder; -import hudson.maven.MavenEmbedderException; -import hudson.maven.MavenModule; -import hudson.maven.MavenModuleSetBuild; -import hudson.maven.MavenUtil; +import hudson.maven.*; import hudson.maven.RedeployPublisher.WrappedArtifactRepository; import hudson.model.Action; import hudson.model.TaskListener; - -import java.io.IOException; -import java.io.PrintStream; -import java.util.List; -import java.util.Map; - import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.deployer.ArtifactDeployer; import org.apache.maven.artifact.deployer.ArtifactDeploymentException; @@ -51,6 +38,11 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.project.artifact.ProjectArtifactMetadata; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; +import java.io.IOException; +import java.io.PrintStream; +import java.util.List; +import java.util.Map; + /** * {@link Action} that remembers {@link MavenArtifact artifact}s that are built. * @@ -82,16 +74,34 @@ public class MavenArtifactRecord extends MavenAbstractArtifactRecord */ public final List attachedArtifacts; + /** + * The repository identifier (matching maven settings) used for credentials to deploy artifacts + */ + public final String repositoryId; + + /** + * The repository URL used for credentials to deploy artifacts + */ + public final String repositoryUrl; + + @Deprecated public MavenArtifactRecord(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, List attachedArtifacts) { - assert parent!=null; - assert pomArtifact!=null; - assert attachedArtifacts!=null; - if(mainArtifact==null) mainArtifact=pomArtifact; + this(parent, pomArtifact, mainArtifact, attachedArtifacts, null, null); + } + + public MavenArtifactRecord(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, + List attachedArtifacts, String repositoryUrl, String repositoryId) { + assert parent != null; + assert pomArtifact != null; + assert attachedArtifacts != null; + if (mainArtifact == null) mainArtifact = pomArtifact; this.parent = parent; this.pomArtifact = pomArtifact; this.mainArtifact = mainArtifact; this.attachedArtifacts = attachedArtifacts; + this.repositoryUrl = repositoryUrl; + this.repositoryId = repositoryId; } public MavenBuild getBuild() { @@ -109,38 +119,38 @@ public class MavenArtifactRecord extends MavenAbstractArtifactRecord @Override public void deploy(MavenEmbedder embedder, ArtifactRepository deploymentRepository, TaskListener listener) throws MavenEmbedderException, IOException, ComponentLookupException, ArtifactDeploymentException { ArtifactHandlerManager handlerManager = embedder.lookup(ArtifactHandlerManager.class); - - ArtifactFactory factory = embedder.lookup(ArtifactFactory.class); + + ArtifactFactory artifactFactory = embedder.lookup(ArtifactFactory.class); PrintStream logger = listener.getLogger(); boolean maven3orLater = MavenUtil.maven3orLater(parent.getModuleSetBuild().getMavenVersionUsed()); boolean uniqueVersion = true; if (!deploymentRepository.isUniqueVersion()) { if (maven3orLater) { - logger.println("uniqueVersion == false is not anymore supported in maven 3"); + logger.println("[ERROR] uniqueVersion == false is not anymore supported in maven 3"); } else { - ((WrappedArtifactRepository) deploymentRepository).setUniqueVersion( false ); + ((WrappedArtifactRepository) deploymentRepository).setUniqueVersion(false); uniqueVersion = false; } } else { - ((WrappedArtifactRepository) deploymentRepository).setUniqueVersion( true ); + ((WrappedArtifactRepository) deploymentRepository).setUniqueVersion(true); } - Artifact main = mainArtifact.toArtifact(handlerManager,factory,parent); - if(!isPOM()) - main.addMetadata(new ProjectArtifactMetadata(main,pomArtifact.getFile(parent))); + Artifact main = mainArtifact.toArtifact(handlerManager, artifactFactory, parent); + if (!isPOM()) + main.addMetadata(new ProjectArtifactMetadata(main, pomArtifact.getFile(parent))); + + + ArtifactDeployer deployer = embedder.lookup(ArtifactDeployer.class, uniqueVersion ? "default" : "maven2"); + logger.println( + "[INFO] Deployment in " + deploymentRepository.getUrl() + "(id=" + deploymentRepository.getId() + ", uniqueVersion=" + deploymentRepository.isUniqueVersion()+")"); // deploy the main artifact. This also deploys the POM logger.println(Messages.MavenArtifact_DeployingMainArtifact(main.getFile().getName())); - - ArtifactDeployer deployer = embedder.lookup(ArtifactDeployer.class,uniqueVersion ? "default":"maven2"); - - deployer.deploy( main.getFile(), main, deploymentRepository, embedder.getLocalRepository() ); - - //deployMavenArtifact( main, deploymentRepository, embedder, uniqueVersion ); + deployer.deploy(main.getFile(), main, deploymentRepository, embedder.getLocalRepository()); for (MavenArtifact aa : attachedArtifacts) { - Artifact a = aa.toArtifact(handlerManager,factory, parent); - logger.println(Messages.MavenArtifact_DeployingAttachedArtifact(a.getFile().getName())); - deployer.deploy( a.getFile(), a, deploymentRepository, embedder.getLocalRepository() ); + Artifact a = aa.toArtifact(handlerManager, artifactFactory, parent); + logger.println(Messages.MavenArtifact_DeployingMainArtifact(a.getFile().getName())); + deployer.deploy(a.getFile(), a, deploymentRepository, embedder.getLocalRepository()); } } diff --git a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config.jelly b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config.jelly index d3cd0bb9bf..40ad9942bc 100644 --- a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config.jelly +++ b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config.jelly @@ -24,10 +24,10 @@ THE SOFTWARE. - - - + + + diff --git a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config_fr.properties b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config_fr.properties index 14803c54c1..aa7659d8c5 100644 --- a/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config_fr.properties +++ b/maven-plugin/src/main/resources/hudson/maven/RedeployPublisher/config_fr.properties @@ -21,5 +21,6 @@ # THE SOFTWARE. Repository\ URL=URL du repository -Repository\ ID=ID du repository -Assign\ unique\ versions\ to\ snapshots=Affecter des numéros de version uniques aux snapshots +Repository\ ID=Identifiant du repository +Assign\ unique\ versions\ to\ snapshots=Affecter des num\u00e9ros de version uniques aux snapshots +Deploy\ even\ if\ the\ build\ is\ unstable=D\u00e9ploiment\\ m\u00eame si\\ le\\ build est\\ instable. From a84188ec2b1d0d152bea9309b1cc5163721a8dd2 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Sat, 28 May 2011 16:02:22 +0200 Subject: [PATCH 54/91] Fixed JENKINS-9785 : option to run maven in headless mode to avoid boring dock icon to jump and take the focus on OSX --- changelog.html | 3 +++ .../maven/AbstractMavenProcessFactory.java | 19 ++++++++++++---- .../java/hudson/maven/MavenModuleSet.java | 15 +++++++++++++ .../MavenModuleSet/configure-entries.jelly | 4 +++- .../configure-entries_fr.properties | 22 ++++++++++++------- .../src/main/webapp/run-headless.html | 7 ++++++ .../src/main/webapp/run-headless_fr.html | 9 ++++++++ 7 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 maven-plugin/src/main/webapp/run-headless.html create mode 100644 maven-plugin/src/main/webapp/run-headless_fr.html diff --git a/changelog.html b/changelog.html index 955b806bb8..332d057b5b 100644 --- a/changelog.html +++ b/changelog.html @@ -68,6 +68,9 @@ Upcoming changes
  • Post-build deploy task for Maven jobs : Repositories definitions can now be read from the POMs. (issue 9786) +
  • + Run maven jobs as headless process. on OSX this avoid jumping Dock icon to take focus. + (issue 9785) diff --git a/maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java b/maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java index 42fe2fcde6..8c8c83b57f 100644 --- a/maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java +++ b/maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java @@ -1,10 +1,12 @@ package hudson.maven; import static hudson.Util.fixNull; + import hudson.AbortException; import hudson.EnvVars; import hudson.FilePath; import hudson.Launcher; +import hudson.Platform; import hudson.Proc; import hudson.maven.ProcessCache.NewProcess; import hudson.model.BuildListener; @@ -24,7 +26,6 @@ import hudson.slaves.Channels; import hudson.tasks.Maven.MavenInstallation; import hudson.tasks._maven.MavenConsoleAnnotator; import hudson.util.ArgumentListBuilder; - import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; @@ -37,8 +38,6 @@ import java.net.SocketTimeoutException; import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException; import java.util.Arrays; - -import org.jenkinsci.plugins.tokenmacro.TokenMacro; import org.kohsuke.stapler.framework.io.IOException2; /* @@ -274,7 +273,19 @@ public abstract class AbstractMavenProcessFactory } } - + + if (mms.runHeadless()) { + // Configure headless process + mavenOpts += " -Djava.awt.headless=true"; + } else { + if (Platform.isDarwin()) { + // Would be cool to replace the generic Java icon with jenkins logo, but requires + // the file absolute path to be available on slave *before* the process run on it :-/ + // Maybe we could enforce this from the DMG installer on OSX + // TODO mavenOpts += " -Xdock:name=Jenkins -Xdock:icon=jenkins.png"; + } + } + return envVars.expand(mavenOpts); } diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java b/maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java index fdd6ac4d02..ec8daec605 100644 --- a/maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java +++ b/maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java @@ -204,6 +204,12 @@ public final class MavenModuleSet extends AbstractMavenProject - + diff --git a/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries_fr.properties b/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries_fr.properties index f960dcf7e2..bb43380281 100644 --- a/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries_fr.properties +++ b/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/configure-entries_fr.properties @@ -21,16 +21,22 @@ # THE SOFTWARE. Alternate\ settings\ file=Fichier settings alternatif -Block\ build\ when\ dependency\ building=Bloquer le build pendant la construction des d\u00E9pendances +Block\ build\ when\ dependency\ building=Bloquer le build pendant la construction des d\u00e9pendances Build=Build -Incremental\ build\ -\ only\ build\ changed\ modules=Construction incr\u00E9mentale - ne faire la construction (build) que pour les modules chang\u00E9s +Incremental\ build\ -\ only\ build\ changed\ modules=Construction incr\u00e9mentale - ne faire la construction (build) que pour les modules chang\u00e9s Maven\ Version=Version de Maven Root\ POM=POM Racine -Build\ modules\ in\ parallel=Construire les modules en parallèle +Build\ modules\ in\ parallel=Construire les modules en parall\u00eale Build\ Settings=Configuration du build -Use\ private\ Maven\ repository=Utilise un repository Maven priv\u00E9 -Use\ private\ maven\ repository=Utiliser un repository Maven privé +Use\ private\ Maven\ repository=Utilise un repository Maven priv\u00e9 +Use\ private\ maven\ repository=Utiliser un repository Maven priv\u00e9 Goals\ and\ options=Goals et options -Maven\ Version.error.1=Jenkins a besoin de savoir où Maven2/3 est installé. -Maven\ Version.error.2=Veuillez le faire dans la configuration système. -Build\ whenever\ a\ SNAPSHOT\ dependency\ is\ built=Lance un build à chaque fois qu''une dépendance SNAPSHOT est construite +Maven\ Version.error.1=Jenkins a besoin de savoir o\u00f9 Maven2/3 est install\u00c8. +Maven\ Version.error.2=Veuillez le faire dans la configuration syst\u00cbme. +Build\ whenever\ a\ SNAPSHOT\ dependency\ is\ built=Lance un build \u00e0 chaque fois qu''une d\u00e9pendance SNAPSHOT est construite +Run\ Headless=Ex\u00e9cuter sans environnement graphique +Disable\ automatic\ artifact\ archiving=D\u00e9sactive l'achivage automatique des artefacts +Resolve\ Dependencies\ during\ Pom\ parsing=Effectue la r\u00e9solution de d\u00e9pendances pendant la lecture du POM +Process\ Plugins\ during\ Pom\ parsing=Analyse les plugins pendant la lecture du POM +Maven\ Validation\ Level=Niveau de validation du POM Maven +Goals=Goals diff --git a/maven-plugin/src/main/webapp/run-headless.html b/maven-plugin/src/main/webapp/run-headless.html new file mode 100644 index 0000000000..1bfd81792c --- /dev/null +++ b/maven-plugin/src/main/webapp/run-headless.html @@ -0,0 +1,7 @@ +
    +

    + If build doesn't requires access to desktop (only using command line tools and tests) this option can be checked. +

    + This option allow Jenkins to configure the build process in headless mode. Usefull on OSX to avoid boring Dock icon + to take focus, this option may also in future release be used to select slave adequate instance. +

    \ No newline at end of file diff --git a/maven-plugin/src/main/webapp/run-headless_fr.html b/maven-plugin/src/main/webapp/run-headless_fr.html new file mode 100644 index 0000000000..e95e0904a1 --- /dev/null +++ b/maven-plugin/src/main/webapp/run-headless_fr.html @@ -0,0 +1,9 @@ +
    +

    + Si le build ne né,cessite pas un accè à l'environnement graphique (s'il n'utilise que des outils + en ligne de commande) cette option peut être activŽe. +

    + Cette option permet à Jenkins de lancer le processus de build en mode 'headless'. Ceci est + particulièrement intéressant sur OSX pour éviter qu'une icône Java prenne le focus en sautillant + dans le Dock. Cette option pourrait à l'avenir servir à sélectionner un esclave adapté. +

    \ No newline at end of file From ba711bacddb8d9a00522400928e45840f287de8b Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 31 May 2011 16:03:23 +0200 Subject: [PATCH 55/91] test-harness desactivation tru a sys props --- test/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/pom.xml b/test/pom.xml index 5437c86319..8160118e27 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -182,6 +182,11 @@ THE SOFTWARE. run-test-harness + + + !skip-test-harness + + From b1926cfef088ea46165967fcd553ed221ad9ae6d Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 31 May 2011 16:10:41 +0200 Subject: [PATCH 56/91] add a simple file on how to build jenkins.war --- BUILDING.TXT | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 BUILDING.TXT diff --git a/BUILDING.TXT b/BUILDING.TXT new file mode 100644 index 0000000000..99b41980a3 --- /dev/null +++ b/BUILDING.TXT @@ -0,0 +1,6 @@ +If you want simply to have the jenkins.war as fast as possible (without test execution), just use : +mvn clean install -pl war -am -DskipTests +the war will be in war/target/jenkins.war (you can play with it) +You can desactivate test-harness execution with -Dskip-test-harness +Have Fun !! + From 045468259359b0243085a64ec49b3668fcc15272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20He=CC=81ritier?= Date: Wed, 1 Jun 2011 23:20:15 +0200 Subject: [PATCH 57/91] JENKINS-9786 : Update logs --- .../main/java/hudson/maven/reporters/MavenArtifactRecord.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java b/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java index 8c49e56baa..01d5be7862 100644 --- a/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java +++ b/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactRecord.java @@ -141,7 +141,7 @@ public class MavenArtifactRecord extends MavenAbstractArtifactRecord ArtifactDeployer deployer = embedder.lookup(ArtifactDeployer.class, uniqueVersion ? "default" : "maven2"); logger.println( - "[INFO] Deployment in " + deploymentRepository.getUrl() + "(id=" + deploymentRepository.getId() + ", uniqueVersion=" + deploymentRepository.isUniqueVersion()+")"); + "[INFO] Deployment in " + deploymentRepository.getUrl() + " (id=" + deploymentRepository.getId() + ",uniqueVersion=" + deploymentRepository.isUniqueVersion()+")"); // deploy the main artifact. This also deploys the POM logger.println(Messages.MavenArtifact_DeployingMainArtifact(main.getFile().getName())); From 16f6c7a3d54cddae756f30ce728703fd1bbd04ec Mon Sep 17 00:00:00 2001 From: Christoph Kutzinski Date: Thu, 2 Jun 2011 12:09:22 +0200 Subject: [PATCH 58/91] added @since tags for version and children fields --- .../src/main/java/hudson/maven/MavenModule.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModule.java b/maven-plugin/src/main/java/hudson/maven/MavenModule.java index 64ec69329a..24e82156c0 100644 --- a/maven-plugin/src/main/java/hudson/maven/MavenModule.java +++ b/maven-plugin/src/main/java/hudson/maven/MavenModule.java @@ -79,11 +79,13 @@ public final class MavenModule extends AbstractMavenProject POM element. * Used to determine parent/child relationship of modules. *

    - * For compatibility reason, this field may be null when loading data from old hudson. + * For compatibility reason, this field may be null when loading data from old hudson. + * + * @since 1.133 */ @CopyOnWrite private volatile List children; @@ -216,7 +220,7 @@ public final class MavenModule extends AbstractMavenProject deps = new HashSet(dependencies.size()); - for (Object d : (Set)dependencies) { + for (Object d : (Set)dependencies) { if (d instanceof ModuleDependency) { deps.add((ModuleDependency) d); } else { @@ -241,9 +245,10 @@ public final class MavenModule extends AbstractMavenProject * This method returns null if this information is not recorded. This happens * for compatibility reason. + * + * @since 1.133 */ public List getChildren() { List l = children; // take a snapshot From c297835ab7371756e092667b3556a957fd2801e2 Mon Sep 17 00:00:00 2001 From: Christoph Kutzinski Date: Thu, 2 Jun 2011 13:31:25 +0200 Subject: [PATCH 59/91] [FIXED JENKINS-9845] reduce memory consumption of dependency graph calculation: include maven dependencies with 'unknown' version only if needed. --- changelog.html | 3 ++ .../main/java/hudson/maven/MavenModule.java | 46 ++++++++++++++++--- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/changelog.html b/changelog.html index 332d057b5b..d57c2dec20 100644 --- a/changelog.html +++ b/changelog.html @@ -71,6 +71,9 @@ Upcoming changes

  • Run maven jobs as headless process. on OSX this avoid jumping Dock icon to take focus. (issue 9785) +
  • + Reduce memory consumption of dependency calculation in maven jobs. + (issue 9845) diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModule.java b/maven-plugin/src/main/java/hudson/maven/MavenModule.java index 24e82156c0..1262bfbd0d 100644 --- a/maven-plugin/src/main/java/hudson/maven/MavenModule.java +++ b/maven-plugin/src/main/java/hudson/maven/MavenModule.java @@ -392,22 +392,38 @@ public final class MavenModule extends AbstractMavenProject modules = new HashMap(); - // when we load old data that doesn't record version in dependency, we'd like - // to emulate the old behavior that it tries to identify the upstream by ignoring the version. - // do this by always putting groupId:artifactId:UNKNOWN to the modules list. - for (MavenModule m : Hudson.getInstance().getAllItems(MavenModule.class)) { if(m.isDisabled()) continue; ModuleDependency moduleDependency = m.asDependency(); modules.put(moduleDependency,m); - modules.put(moduleDependency.withUnknownVersion(),m); + if (hasDependenciesWithUnknownVersion) { + modules.put(moduleDependency.withUnknownVersion(),m); + } } data = new MavenDependencyComputationData(modules); + data.withUnknownVersions = hasDependenciesWithUnknownVersion; graph.putComputationalData(MavenDependencyComputationData.class, data); + } else { + if (hasDependenciesWithUnknownVersion && !data.withUnknownVersions) { + // found 'old' MavenModule: add dependencies with unknown versions now + for (MavenModule m : Hudson.getInstance().getAllItems(MavenModule.class)) { + if(m.isDisabled()) continue; + ModuleDependency moduleDependency = m.asDependency().withUnknownVersion(); + data.allModules.put(moduleDependency,m); + } + data.withUnknownVersions = true; + } } // In case two modules with the same name are defined, modules in the same MavenModuleSet @@ -424,7 +440,9 @@ public final class MavenModule extends AbstractMavenProject= 1.207. + */ + private boolean hasDependenciesWithUnknownVersion() { + for (ModuleDependency dep : dependencies) { + if (ModuleDependency.UNKNOWN.equals(dep.version)) { + return true; + } + } + return false; + } + private static class MavenDependencyComputationData { + boolean withUnknownVersions = false; Map allModules; //Map> modulesPerParent = new HashMap>(); From d5b8cf4a28ea41caf84528656f9b931695cb3fb5 Mon Sep 17 00:00:00 2001 From: Christoph Kutzinski Date: Thu, 2 Jun 2011 16:28:31 +0200 Subject: [PATCH 60/91] [FIXED JENKINS-9848] if POM parsing failed, do a full build next time (for incremental builds) --- changelog.html | 3 ++ .../hudson/maven/MavenModuleSetBuild.java | 29 +++++++++++++++---- .../hudson/maven/NeedsFullBuildAction.java | 24 +++++++++++++++ 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 maven-plugin/src/main/java/hudson/maven/NeedsFullBuildAction.java diff --git a/changelog.html b/changelog.html index d57c2dec20..e1978fd4ce 100644 --- a/changelog.html +++ b/changelog.html @@ -59,6 +59,9 @@ Upcoming changes Output correct version from java -jar jenkins.war --version (broken since 1.410)
  • Correct usage text from java -jar jenkins.war --help +
  • + Incremental maven jobs: if POM parsing failed, do a full build next time. + (issue 9848)
  • CLI command page now lists all the available commands (issue 9789) diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java index 32c11ab083..e780f88c61 100644 --- a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java +++ b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java @@ -374,7 +374,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild getModuleLastBuilds() { @@ -672,6 +672,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild= 0; - if (project.isIncrementalBuild() && maven2_1orLater && !changedModules.isEmpty()) { + boolean needsFullBuild = getPreviousCompletedBuild() != null && + getPreviousCompletedBuild().getAction(NeedsFullBuildAction.class) != null; + if (project.isIncrementalBuild() && !needsFullBuild && maven2_1orLater && !changedModules.isEmpty()) { margs.add("-amd"); margs.add("-pl", Util.join(changedModules, ",")); } @@ -816,12 +823,22 @@ public class MavenModuleSetBuild extends AbstractMavenBuild Date: Fri, 3 Jun 2011 15:34:03 +0100 Subject: [PATCH 61/91] RemoteClassLoader is not honoring the classloader that's passed to the Channel contructor --- remoting/src/main/java/hudson/remoting/Channel.java | 6 ++++++ .../main/java/hudson/remoting/ImportedClassLoaderTable.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/remoting/src/main/java/hudson/remoting/Channel.java b/remoting/src/main/java/hudson/remoting/Channel.java index 4520930b33..c9a42aafa1 100644 --- a/remoting/src/main/java/hudson/remoting/Channel.java +++ b/remoting/src/main/java/hudson/remoting/Channel.java @@ -238,6 +238,11 @@ public class Channel implements VirtualChannel, IChannel { /*package*/ final ExecutorService pipeWriter; + /** + * ClassLaoder that remote classloaders should use as the basis. + */ + /*package*/ final ClassLoader baseClassLoader; + /** * Communication mode. * @since 1.161 @@ -356,6 +361,7 @@ public class Channel implements VirtualChannel, IChannel { if (base==null) base = getClass().getClassLoader(); + this.baseClassLoader = base; if(export(this,false)!=1) throw new AssertionError(); // export number 1 is reserved for the channel itself diff --git a/remoting/src/main/java/hudson/remoting/ImportedClassLoaderTable.java b/remoting/src/main/java/hudson/remoting/ImportedClassLoaderTable.java index c05acf2197..6fd5a38b67 100644 --- a/remoting/src/main/java/hudson/remoting/ImportedClassLoaderTable.java +++ b/remoting/src/main/java/hudson/remoting/ImportedClassLoaderTable.java @@ -54,7 +54,7 @@ final class ImportedClassLoaderTable { if(r==null) { // we need to be able to use the same hudson.remoting classes, hence delegate // to this class loader. - r = RemoteClassLoader.create(getClass().getClassLoader(),classLoaderProxy); + r = RemoteClassLoader.create(channel.baseClassLoader,classLoaderProxy); classLoaders.put(classLoaderProxy,r); } return r; From 902cc4e1dda4fe3f418b4dc47279016e90cbaeec Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Fri, 3 Jun 2011 16:10:18 +0100 Subject: [PATCH 62/91] Added an extension point to allow prodding the NodeProvisioner into taking action faster than it might usually. --- changelog.html | 2 ++ .../java/hudson/slaves/NodeProvisioner.java | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/changelog.html b/changelog.html index 5ac34cc3f1..9cef01f641 100644 --- a/changelog.html +++ b/changelog.html @@ -80,6 +80,8 @@ Upcoming changes
  • Strongly encrypt proxy credentials (issue 4002) +
  • + Added an extension point to allow prodding the NodeProvisioner into taking action faster than it might usually. diff --git a/core/src/main/java/hudson/slaves/NodeProvisioner.java b/core/src/main/java/hudson/slaves/NodeProvisioner.java index 26f111be19..c72091a973 100644 --- a/core/src/main/java/hudson/slaves/NodeProvisioner.java +++ b/core/src/main/java/hudson/slaves/NodeProvisioner.java @@ -23,6 +23,7 @@ */ package hudson.slaves; +import hudson.model.Computer; import hudson.model.LoadStatistics; import hudson.model.Node; import hudson.model.Hudson; @@ -41,6 +42,7 @@ import java.util.List; import java.util.Collection; import java.util.ArrayList; import java.util.Iterator; +import java.util.concurrent.TimeUnit; import java.util.logging.Logger; import java.util.logging.Level; import java.io.IOException; @@ -87,6 +89,8 @@ public class NodeProvisioner { private List pendingLaunches = new ArrayList(); + private transient volatile long lastSuggestedReview; + /** * Exponential moving average of the "planned capacity" over time, which is the number of * additional executors being brought up. @@ -113,11 +117,29 @@ public class NodeProvisioner { return new ArrayList(pendingLaunches); } + /** + * Give the {@link NodeProvisioner} a hint that now would be a good time to think about provisioning some nodes. + * The hint will be ignored if subjected to excessive pestering by callers. + * + * @since 1.415 + */ + public void suggestReviewNow() { + if (System.currentTimeMillis() > lastSuggestedReview + TimeUnit.SECONDS.toMillis(1)) { + lastSuggestedReview = System.currentTimeMillis(); + Computer.threadPoolForRemoting.submit(new Runnable() { + public void run() { + update(); + } + }); + } + } + /** * Periodically invoked to keep track of the load. * Launches additional nodes if necessary. */ private synchronized void update() { + lastSuggestedReview = System.currentTimeMillis(); Hudson hudson = Hudson.getInstance(); // clean up the cancelled launch activity, then count the # of executors that we are about to bring up. From bfb7bd4ba442774ea8d7ec5e862c9cb1ccc12837 Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Fri, 3 Jun 2011 16:15:24 +0100 Subject: [PATCH 63/91] When there are absolutely no executors for a specific label, there was an unnecessary delay in provisioning the first node for that label --- changelog.html | 5 ++++- .../main/java/hudson/slaves/NodeProvisioner.java | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/changelog.html b/changelog.html index 9cef01f641..8d8b5fc982 100644 --- a/changelog.html +++ b/changelog.html @@ -81,7 +81,10 @@ Upcoming changes Strongly encrypt proxy credentials (issue 4002)
  • - Added an extension point to allow prodding the NodeProvisioner into taking action faster than it might usually. + Added an extension point to allow prodding the NodeProvisioner into taking action faster than it might usually. +
  • + When there are absolutely no executors for a specific label, there was an unnecessary delay in provisioning the + first node for that label. diff --git a/core/src/main/java/hudson/slaves/NodeProvisioner.java b/core/src/main/java/hudson/slaves/NodeProvisioner.java index c72091a973..7c6a955958 100644 --- a/core/src/main/java/hudson/slaves/NodeProvisioner.java +++ b/core/src/main/java/hudson/slaves/NodeProvisioner.java @@ -143,7 +143,7 @@ public class NodeProvisioner { Hudson hudson = Hudson.getInstance(); // clean up the cancelled launch activity, then count the # of executors that we are about to bring up. - float plannedCapacity = 0; + int plannedCapacitySnapshot = 0; for (Iterator itr = pendingLaunches.iterator(); itr.hasNext();) { PlannedNode f = itr.next(); if(f.future.isDone()) { @@ -159,8 +159,9 @@ public class NodeProvisioner { } itr.remove(); } else - plannedCapacity += f.numExecutors; + plannedCapacitySnapshot += f.numExecutors; } + float plannedCapacity = plannedCapacitySnapshot; plannedCapacitiesEMA.update(plannedCapacity); /* @@ -197,8 +198,9 @@ public class NodeProvisioner { int idleSnapshot = stat.computeIdleExecutors(); int totalSnapshot = stat.computeTotalExecutors(); + boolean needSomeWhenNoneAtAll = ((totalSnapshot + plannedCapacity) == 0) && (stat.computeQueueLength() > 0); float idle = Math.max(stat.getLatestIdleExecutors(TIME_SCALE), idleSnapshot); - if(idle1-m) {// and there's more work to do... LOGGER.fine("Excess workload "+excessWorkload+" detected. (planned capacity="+plannedCapacity+",Qlen="+qlen+",idle="+idle+"&"+idleSnapshot+",total="+totalSnapshot+"m,="+m+")"); From eb0c005a3b3b44f7abaf61d7235f3f89435e53a5 Mon Sep 17 00:00:00 2001 From: Seiji Sogabe Date: Sat, 4 Jun 2011 02:32:37 +0900 Subject: [PATCH 64/91] Updated ja. --- .../main/resources/hudson/model/Messages_ja.properties | 3 ++- .../hudson/widgets/HistoryWidget/index_ja.properties | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/hudson/model/Messages_ja.properties b/core/src/main/resources/hudson/model/Messages_ja.properties index dca1655ec8..d5ee4cc871 100644 --- a/core/src/main/resources/hudson/model/Messages_ja.properties +++ b/core/src/main/resources/hudson/model/Messages_ja.properties @@ -1,6 +1,6 @@ # The MIT License # -# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman +# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -201,6 +201,7 @@ UpdateCenter.PluginCategory.buildwrapper=\u30d3\u30eb\u30c9\u30e9\u30c3\u30d1\u3 UpdateCenter.PluginCategory.cli=\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9 UpdateCenter.PluginCategory.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u7ba1\u7406/\u5206\u6563\u30d3\u30eb\u30c9 UpdateCenter.PluginCategory.external=\u5916\u90e8\u30b5\u30a4\u30c8/\u30c4\u30fc\u30eb\u3068\u306e\u9023\u643a +UpdateCenter.PluginCategory.listview-column=\u30ea\u30b9\u30c8\u30d3\u30e5\u30fc\u30ab\u30e9\u30e0 UpdateCenter.PluginCategory.maven=Maven UpdateCenter.PluginCategory.misc=\u305d\u306e\u4ed6 UpdateCenter.PluginCategory.notifier=\u30d3\u30eb\u30c9\u901a\u77e5 diff --git a/core/src/main/resources/hudson/widgets/HistoryWidget/index_ja.properties b/core/src/main/resources/hudson/widgets/HistoryWidget/index_ja.properties index 021ad93627..37ba0dcc1d 100644 --- a/core/src/main/resources/hudson/widgets/HistoryWidget/index_ja.properties +++ b/core/src/main/resources/hudson/widgets/HistoryWidget/index_ja.properties @@ -1,6 +1,6 @@ # The MIT License # -# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman +# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -trend=\u50BE\u5411 -for\ all=\u5168\u30D3\u30EB\u30C9 -for\ failures=\u5931\u6557\u30D3\u30EB\u30C9 +trend=\u63a8\u79fb +for\ all=\u5168\u30d3\u30eb\u30c9 +for\ failures=\u5931\u6557\u30d3\u30eb\u30c9 More\ ...=\u3082\u3063\u3068 ... \ No newline at end of file From d24afe997c1ddcc5a0d631428d4735e1d4f9d640 Mon Sep 17 00:00:00 2001 From: Seiji Sogabe Date: Sat, 4 Jun 2011 03:10:16 +0900 Subject: [PATCH 65/91] Updated env_vars.html. jenkins!! --- war/src/main/webapp/env-vars.html | 11 +++++++---- war/src/main/webapp/env-vars_de.html | 11 +++++++---- war/src/main/webapp/env-vars_fr.html | 7 +++++-- war/src/main/webapp/env-vars_ja.html | 18 ++++++++++-------- war/src/main/webapp/env-vars_nl.html | 7 +++++-- war/src/main/webapp/env-vars_tr.html | 9 ++++++--- 6 files changed, 40 insertions(+), 23 deletions(-) diff --git a/war/src/main/webapp/env-vars.html b/war/src/main/webapp/env-vars.html index 3306209609..12452f3635 100644 --- a/war/src/main/webapp/env-vars.html +++ b/war/src/main/webapp/env-vars.html @@ -19,7 +19,7 @@
    Name of the project of this build, such as "foo"
    BUILD_TAG
    -
    String of "hudson-${JOB_NAME}-${BUILD_NUMBER}". Convenient to put into +
    String of "jenkins-${JOB_NAME}-${BUILD_NUMBER}". Convenient to put into a resource file, a jar file, etc for easier identification.
    EXECUTOR_NUMBER
    @@ -45,11 +45,14 @@
    HUDSON_URL
    Full URL of Hudson, like http://server:port/hudson/
    +
    JENKINS_URL
    +
    Full URL of Jenkins, like http://server:port/jenkins/
    +
    BUILD_URL
    -
    Full URL of this build, like http://server:port/hudson/job/foo/15/
    +
    Full URL of this build, like http://server:port/jenkins/job/foo/15/
    JOB_URL
    -
    Full URL of this job, like http://server:port/hudson/job/foo/
    +
    Full URL of this job, like http://server:port/jenkins/job/foo/
    SVN_REVISION
    For Subversion-based projects, this variable contains the revision number of the module.
    @@ -61,7 +64,7 @@

    -To understand how environmental variables provided by Hudson can be utilized by +To understand how environmental variables provided by Jenkins can be utilized by Ant, study the following target:

    Projektname des Builds, z.B. "foo".</dd>
     
         <dt>BUILD_TAG</dt>
    -    <dd>Eine Zeichenkette in der Form "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>".
    +    <dd>Eine Zeichenkette in der Form "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>".
             Diese Variable läßt sich sehr bequem zur späteren Identifikation in eine
             Resource-Datei, JAR-Datei usw. ablegen.
     
    @@ -43,11 +43,14 @@
         <dt>HUDSON_URL</dt>
         <dd>Die absolute URL der Hudson-Instanz, z.B. <tt>http://server:port/hudson/</tt>.</dd>
     
    +    <dt>JENKINS_URL</dt>
    +    <dd>Die absolute URL der Jenkins-Instanz, z.B. <tt>http://server:port/jenkins/</tt>.</dd>
    +
         <dt>BUILD_URL</dt>
    -    <dd>Die absolute URL dieses Builds, z.B. <tt>http://server:port/hudson/job/foo/15/</tt>.</dd>
    +    <dd>Die absolute URL dieses Builds, z.B. <tt>http://server:port/jenkins/job/foo/15/</tt>.</dd>
     
         <dt>JOB_URL</dt>
    -    <dd>Die absolute URL dieses Jobs, z.B. <tt>http://server:port/hudson/job/foo/</tt>.</dd>
    +    <dd>Die absolute URL dieses Jobs, z.B. <tt>http://server:port/jenkins/job/foo/</tt>.</dd>
     
         <dt>SVN_REVISION</dt>
         <dd>Bei Subversion-basierten Projekten enthält diese Variable die Revisionsnummer
    @@ -61,7 +64,7 @@
     
     
     <p>
    -Das folgende Beispiel zeigt, wie von Hudson bereitgestellte Umgebungsvariablen
    +Das folgende Beispiel zeigt, wie von Jenkins bereitgestellte Umgebungsvariablen
     in Ant-Skripten verwendet werden können: 
     
     <pre><xmp
    diff --git a/war/src/main/webapp/env-vars_fr.html b/war/src/main/webapp/env-vars_fr.html
    index 352bf18a26..964d488406 100644
    --- a/war/src/main/webapp/env-vars_fr.html
    +++ b/war/src/main/webapp/env-vars_fr.html
    @@ -19,7 +19,7 @@
         <dd>Nom du projet de ce build, par exemple "foo"</dd>
     
         <dt>BUILD_TAG</dt>
    -    <dd>Le texte "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>", facile à placer dans
    +    <dd>Le texte "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>", facile à placer dans
         un fichier de ressource, ou un jar, pour identification future.</dd>
     
         <dt>EXECUTOR_NUMBER</dt>
    @@ -40,6 +40,9 @@
         <dt>HUDSON_URL</dt>
         <dd>L'URL complète de Hudson, au format <tt>http://server:port/hudson/</tt></dd>
     
    +    <dt>JENKINS_URL</dt>
    +    <dd>L'URL complète de Jenkins, au format <tt>http://server:port/jenkins/</tt></dd>
    +
         <dt>SVN_REVISION</dt>
         <dd>Pour les projets utilisant Subversion, cette variable contient le numéro de révision du module.</dd>
     
    @@ -51,7 +54,7 @@
     
     
     <p>
    -Pour comprendre comment les variables d'environnement fournies par Hudson peuvent être utilisées
    +Pour comprendre comment les variables d'environnement fournies par Jenkins peuvent être utilisées
     par Ant, consultez le résultat de la target Ant suivante:
     
     <pre><xmp
    diff --git a/war/src/main/webapp/env-vars_ja.html b/war/src/main/webapp/env-vars_ja.html
    index f3172ea560..1ed23f1c86 100644
    --- a/war/src/main/webapp/env-vars_ja.html
    +++ b/war/src/main/webapp/env-vars_ja.html
    @@ -19,13 +19,12 @@
         <dd>ビルドのプロジェクト名。例 "foo"</dd>
     
         <dt>BUILD_TAG</dt>
    -    <dd>文字列 "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>"。
    +    <dd>文字列 "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>"。
     	    簡易な識別子として、リソースファイルやjarファイルなどに付与するのに便利です。</dd>
     
         <dt>EXECUTOR_NUMBER</dt>
    -    <dd>
    -	    このビルドを実行している現在のエグゼキューターを識別する(同一マシンの中で)ユニークな番号。
    -		"ビルド実行状態"に表示されている数字ですが、1ではなく0から始まる数字です。
    +    <dd>このビルドを実行している現在のエグゼキューターを識別する(同一マシンの中で)ユニークな番号。
    +            "ビルド実行状態"に表示されている数字ですが、1ではなく0から始まる数字です。
     
         <dt>JAVA_HOME</dt>
         <dd>特定のJDKを使用するようにジョブを設定する場合、そのJDKのJAVA_HOMEをこの変数に設定します。
    @@ -37,11 +36,14 @@
         <dt>HUDSON_URL</dt>
         <dd>HudsonのURL。例 <tt>http://server:port/hudson/</tt></dd>
     
    -    <dt>BUILD_URL</dt>
    -    <dd>このビルドのURL。 例 <tt>http://server:port/hudson/job/foo/15/</tt></dd>
    +    <dt>JENKINS_URL</dt>
    +    <dd>JenkinsのURL。例 <tt>http://server:port/jenkins/</tt></dd>
    +
    +<dt>BUILD_URL</dt>
    +    <dd>このビルドのURL。 例 <tt>http://server:port/jenkins/job/foo/15/</tt></dd>
     
         <dt>JOB_URL</dt>
    -    <dd>このジョブのURL。 例 <tt>http://server:port/hudson/job/foo/</tt></dd>
    +    <dd>このジョブのURL。 例 <tt>http://server:port/jenkins/job/foo/</tt></dd>
     
         <dt>SVN_REVISION</dt>
         <dd>Subversionを使用するプロジェクトにおける、モジュールのリビジョン番号。</dd>
    @@ -53,7 +55,7 @@
     
     
     <p>
    -Hudsonが提供する環境変数のAntでの利用方法については、
    +Jenkinsが提供する環境変数のAntでの利用方法については、
     次のtargetを参考にしてください。
     
     <pre><xmp
    diff --git a/war/src/main/webapp/env-vars_nl.html b/war/src/main/webapp/env-vars_nl.html
    index 0ffebe9cdb..a714813edd 100644
    --- a/war/src/main/webapp/env-vars_nl.html
    +++ b/war/src/main/webapp/env-vars_nl.html
    @@ -19,7 +19,7 @@
         <dd>Naam van het project dat gebouwd wordt door deze bouwpoging, v.b. "foo"</dd>
     
         <dt>BUILD_TAG</dt>
    -    <dd>Het label :"hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Dit label is typisch handig om
    +    <dd>Het label :"jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Dit label is typisch handig om
             ter identificatie op te nemen in een "resource"-bestand, archieven (zoals jar,war,ear,...), ... .
         </dd>
     
    @@ -42,7 +42,10 @@
         <dt>HUDSON_URL</dt>
         <dd>Volledige URL voor Hudson, v.b. <tt>http://server:port/hudson/</tt></dd>
     
    -    <dt>SVN_REVISION</dt>
    +    <dt>JENKINS_URL</dt>
    +    <dd>Volledige URL voor Jenkins, v.b. <tt>http://server:port/jenkins/</tt></dd>
    +
    +<dt>SVN_REVISION</dt>
         <dd>Voor Suversion gebaseerde projecten, bevat deze parameter het versienummer van de module.</dd>
     
         <dt>CVS_BRANCH</dt>
    diff --git a/war/src/main/webapp/env-vars_tr.html b/war/src/main/webapp/env-vars_tr.html
    index 41eb5ecd18..ee625bd07d 100644
    --- a/war/src/main/webapp/env-vars_tr.html
    +++ b/war/src/main/webapp/env-vars_tr.html
    @@ -19,7 +19,7 @@
         <dd>Name of the project of this build, such as "foo"</dd>
     
         <dt>BUILD_TAG</dt>
    -    <dd>String of "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Convenient to put into
    +    <dd>String of "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Convenient to put into
             a resource file, a jar file, etc for easier identification.</dd>
     
         <dt>EXECUTOR_NUMBER</dt>
    @@ -39,7 +39,10 @@
         <dt>HUDSON_URL</dt>
         <dd>Full URL of Hudson, like <tt>http://server:port/hudson/</tt></dd>
     
    -    <dt>SVN_REVISION</dt>
    +    <dt>JENKINS_URL</dt>
    +    <dd>Full URL of Jenkins, like <tt>http://server:port/jenkins/</tt></dd>
    +
    +<dt>SVN_REVISION</dt>
         <dd>For Subversion-based projects, this variable contains the revision number of the module.</dd>
     
         <dt>CVS_BRANCH</dt>
    @@ -49,7 +52,7 @@
     
     
     <p>
    -To understand how environmental variables provided by Hudson can be utilized by
    +To understand how environmental variables provided by Jenkins can be utilized by
     Ant, study the following target:
     
     <pre><xmp
    
    From 495779d4ca7d04179d7e34c9624c0387d3d340c9 Mon Sep 17 00:00:00 2001
    From: bap2000 <bap-git@a1.org.uk>
    Date: Fri, 3 Jun 2011 20:28:26 +0100
    Subject: [PATCH 66/91] [FIXED JENKINS-4000] [FIXED JENKINS-4002] Add fix to
     changelog
    
    ---
     changelog.html | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/changelog.html b/changelog.html
    index 8d8b5fc982..a1d4efaa1e 100644
    --- a/changelog.html
    +++ b/changelog.html
    @@ -62,6 +62,9 @@ Upcoming changes</a>
       <li class=bug>
         Incremental maven jobs: if POM parsing failed, do a full build next time.
         (<a href="http://issues.jenkins-ci.org/browse/JENKINS-9848">issue 9848</a>)
    +  <li class=bug>
    +    Do not expose the proxy password in the HTML for Update Center
    +    (<a href="http://issues.jenkins-ci.org/browse/JENKINS-4000">issue 4000</a>)
       <li class=rfe>
         CLI command page now lists all the available commands
         (<a href="http://issues.jenkins-ci.org/browse/JENKINS-9789">issue 9789</a>)
    @@ -78,7 +81,7 @@ Upcoming changes</a>
         Reduce memory consumption of dependency calculation in maven jobs.
         (<a href="http://issues.jenkins-ci.org/browse/JENKINS-9845">issue 9845</a>)
       <li class=rfe>
    -    Strongly encrypt proxy credentials
    +    Strongly encrypt the proxy password
         (<a href="http://issues.jenkins-ci.org/browse/JENKINS-4002">issue 4002</a>)
       <li class=rfe>
         Added an extension point to allow prodding the NodeProvisioner into taking action faster than it might usually.
    
    From 4c3393195a898d758612ff340d5ae5f0899f692b Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 10:16:16 -0700
    Subject: [PATCH 67/91] [maven-release-plugin] prepare release jenkins-1_414
    
    ---
     cli/pom.xml               | 2 +-
     core/pom.xml              | 2 +-
     maven-plugin/pom.xml      | 2 +-
     pom.xml                   | 2 +-
     remoting/pom.xml          | 2 +-
     test/pom.xml              | 2 +-
     ui-samples-plugin/pom.xml | 2 +-
     war/pom.xml               | 2 +-
     8 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/cli/pom.xml b/cli/pom.xml
    index 2c1401d549..425b3ca1a5 100644
    --- a/cli/pom.xml
    +++ b/cli/pom.xml
    @@ -4,7 +4,7 @@
       <parent>
         <artifactId>pom</artifactId>
         <groupId>org.jenkins-ci.main</groupId>
    -    <version>1.414-SNAPSHOT</version>
    +    <version>1.414</version>
       </parent>
       <artifactId>cli</artifactId>
       <name>Jenkins CLI</name>
    diff --git a/core/pom.xml b/core/pom.xml
    index c33818e1cc..bb5f493f19 100644
    --- a/core/pom.xml
    +++ b/core/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414-SNAPSHOT</version>
    +    <version>1.414</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
     
    diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml
    index d144057803..2016725d00 100644
    --- a/maven-plugin/pom.xml
    +++ b/maven-plugin/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414-SNAPSHOT</version>
    +    <version>1.414</version>
       </parent>
     
       <artifactId>maven-plugin</artifactId>
    diff --git a/pom.xml b/pom.xml
    index 98516d2d93..5a593a8a24 100644
    --- a/pom.xml
    +++ b/pom.xml
    @@ -32,7 +32,7 @@ THE SOFTWARE.
       
       <groupId>org.jenkins-ci.main</groupId>
       <artifactId>pom</artifactId>
    -  <version>1.414-SNAPSHOT</version>
    +  <version>1.414</version>
       <packaging>pom</packaging>
       
       <name>Jenkins main module</name>
    diff --git a/remoting/pom.xml b/remoting/pom.xml
    index 81e0e3c51a..b1410b9496 100644
    --- a/remoting/pom.xml
    +++ b/remoting/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414-SNAPSHOT</version>
    +    <version>1.414</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
       
    diff --git a/test/pom.xml b/test/pom.xml
    index 733068c14e..e44e4dc2b9 100644
    --- a/test/pom.xml
    +++ b/test/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <artifactId>pom</artifactId>
         <groupId>org.jenkins-ci.main</groupId>
    -    <version>1.414-SNAPSHOT</version>
    +    <version>1.414</version>
       </parent>
       <modelVersion>4.0.0</modelVersion>
       <groupId>org.jenkins-ci.main</groupId>
    diff --git a/ui-samples-plugin/pom.xml b/ui-samples-plugin/pom.xml
    index 556211859a..5bc9fd0259 100644
    --- a/ui-samples-plugin/pom.xml
    +++ b/ui-samples-plugin/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414-SNAPSHOT</version>
    +    <version>1.414</version>
       </parent>
     
       <artifactId>ui-samples-plugin</artifactId>
    diff --git a/war/pom.xml b/war/pom.xml
    index 11528ecaa5..74d2acc15a 100644
    --- a/war/pom.xml
    +++ b/war/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414-SNAPSHOT</version>
    +    <version>1.414</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
       
    
    From a8f97160851e65150e3212b5db14ef1f06c162ee Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 10:16:31 -0700
    Subject: [PATCH 68/91] [maven-release-plugin] prepare for next development
     iteration
    
    ---
     cli/pom.xml               | 2 +-
     core/pom.xml              | 2 +-
     maven-plugin/pom.xml      | 2 +-
     pom.xml                   | 2 +-
     remoting/pom.xml          | 2 +-
     test/pom.xml              | 2 +-
     ui-samples-plugin/pom.xml | 2 +-
     war/pom.xml               | 2 +-
     8 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/cli/pom.xml b/cli/pom.xml
    index 425b3ca1a5..60876efd7b 100644
    --- a/cli/pom.xml
    +++ b/cli/pom.xml
    @@ -4,7 +4,7 @@
       <parent>
         <artifactId>pom</artifactId>
         <groupId>org.jenkins-ci.main</groupId>
    -    <version>1.414</version>
    +    <version>1.415-SNAPSHOT</version>
       </parent>
       <artifactId>cli</artifactId>
       <name>Jenkins CLI</name>
    diff --git a/core/pom.xml b/core/pom.xml
    index bb5f493f19..48920c6bb7 100644
    --- a/core/pom.xml
    +++ b/core/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414</version>
    +    <version>1.415-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
     
    diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml
    index 2016725d00..8047696cc8 100644
    --- a/maven-plugin/pom.xml
    +++ b/maven-plugin/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414</version>
    +    <version>1.415-SNAPSHOT</version>
       </parent>
     
       <artifactId>maven-plugin</artifactId>
    diff --git a/pom.xml b/pom.xml
    index 5a593a8a24..8b76bb1f10 100644
    --- a/pom.xml
    +++ b/pom.xml
    @@ -32,7 +32,7 @@ THE SOFTWARE.
       
       <groupId>org.jenkins-ci.main</groupId>
       <artifactId>pom</artifactId>
    -  <version>1.414</version>
    +  <version>1.415-SNAPSHOT</version>
       <packaging>pom</packaging>
       
       <name>Jenkins main module</name>
    diff --git a/remoting/pom.xml b/remoting/pom.xml
    index b1410b9496..f3cb2d65d3 100644
    --- a/remoting/pom.xml
    +++ b/remoting/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414</version>
    +    <version>1.415-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
       
    diff --git a/test/pom.xml b/test/pom.xml
    index e44e4dc2b9..9577adaa42 100644
    --- a/test/pom.xml
    +++ b/test/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <artifactId>pom</artifactId>
         <groupId>org.jenkins-ci.main</groupId>
    -    <version>1.414</version>
    +    <version>1.415-SNAPSHOT</version>
       </parent>
       <modelVersion>4.0.0</modelVersion>
       <groupId>org.jenkins-ci.main</groupId>
    diff --git a/ui-samples-plugin/pom.xml b/ui-samples-plugin/pom.xml
    index 5bc9fd0259..46d5896ad7 100644
    --- a/ui-samples-plugin/pom.xml
    +++ b/ui-samples-plugin/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414</version>
    +    <version>1.415-SNAPSHOT</version>
       </parent>
     
       <artifactId>ui-samples-plugin</artifactId>
    diff --git a/war/pom.xml b/war/pom.xml
    index 74d2acc15a..ae1dcef118 100644
    --- a/war/pom.xml
    +++ b/war/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.414</version>
    +    <version>1.415-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
       
    
    From 3ccadad5da3f63034b35351cc1f6376000c03c6d Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 10:33:14 -0700
    Subject: [PATCH 69/91] updated changelog for release
    
    ---
     changelog.html | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/changelog.html b/changelog.html
    index 1af5f229cd..18eedad723 100644
    --- a/changelog.html
    +++ b/changelog.html
    @@ -61,7 +61,10 @@ Upcoming changes</a>
     
     <!-- these changes are controlled by the release process. DO NOT MODIFY -->
     <div id="rc" style="display:none;"><!--=BEGIN=-->
    -<h3><a name=v1.414>What's new in 1.414</a> <!--=DATE=--></h3>
    +<h3><a name=v1.415>What's new in 1.415</a> <!--=DATE=--></h3>
    +<!--=RC-CHANGES=-->
    +</div><!--=END=-->
    +<h3><a name=v1.414>What's new in 1.414</a> (2011/06/04)</h3>
     <ul class=image>
       <li class=bug>
         Fixed the concurrent modification exception in classloading during startup
    @@ -89,7 +92,6 @@ Upcoming changes</a>
         Log which build steps have changed the build result to build console.
         (<a href="http://issues.jenkins-ci.org/browse/JENKINS-9687">issue 9687</a>)
     </ul>
    -</div><!--=END=-->
     <h3><a name=v1.413>What's new in 1.413</a> (2011/05/22)</h3>
     <ul class=image>
       <li class=bug>
    
    From 5ce7083a1abcc987045f2f8ae00e1b2e3fa290fc Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 10:33:15 -0700
    Subject: [PATCH 70/91] releasing a new plugin parent POM
    
    ---
     plugins/pom.xml | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/plugins/pom.xml b/plugins/pom.xml
    index 174f80e361..db6a34511a 100644
    --- a/plugins/pom.xml
    +++ b/plugins/pom.xml
    @@ -10,7 +10,7 @@
       <groupId>org.jenkins-ci.plugins</groupId>
       <artifactId>plugin</artifactId>
       <name>Jenkins plugin POM</name>
    -  <version>1.414-SNAPSHOT</version>
    +  <version>1.414</version>
       <packaging>pom</packaging>
     
       <!--
    @@ -33,7 +33,7 @@
           <dependency><!-- if a plugin wants to depend on the maven plugin, choose the right version automatically -->
             <groupId>org.jenkins-ci.main</groupId>
             <artifactId>maven-plugin</artifactId>
    -        <version>1.414-SNAPSHOT</version>
    +        <version>1.414</version>
           </dependency>
         </dependencies>
       </dependencyManagement>
    @@ -43,25 +43,25 @@
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-war</artifactId>
           <type>war</type>
    -      <version>1.414-SNAPSHOT</version>
    +      <version>1.414</version>
           <scope>test</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-core</artifactId>
    -      <version>1.414-SNAPSHOT</version>
    +      <version>1.414</version>
           <scope>provided</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-test-harness</artifactId>
    -      <version>1.414-SNAPSHOT</version>
    +      <version>1.414</version>
           <scope>test</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>ui-samples-plugin</artifactId>
    -      <version>1.414-SNAPSHOT</version>
    +      <version>1.414</version>
           <scope>test</scope>
         </dependency>
         <dependency>
    
    From 917f3c2a0bc90f1a515b52330c01ab09cfc86bec Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 10:33:21 -0700
    Subject: [PATCH 71/91] toward the next release
    
    ---
     plugins/pom.xml | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/plugins/pom.xml b/plugins/pom.xml
    index db6a34511a..d1ab491b2b 100644
    --- a/plugins/pom.xml
    +++ b/plugins/pom.xml
    @@ -10,7 +10,7 @@
       <groupId>org.jenkins-ci.plugins</groupId>
       <artifactId>plugin</artifactId>
       <name>Jenkins plugin POM</name>
    -  <version>1.414</version>
    +  <version>1.415-SNAPSHOT</version>
       <packaging>pom</packaging>
     
       <!--
    @@ -33,7 +33,7 @@
           <dependency><!-- if a plugin wants to depend on the maven plugin, choose the right version automatically -->
             <groupId>org.jenkins-ci.main</groupId>
             <artifactId>maven-plugin</artifactId>
    -        <version>1.414</version>
    +        <version>1.415-SNAPSHOT</version>
           </dependency>
         </dependencies>
       </dependencyManagement>
    @@ -43,25 +43,25 @@
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-war</artifactId>
           <type>war</type>
    -      <version>1.414</version>
    +      <version>1.415-SNAPSHOT</version>
           <scope>test</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-core</artifactId>
    -      <version>1.414</version>
    +      <version>1.415-SNAPSHOT</version>
           <scope>provided</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-test-harness</artifactId>
    -      <version>1.414</version>
    +      <version>1.415-SNAPSHOT</version>
           <scope>test</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>ui-samples-plugin</artifactId>
    -      <version>1.414</version>
    +      <version>1.415-SNAPSHOT</version>
           <scope>test</scope>
         </dependency>
         <dependency>
    
    From d2f90ceca2935b3c63afacc9e87614cbace40a76 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 10:37:20 -0700
    Subject: [PATCH 72/91] updated changelog as a part of the release
    
    ---
     debian/debian/changelog | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/debian/debian/changelog b/debian/debian/changelog
    index 89d3a24c96..63fce29361 100644
    --- a/debian/debian/changelog
    +++ b/debian/debian/changelog
    @@ -1,3 +1,9 @@
    +jenkins (1.414) unstable; urgency=low
    +
    +  * See http://jenkins-ci.org/changelog for more details.
    +
    + -- Kohsuke Kawaguchi <kk@kohsuke.org>  Sat, 04 Jun 2011 10:34:39 -0700
    +
     jenkins (1.413) unstable; urgency=low
     
       * See http://jenkins-ci.org/changelog for more details.
    
    From 989b62b758482b85bc7fe138fdf0a5c7fa1cd251 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 11:24:50 -0700
    Subject: [PATCH 73/91] creating an RC branch
    
    ---
     changelog.html | 14 ++++++++------
     1 file changed, 8 insertions(+), 6 deletions(-)
    
    diff --git a/changelog.html b/changelog.html
    index 65154a1b3c..6cea4c7743 100644
    --- a/changelog.html
    +++ b/changelog.html
    @@ -54,6 +54,14 @@ Upcoming changes</a>
     
     <!-- Record your changes in the trunk here. -->
     <div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
    +<ul class=image>
    +  <li class=>
    +</ul>
    +</div><!--=TRUNK-END=-->
    +
    +<!-- these changes are controlled by the release process. DO NOT MODIFY -->
    +<div id="rc" style="display:none;"><!--=BEGIN=-->
    +<h3><a name=v1.415>What's new in 1.415</a> <!--=DATE=--></h3>
     <ul class=image>
       <li class=bug>
         Output correct version from java -jar jenkins.war --version (broken since 1.410)
    @@ -89,12 +97,6 @@ Upcoming changes</a>
         When there are absolutely no executors for a specific label, there was an unnecessary delay in provisioning the
         first node for that label.
     </ul>
    -</div><!--=TRUNK-END=-->
    -
    -<!-- these changes are controlled by the release process. DO NOT MODIFY -->
    -<div id="rc" style="display:none;"><!--=BEGIN=-->
    -<h3><a name=v1.415>What's new in 1.415</a> <!--=DATE=--></h3>
    -<!--=RC-CHANGES=-->
     </div><!--=END=-->
     <h3><a name=v1.414>What's new in 1.414</a> (2011/06/04)</h3>
     <ul class=image>
    
    From 82a26a579a0c8a41901a1bd91b9df6ff104f93e6 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 11:24:56 -0700
    Subject: [PATCH 74/91] the trunk is toward 1.416-SNAPSHOT
    
    ---
     cli/pom.xml               |  2 +-
     core/pom.xml              |  2 +-
     maven-plugin/pom.xml      |  2 +-
     plugins/pom.xml           | 12 ++++++------
     pom.xml                   |  2 +-
     remoting/pom.xml          |  2 +-
     test/pom.xml              |  2 +-
     ui-samples-plugin/pom.xml |  2 +-
     war/pom.xml               |  2 +-
     9 files changed, 14 insertions(+), 14 deletions(-)
    
    diff --git a/cli/pom.xml b/cli/pom.xml
    index ace8b6f299..08617d7c96 100644
    --- a/cli/pom.xml
    +++ b/cli/pom.xml
    @@ -4,7 +4,7 @@
       <parent>
         <artifactId>pom</artifactId>
         <groupId>org.jenkins-ci.main</groupId>
    -    <version>1.415-SNAPSHOT</version>
    +    <version>1.416-SNAPSHOT</version>
       </parent>
       <artifactId>cli</artifactId>
       <name>Jenkins CLI</name>
    diff --git a/core/pom.xml b/core/pom.xml
    index 6e96d4815d..612d7b754b 100644
    --- a/core/pom.xml
    +++ b/core/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.415-SNAPSHOT</version>
    +    <version>1.416-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
     
    diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml
    index 8224d0f4ca..e42f58b489 100644
    --- a/maven-plugin/pom.xml
    +++ b/maven-plugin/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.415-SNAPSHOT</version>
    +    <version>1.416-SNAPSHOT</version>
       </parent>
     
       <artifactId>maven-plugin</artifactId>
    diff --git a/plugins/pom.xml b/plugins/pom.xml
    index d74220dee3..cf3af9889e 100644
    --- a/plugins/pom.xml
    +++ b/plugins/pom.xml
    @@ -10,7 +10,7 @@
       <groupId>org.jenkins-ci.plugins</groupId>
       <artifactId>plugin</artifactId>
       <name>Jenkins plugin POM</name>
    -  <version>1.415-SNAPSHOT</version>
    +  <version>1.416-SNAPSHOT</version>
       <packaging>pom</packaging>
     
       <!--
    @@ -33,7 +33,7 @@
           <dependency><!-- if a plugin wants to depend on the maven plugin, choose the right version automatically -->
             <groupId>org.jenkins-ci.main</groupId>
             <artifactId>maven-plugin</artifactId>
    -        <version>1.415-SNAPSHOT</version>
    +        <version>1.416-SNAPSHOT</version>
           </dependency>
         </dependencies>
       </dependencyManagement>
    @@ -43,25 +43,25 @@
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-war</artifactId>
           <type>war</type>
    -      <version>1.415-SNAPSHOT</version>
    +      <version>1.416-SNAPSHOT</version>
           <scope>test</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-core</artifactId>
    -      <version>1.415-SNAPSHOT</version>
    +      <version>1.416-SNAPSHOT</version>
           <scope>provided</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>jenkins-test-harness</artifactId>
    -      <version>1.415-SNAPSHOT</version>
    +      <version>1.416-SNAPSHOT</version>
           <scope>test</scope>
         </dependency>
         <dependency>
           <groupId>org.jenkins-ci.main</groupId>
           <artifactId>ui-samples-plugin</artifactId>
    -      <version>1.415-SNAPSHOT</version>
    +      <version>1.416-SNAPSHOT</version>
           <scope>test</scope>
         </dependency>
         <dependency>
    diff --git a/pom.xml b/pom.xml
    index 28685f19f3..7d5cfaa06d 100644
    --- a/pom.xml
    +++ b/pom.xml
    @@ -32,7 +32,7 @@ THE SOFTWARE.
       
       <groupId>org.jenkins-ci.main</groupId>
       <artifactId>pom</artifactId>
    -  <version>1.415-SNAPSHOT</version>
    +  <version>1.416-SNAPSHOT</version>
       <packaging>pom</packaging>
       
       <name>Jenkins main module</name>
    diff --git a/remoting/pom.xml b/remoting/pom.xml
    index 3581da2c1e..d0167671f9 100644
    --- a/remoting/pom.xml
    +++ b/remoting/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.415-SNAPSHOT</version>
    +    <version>1.416-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
       
    diff --git a/test/pom.xml b/test/pom.xml
    index 8160118e27..1a5236b4bf 100644
    --- a/test/pom.xml
    +++ b/test/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <artifactId>pom</artifactId>
         <groupId>org.jenkins-ci.main</groupId>
    -    <version>1.415-SNAPSHOT</version>
    +    <version>1.416-SNAPSHOT</version>
       </parent>
       <modelVersion>4.0.0</modelVersion>
       <groupId>org.jenkins-ci.main</groupId>
    diff --git a/ui-samples-plugin/pom.xml b/ui-samples-plugin/pom.xml
    index a6a9ff03d9..c67208b1d6 100644
    --- a/ui-samples-plugin/pom.xml
    +++ b/ui-samples-plugin/pom.xml
    @@ -28,7 +28,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.415-SNAPSHOT</version>
    +    <version>1.416-SNAPSHOT</version>
       </parent>
     
       <artifactId>ui-samples-plugin</artifactId>
    diff --git a/war/pom.xml b/war/pom.xml
    index cf7d299451..b920d750c7 100644
    --- a/war/pom.xml
    +++ b/war/pom.xml
    @@ -27,7 +27,7 @@ THE SOFTWARE.
       <parent>
         <groupId>org.jenkins-ci.main</groupId>
         <artifactId>pom</artifactId>
    -    <version>1.415-SNAPSHOT</version>
    +    <version>1.416-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
       </parent>
       
    
    From d7b6277f3268a6fe397a640ebc0c84cbd76c226d Mon Sep 17 00:00:00 2001
    From: Christian Wolfgang <wolfgarnet@gmail.com>
    Date: Tue, 24 May 2011 16:11:48 +0200
    Subject: [PATCH 75/91] Initial commit
    
    ---
     .../main/java/hudson/matrix/MatrixBuild.java  | 25 +++++++++++++++++--
     1 file changed, 23 insertions(+), 2 deletions(-)
    
    diff --git a/core/src/main/java/hudson/matrix/MatrixBuild.java b/core/src/main/java/hudson/matrix/MatrixBuild.java
    index 824e998137..0b0da994ce 100644
    --- a/core/src/main/java/hudson/matrix/MatrixBuild.java
    +++ b/core/src/main/java/hudson/matrix/MatrixBuild.java
    @@ -115,6 +115,20 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
             };
         }
     
    +    /**
    +     * If greater than zero, the {@link MatrixBuild} originates from the given build number.
    +     */
    +    public int linkedNumber = 0;
    +    
    +    /**
    +     * Sets the linked number
    +     * @param linkedNumber A given number indicating the origin
    +     */
    +    public void setLinkedNumber( int linkedNumber ) {
    +    	this.linkedNumber = linkedNumber;
    +    }
    +
    +
         /**
          * Gets the {@link MatrixRun} in this build that corresponds
          * to the given combination.
    @@ -122,9 +136,13 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
         public MatrixRun getRun(Combination c) {
             MatrixConfiguration config = getParent().getItem(c);
             if(config==null)    return null;
    -        return config.getNearestOldBuild(getNumber());
    +        MatrixRun b = config.getNearestOldBuild(getNumber());
    +        if(b.getNumber()!=getNumber() && linkedNumber > 0) {
    +        	b = config.getNearestOldBuild(linkedNumber);
    +        }
    +        return b;
         }
    -
    +    
         /**
          * Returns all {@link MatrixRun}s for this {@link MatrixBuild}.
          */
    @@ -133,6 +151,9 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
             List<MatrixRun> r = new ArrayList<MatrixRun>();
             for(MatrixConfiguration c : getParent().getItems()) {
                 MatrixRun b = c.getNearestOldBuild(getNumber());
    +            if(b.getNumber()!=getNumber() && linkedNumber > 0) {
    +            	b = c.getNearestOldBuild(linkedNumber);
    +            }
                 if (b != null) r.add(b);
             }
             return r;
    
    From 34e884dc0535e17f954f2c3e2fc75c6106a295d5 Mon Sep 17 00:00:00 2001
    From: Christian Wolfgang <wolfgarnet@gmail.com>
    Date: Wed, 25 May 2011 10:07:37 +0200
    Subject: [PATCH 76/91] Added convenience method for getting configuration run
    
    ---
     .../main/java/hudson/matrix/MatrixBuild.java  | 21 +++++++++++--------
     1 file changed, 12 insertions(+), 9 deletions(-)
    
    diff --git a/core/src/main/java/hudson/matrix/MatrixBuild.java b/core/src/main/java/hudson/matrix/MatrixBuild.java
    index 0b0da994ce..aef36450b5 100644
    --- a/core/src/main/java/hudson/matrix/MatrixBuild.java
    +++ b/core/src/main/java/hudson/matrix/MatrixBuild.java
    @@ -136,11 +136,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
         public MatrixRun getRun(Combination c) {
             MatrixConfiguration config = getParent().getItem(c);
             if(config==null)    return null;
    -        MatrixRun b = config.getNearestOldBuild(getNumber());
    -        if(b.getNumber()!=getNumber() && linkedNumber > 0) {
    -        	b = config.getNearestOldBuild(linkedNumber);
    -        }
    -        return b;
    +        return getRunForConfiguration( config, getNumber() );
         }
         
         /**
    @@ -150,14 +146,21 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
         public List<MatrixRun> getRuns() {
             List<MatrixRun> r = new ArrayList<MatrixRun>();
             for(MatrixConfiguration c : getParent().getItems()) {
    -            MatrixRun b = c.getNearestOldBuild(getNumber());
    -            if(b.getNumber()!=getNumber() && linkedNumber > 0) {
    -            	b = c.getNearestOldBuild(linkedNumber);
    -            }
    +            MatrixRun b = getRunForConfiguration( c, getNumber() );
                 if (b != null) r.add(b);
             }
             return r;
         }
    +    
    +    private MatrixRun getRunForConfiguration( MatrixConfiguration c, int number )
    +    {
    +        MatrixRun b = c.getNearestOldBuild(getNumber());
    +        if(b.getNumber()!=getNumber() && linkedNumber > 0) {
    +        	b = c.getNearestOldBuild(linkedNumber);
    +        }
    +        
    +        return b;
    +    }
     
         /**
          * Returns all {@link MatrixRun}s for this {@link MatrixBuild}.
    
    From 5444b162062e0d3b80cee586ebf43cd0000da20b Mon Sep 17 00:00:00 2001
    From: Christian Wolfgang <wolfgarnet@gmail.com>
    Date: Wed, 25 May 2011 10:11:53 +0200
    Subject: [PATCH 77/91] Updated style
    
    ---
     core/src/main/java/hudson/matrix/MatrixBuild.java | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/core/src/main/java/hudson/matrix/MatrixBuild.java b/core/src/main/java/hudson/matrix/MatrixBuild.java
    index aef36450b5..980fa99fe3 100644
    --- a/core/src/main/java/hudson/matrix/MatrixBuild.java
    +++ b/core/src/main/java/hudson/matrix/MatrixBuild.java
    @@ -152,8 +152,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
             return r;
         }
         
    -    private MatrixRun getRunForConfiguration( MatrixConfiguration c, int number )
    -    {
    +    private MatrixRun getRunForConfiguration( MatrixConfiguration c, int number ) {
             MatrixRun b = c.getNearestOldBuild(getNumber());
             if(b.getNumber()!=getNumber() && linkedNumber > 0) {
             	b = c.getNearestOldBuild(linkedNumber);
    
    From 18496c540445929abd09d206072f3a53f1774b54 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sat, 4 Jun 2011 15:46:53 -0700
    Subject: [PATCH 78/91] - Renamed from 'linked' to 'base' - Fixed the bug where
     multi-level base setting wasn't working properly - Improved docs
    
    ---
     .../main/java/hudson/matrix/MatrixBuild.java  | 45 ++++++++++---------
     1 file changed, 25 insertions(+), 20 deletions(-)
    
    diff --git a/core/src/main/java/hudson/matrix/MatrixBuild.java b/core/src/main/java/hudson/matrix/MatrixBuild.java
    index 980fa99fe3..4dfd711515 100644
    --- a/core/src/main/java/hudson/matrix/MatrixBuild.java
    +++ b/core/src/main/java/hudson/matrix/MatrixBuild.java
    @@ -32,13 +32,10 @@ import hudson.model.Executor;
     import hudson.model.Fingerprint;
     import hudson.model.Hudson;
     import hudson.model.JobProperty;
    -import hudson.model.Node;
     import hudson.model.ParametersAction;
     import hudson.model.Queue;
     import hudson.model.Result;
     import hudson.model.Cause.UpstreamCause;
    -import hudson.slaves.WorkspaceList;
    -import hudson.slaves.WorkspaceList.Lease;
     import hudson.tasks.Publisher;
     
     import java.io.File;
    @@ -62,6 +59,12 @@ import org.kohsuke.stapler.export.Exported;
     public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
         private AxisList axes;
     
    +    /**
    +     * If non-null, the {@link MatrixBuild} originates from the given build number.
    +     */
    +    private Integer baseBuild;
    +
    +
         public MatrixBuild(MatrixProject job) throws IOException {
             super(job);
         }
    @@ -116,18 +119,21 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
         }
     
         /**
    -     * If greater than zero, the {@link MatrixBuild} originates from the given build number.
    +     * Sets the base build from which this build is derived.
    +     * @since 1.416
          */
    -    public int linkedNumber = 0;
    -    
    -    /**
    -     * Sets the linked number
    -     * @param linkedNumber A given number indicating the origin
    -     */
    -    public void setLinkedNumber( int linkedNumber ) {
    -    	this.linkedNumber = linkedNumber;
    +    public void setBaseBuild(MatrixBuild baseBuild) {
    +    	this.baseBuild = (baseBuild==null || baseBuild==getPreviousBuild()) ? null : baseBuild.getNumber();
         }
     
    +    /**
    +     * Returns the base {@link MatrixBuild} that this build originates from.
    +     * <p>
    +     * If this build is a partial build, unexecuted {@link MatrixRun}s are delegated to this build number.
    +     */
    +    public MatrixBuild getBaseBuild() {
    +        return baseBuild==null ? getPreviousBuild() : getParent().getBuildByNumber(baseBuild);
    +    }
     
         /**
          * Gets the {@link MatrixRun} in this build that corresponds
    @@ -136,7 +142,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
         public MatrixRun getRun(Combination c) {
             MatrixConfiguration config = getParent().getItem(c);
             if(config==null)    return null;
    -        return getRunForConfiguration( config, getNumber() );
    +        return getRunForConfiguration(config);
         }
         
         /**
    @@ -146,19 +152,18 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
         public List<MatrixRun> getRuns() {
             List<MatrixRun> r = new ArrayList<MatrixRun>();
             for(MatrixConfiguration c : getParent().getItems()) {
    -            MatrixRun b = getRunForConfiguration( c, getNumber() );
    +            MatrixRun b = getRunForConfiguration(c);
                 if (b != null) r.add(b);
             }
             return r;
         }
         
    -    private MatrixRun getRunForConfiguration( MatrixConfiguration c, int number ) {
    -        MatrixRun b = c.getNearestOldBuild(getNumber());
    -        if(b.getNumber()!=getNumber() && linkedNumber > 0) {
    -        	b = c.getNearestOldBuild(linkedNumber);
    +    private MatrixRun getRunForConfiguration(MatrixConfiguration c) {
    +        for (MatrixBuild b=this; b!=null; b=b.getBaseBuild()) {
    +            MatrixRun r = c.getBuildByNumber(b.getNumber());
    +            if (r!=null)    return r;
             }
    -        
    -        return b;
    +        return null;
         }
     
         /**
    
    From bdf13dce4dde24742fc0301d0739cc111bd94328 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 05:12:22 -0700
    Subject: [PATCH 79/91] Added a hook to customize the XML parser behaviour.
    
    ---
     changelog.html                                |  4 +-
     .../java/hudson/tasks/junit/SuiteResult.java  | 19 ++++--
     .../hudson/tasks/junit/XMLEntityResolver.java | 18 +++++-
     .../hudson/util/io/ParserConfigurator.java    | 58 +++++++++++++++++++
     4 files changed, 93 insertions(+), 6 deletions(-)
     create mode 100644 core/src/main/java/hudson/util/io/ParserConfigurator.java
    
    diff --git a/changelog.html b/changelog.html
    index 6cea4c7743..cfae5862af 100644
    --- a/changelog.html
    +++ b/changelog.html
    @@ -55,7 +55,9 @@ Upcoming changes</a>
     <!-- Record your changes in the trunk here. -->
     <div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
     <ul class=image>
    -  <li class=>
    +  <li class=rfe>
    +    Added a mechanism to control the XML parser behaviour
    +    (<a href="https://github.com/jenkinsci/jenkins/pull/67">pull request #67</a>)
     </ul>
     </div><!--=TRUNK-END=-->
     
    diff --git a/core/src/main/java/hudson/tasks/junit/SuiteResult.java b/core/src/main/java/hudson/tasks/junit/SuiteResult.java
    index d5783c8a02..067d4e6999 100644
    --- a/core/src/main/java/hudson/tasks/junit/SuiteResult.java
    +++ b/core/src/main/java/hudson/tasks/junit/SuiteResult.java
    @@ -25,6 +25,7 @@ package hudson.tasks.junit;
     
     import hudson.tasks.test.TestObject;
     import hudson.util.IOException2;
    +import hudson.util.io.ParserConfigurator;
     import org.apache.commons.io.FileUtils;
     import org.dom4j.Document;
     import org.dom4j.DocumentException;
    @@ -84,6 +85,18 @@ public final class SuiteResult implements Serializable {
             this.file = null;
         }
     
    +    /**
    +     * Passed to {@link ParserConfigurator}.
    +     * @since 1.416
    +     */
    +    public static class SuiteResultParserConfigurationContext {
    +        public final File xmlReport;
    +
    +        SuiteResultParserConfigurationContext(File xmlReport) {
    +            this.xmlReport = xmlReport;
    +        }
    +    }
    +
         /**
          * Parses the JUnit XML file into {@link SuiteResult}s.
          * This method returns a collection, as a single XML may have multiple &lt;testsuite>
    @@ -94,10 +107,8 @@ public final class SuiteResult implements Serializable {
     
             // parse into DOM
             SAXReader saxReader = new SAXReader();
    -        // install EntityResolver for resolving DTDs, which are in files created by TestNG.
    -        // (see https://hudson.dev.java.net/servlets/ReadMsg?listName=users&msgNo=5530)
    -        XMLEntityResolver resolver = new XMLEntityResolver();
    -        saxReader.setEntityResolver(resolver);
    +        ParserConfigurator.applyConfiguration(saxReader,new SuiteResultParserConfigurationContext(xmlReport));
    +
             Document result = saxReader.read(xmlReport);
             Element root = result.getRootElement();
     
    diff --git a/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java b/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java
    index 52ca72a234..823c02a219 100644
    --- a/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java
    +++ b/core/src/main/java/hudson/tasks/junit/XMLEntityResolver.java
    @@ -23,6 +23,10 @@
      */
     package hudson.tasks.junit;
     
    +import hudson.Extension;
    +import hudson.tasks.junit.SuiteResult.SuiteResultParserConfigurationContext;
    +import hudson.util.io.ParserConfigurator;
    +import org.dom4j.io.SAXReader;
     import org.xml.sax.EntityResolver;
     import org.xml.sax.InputSource;
     import org.xml.sax.SAXException;
    @@ -43,7 +47,8 @@ import java.util.logging.Logger;
      *
      * @author Mikael Carneholm
      */
    -class XMLEntityResolver implements EntityResolver {
    +@Extension
    +public class XMLEntityResolver extends ParserConfigurator implements EntityResolver {
     
         private static final String TESTNG_NAMESPACE = "http://testng.org/";
     
    @@ -67,5 +72,16 @@ class XMLEntityResolver implements EntityResolver {
             return null;
         }
     
    +    /**
    +     * Install EntityResolver for resolving DTDs, which are in files created by TestNG.
    +     * (see https://hudson.dev.java.net/servlets/ReadMsg?listName=users&msgNo=5530)
    +     */
    +    @Override
    +    public void configure(SAXReader reader, Object context) {
    +        if (context instanceof SuiteResultParserConfigurationContext) {
    +            reader.setEntityResolver(this);
    +        }
    +    }
    +
         private static final Logger LOGGER = Logger.getLogger(XMLEntityResolver.class.getName());
     }
    \ No newline at end of file
    diff --git a/core/src/main/java/hudson/util/io/ParserConfigurator.java b/core/src/main/java/hudson/util/io/ParserConfigurator.java
    new file mode 100644
    index 0000000000..7d1f4f0d37
    --- /dev/null
    +++ b/core/src/main/java/hudson/util/io/ParserConfigurator.java
    @@ -0,0 +1,58 @@
    +/*
    + * The MIT License
    + *
    + * Copyright (c) 2011, CloudBees, Inc.
    + *
    + * Permission is hereby granted, free of charge, to any person obtaining a copy
    + * of this software and associated documentation files (the "Software"), to deal
    + * in the Software without restriction, including without limitation the rights
    + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the Software is
    + * furnished to do so, subject to the following conditions:
    + *
    + * The above copyright notice and this permission notice shall be included in
    + * all copies or substantial portions of the Software.
    + *
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    + * THE SOFTWARE.
    + */
    +package hudson.util.io;
    + 
    +import hudson.ExtensionList;
    +import hudson.ExtensionPoint;
    +import hudson.model.Hudson;
    +import org.dom4j.io.SAXReader;
    +
    +/**
    + * Configures XML parsers to be used in various context of Jenkins.
    + *
    + * @author Kohsuke Kawaguchi
    + * @since 1.416
    + */
    +public abstract class ParserConfigurator implements ExtensionPoint {
    +    /**
    +     * Configures the given {@link SAXReader}
    +     *
    +     * @param context
    +     *      Object that represents the context in which the parser is used.
    +     *      It is up to the caller to decide what to pass in here.
    +     */
    +    public void configure(SAXReader reader, Object context) {}
    +
    +    /**
    +     * Returns all the registered {@link ParserConfigurator}s.
    +     */
    +    public static ExtensionList<ParserConfigurator> all() {
    +        return Hudson.getInstance().getExtensionList(ParserConfigurator.class);
    +    }
    +
    +    public static void applyConfiguration(SAXReader reader, Object context) {
    +        for (ParserConfigurator pc : all())
    +            pc.configure(reader,context);
    +    }
    +}
    
    From 7c56007de0cf738b516fd72a52ed51fcb72abd7e Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 05:15:57 -0700
    Subject: [PATCH 80/91] doc improvements
    
    ---
     .../java/hudson/util/io/ParserConfigurator.java     | 13 ++++++++++++-
     1 file changed, 12 insertions(+), 1 deletion(-)
    
    diff --git a/core/src/main/java/hudson/util/io/ParserConfigurator.java b/core/src/main/java/hudson/util/io/ParserConfigurator.java
    index 7d1f4f0d37..c2bae27673 100644
    --- a/core/src/main/java/hudson/util/io/ParserConfigurator.java
    +++ b/core/src/main/java/hudson/util/io/ParserConfigurator.java
    @@ -29,7 +29,18 @@ import hudson.model.Hudson;
     import org.dom4j.io.SAXReader;
     
     /**
    - * Configures XML parsers to be used in various context of Jenkins.
    + * Configures XML parsers to be used for various XML parsing activities inside Jenkins.
    + *
    + * <p>
    + * XML parsing is a complex enough activity that often certain degree of customization of the
    + * parsing behaviour is desired. This extension point enables that. To avoid creating
    + * new extension point for each different parsing scene, this extension point takes the type-less
    + * "context" argument, which should identify the context of the parse by type.
    + *
    + * <p>
    + * This extension point is added late in the game, so existing XML parsing behaviour should
    + * be retrofitted to use this as we find them. Similarly, additional overloaded versions are likely
    + * needed to support SAX, JAXP, and other means of parsing.
      *
      * @author Kohsuke Kawaguchi
      * @since 1.416
    
    From f99e3160acc8cb710613bed0cf956a873f355a44 Mon Sep 17 00:00:00 2001
    From: Greg Heartsfield <scsibug@imap.cc>
    Date: Thu, 12 May 2011 21:23:59 -0500
    Subject: [PATCH 81/91] Do not include trailing periods in console links.
    
    This creates incorrect links in output from the svn-tag plugin.
    ---
     core/src/main/java/hudson/console/UrlAnnotator.java     | 2 +-
     core/src/test/java/hudson/console/UrlAnnotatorTest.java | 3 +++
     2 files changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/core/src/main/java/hudson/console/UrlAnnotator.java b/core/src/main/java/hudson/console/UrlAnnotator.java
    index 40e38dcd34..0c188ba78e 100644
    --- a/core/src/main/java/hudson/console/UrlAnnotator.java
    +++ b/core/src/main/java/hudson/console/UrlAnnotator.java
    @@ -40,7 +40,7 @@ public class UrlAnnotator extends ConsoleAnnotatorFactory<Object> {
              * In addition, the last character shouldn't be ',' ':', '"', etc, as often those things show up right next
              * to URL in plain text (e.g., test="http://www.example.com/")
              */
    -        private static final Pattern URL = Pattern.compile("\\b(http|https|ftp)://[^\\s<>]+[^\\s<>,:\"'()\\[\\]=]");
    +        private static final Pattern URL = Pattern.compile("\\b(http|https|ftp)://[^\\s<>]+[^\\s<>,\\.:\"'()\\[\\]=]");
     
             private static final String OPEN = "'\"()[]<>";
             private static final String CLOSE= "'\")(][><";
    diff --git a/core/src/test/java/hudson/console/UrlAnnotatorTest.java b/core/src/test/java/hudson/console/UrlAnnotatorTest.java
    index b1aacda8ce..99692d3f39 100644
    --- a/core/src/test/java/hudson/console/UrlAnnotatorTest.java
    +++ b/core/src/test/java/hudson/console/UrlAnnotatorTest.java
    @@ -53,5 +53,8 @@ public class UrlAnnotatorTest extends TestCase {
                     + "ftp://bar</a> or &lt;<a href='https://baz/'>https://baz/</a> or (<a "
                     + "href='http://a.b.c/x.y'>http://a.b.c/x.y</a> Bye",
                     text.toString(true));
    +        text = new MarkupText("Punctuation: http://foo/.");
    +        ca.annotate(null, text);
    +        assertEquals("Punctuation: <a href='http://foo/'>http://foo/</a>.", text.toString(true));
         }
     }
    
    From fc44a8b36987e618bef6a537f21c3d15357e38fb Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 05:43:39 -0700
    Subject: [PATCH 82/91] Recording the previous change.
    
    ---
     changelog.html | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/changelog.html b/changelog.html
    index cfae5862af..29b88dd83d 100644
    --- a/changelog.html
    +++ b/changelog.html
    @@ -55,6 +55,9 @@ Upcoming changes</a>
     <!-- Record your changes in the trunk here. -->
     <div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
     <ul class=image>
    +  <li class=rfe>
    +    Improved the URL hyperlinking behavior in the console output
    +    (<a href="https://github.com/jenkinsci/jenkins/pull/119">pull request #119</a>)
       <li class=rfe>
         Added a mechanism to control the XML parser behaviour
         (<a href="https://github.com/jenkinsci/jenkins/pull/67">pull request #67</a>)
    
    From b547665ba23f6efac5649b9807dca894af42bd79 Mon Sep 17 00:00:00 2001
    From: Christoph Kutzinski <kutzi@gmx.de>
    Date: Fri, 13 May 2011 19:28:23 +0200
    Subject: [PATCH 83/91] enum to describe a result trend - i.e. change from the
     previous to the current result
    
    ---
     .../java/hudson/notification/ResultTrend.java | 159 ++++++++++++++++++
     1 file changed, 159 insertions(+)
     create mode 100644 core/src/main/java/hudson/notification/ResultTrend.java
    
    diff --git a/core/src/main/java/hudson/notification/ResultTrend.java b/core/src/main/java/hudson/notification/ResultTrend.java
    new file mode 100644
    index 0000000000..22e365cd6d
    --- /dev/null
    +++ b/core/src/main/java/hudson/notification/ResultTrend.java
    @@ -0,0 +1,159 @@
    +package hudson.notification;
    +
    +import java.util.Locale;
    +
    +import hudson.model.AbstractBuild;
    +import hudson.model.Result;
    +
    +/**
    + * Describes an {@link Result} trend by taking the comparing the result of the current and the previous build.
    + * 
    + * @author kutzi
    + * @since TODO
    + */
    +public enum ResultTrend {
    +    /**
    +     * Previous build was {@link Result#FAILURE} or {@link Result#UNSTABLE}
    +     * and is now {@link Result#SUCCESS}.
    +     */
    +    FIXED,
    +    /**
    +     * Build as well as previous build (if it has a previous build) are {@link Result#SUCCESS}
    +     */
    +    SUCCESS,
    +    /**
    +     * Previous build was {@link Result#FAILURE} and is now 'only' {@link Result#UNSTABLE}.
    +     */
    +    NOW_UNSTABLE("Now unstable"),
    +    /**
    +     * Build as well as previous build are {@link Result#UNSTABLE}.
    +     */
    +    STILL_UNSTABLE("Still unstable"),
    +    /**
    +     * Previous build (if there is one) was {@link Result#SUCCESS} and current build is {@link Result#UNSTABLE}.
    +     */
    +    UNSTABLE,
    +    /**
    +     * Build as well as previous build are {@link Result#FAILURE}.
    +     */
    +    STILL_FAILING("Still failing"),
    +    /**
    +     * Previous build (if there is one) was {@link Result#SUCCESS} or {@link Result#UNSTABLE}
    +     * and current build is {@link Result#UNSTABLE}.
    +     */
    +    FAILURE,
    +    /**
    +     * Build was aborted.
    +     */
    +    ABORTED,
    +    /**
    +     * Build didn't run (yet).
    +     */
    +    NOT_BUILT("Not built");
    +    
    +    private final String description;
    +
    +    private ResultTrend() {
    +        this.description = name().charAt(0) + name().substring(1).toLowerCase(Locale.ENGLISH);
    +    }
    +    
    +    private ResultTrend(String description) {
    +        this.description = description;
    +    }
    +    
    +    /**
    +     * Returns a short english description of the result.
    +     */
    +    public String getDescription() {
    +        return this.description;
    +    }
    +    
    +    public String getUpperCaseDescription() {
    +        return this.description.toUpperCase(Locale.ENGLISH);
    +    }
    +    
    +    /**
    +     * Returns the result trend of a build.
    +     * 
    +     * @param build the current build
    +     * @return the result trend
    +     */
    +    public static ResultTrend getResultTrend(AbstractBuild<?, ?> build) {
    +        Result result = build.getResult();
    +        
    +        if (result == Result.ABORTED) {
    +            return ABORTED;
    +        } else if (result == Result.NOT_BUILT) {
    +            return NOT_BUILT;
    +        }
    +        
    +        if (result == Result.SUCCESS) {
    +            if (isFix(build)) {
    +                return FIXED;
    +            } else {
    +                return SUCCESS;
    +            }
    +        }
    +        
    +        AbstractBuild<?, ?> previousBuild = getPreviousNonAbortedBuild(build);
    +        if (result == Result.UNSTABLE) {
    +            if (previousBuild == null) {
    +                return UNSTABLE;
    +            }
    +            
    +            
    +            if (previousBuild.getResult() == Result.UNSTABLE) {
    +                return STILL_UNSTABLE;
    +            } else if (previousBuild.getResult() == Result.FAILURE) {
    +                return NOW_UNSTABLE;
    +            } else {
    +                return UNSTABLE;
    +            }
    +        } else if (result == Result.FAILURE) {
    +            if (previousBuild != null && previousBuild.getResult() == Result.FAILURE) {
    +                return STILL_FAILING;
    +            } else {
    +                return FAILURE;
    +            }
    +        }
    +        
    +        throw new IllegalArgumentException("Unknown result: '" + result + "' for build: " + build);
    +    }
    +    
    +    /**
    +     * Returns the previous 'not aborted' build (i.e. ignores ABORTED and NOT_BUILT builds)
    +     * or null.
    +    */
    +    private static AbstractBuild<?, ?> getPreviousNonAbortedBuild(AbstractBuild<?, ?> build) {
    +        AbstractBuild<?, ?> previousBuild = build.getPreviousBuild();
    +        while (previousBuild != null) {
    +            if (previousBuild.getResult() == null 
    +                || previousBuild.getResult() == Result.ABORTED
    +                || previousBuild.getResult() == Result.NOT_BUILT) {
    +                
    +                previousBuild = previousBuild.getPreviousBuild();
    +            } else {
    +                return previousBuild;
    +            }
    +        }
    +        return previousBuild;
    +    }
    +    
    +    /**
    +     * Returns true if this build represents a 'fix'.
    +     * I.e. it is the first successful build after previous
    +     * 'failed' and/or 'unstable' builds.
    +     * Ignores 'aborted' and 'not built' builds.
    +     */
    +    private static boolean isFix(AbstractBuild<?, ?> build) {
    +        if (build.getResult() != Result.SUCCESS) {
    +            return false;
    +        }
    +        
    +        AbstractBuild<?, ?> previousBuild = getPreviousNonAbortedBuild(build);
    +        if (previousBuild != null) {
    +            return previousBuild.getResult().isWorseThan(Result.SUCCESS);
    +        }
    +        return false;
    +    }
    +}
    
    From 2917003a7abbb75c7d5938084282b70106c4e427 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 05:48:27 -0700
    Subject: [PATCH 84/91] doc improvements
    
    ---
     .../java/hudson/notification/ResultTrend.java | 25 ++++++++++++++++++-
     1 file changed, 24 insertions(+), 1 deletion(-)
    
    diff --git a/core/src/main/java/hudson/notification/ResultTrend.java b/core/src/main/java/hudson/notification/ResultTrend.java
    index 22e365cd6d..a5fcdc39d4 100644
    --- a/core/src/main/java/hudson/notification/ResultTrend.java
    +++ b/core/src/main/java/hudson/notification/ResultTrend.java
    @@ -1,3 +1,26 @@
    +/*
    + * The MIT License
    + *
    + * Copyright (c) 2011, Christoph Kutzinski
    + *
    + * Permission is hereby granted, free of charge, to any person obtaining a copy
    + * of this software and associated documentation files (the "Software"), to deal
    + * in the Software without restriction, including without limitation the rights
    + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    + * copies of the Software, and to permit persons to whom the Software is
    + * furnished to do so, subject to the following conditions:
    + *
    + * The above copyright notice and this permission notice shall be included in
    + * all copies or substantial portions of the Software.
    + *
    + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    + * THE SOFTWARE.
    + */
     package hudson.notification;
     
     import java.util.Locale;
    @@ -9,7 +32,7 @@ import hudson.model.Result;
      * Describes an {@link Result} trend by taking the comparing the result of the current and the previous build.
      * 
      * @author kutzi
    - * @since TODO
    + * @since 1.416
      */
     public enum ResultTrend {
         /**
    
    From 06a95383632610b4f93675fd50d9ea5184985c58 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 05:49:31 -0700
    Subject: [PATCH 85/91] moved to the model package to colocate with the Result
     class, since I don't think this class is tied by itself to the notification.
    
    ---
     .../java/hudson/{notification => model}/ResultTrend.java     | 5 +----
     1 file changed, 1 insertion(+), 4 deletions(-)
     rename core/src/main/java/hudson/{notification => model}/ResultTrend.java (98%)
    
    diff --git a/core/src/main/java/hudson/notification/ResultTrend.java b/core/src/main/java/hudson/model/ResultTrend.java
    similarity index 98%
    rename from core/src/main/java/hudson/notification/ResultTrend.java
    rename to core/src/main/java/hudson/model/ResultTrend.java
    index a5fcdc39d4..fa887dc3b0 100644
    --- a/core/src/main/java/hudson/notification/ResultTrend.java
    +++ b/core/src/main/java/hudson/model/ResultTrend.java
    @@ -21,13 +21,10 @@
      * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
      * THE SOFTWARE.
      */
    -package hudson.notification;
    +package hudson.model;
     
     import java.util.Locale;
     
    -import hudson.model.AbstractBuild;
    -import hudson.model.Result;
    -
     /**
      * Describes an {@link Result} trend by taking the comparing the result of the current and the previous build.
      * 
    
    From fa5686cd764437b372528131e642e49e5866d2de Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 05:55:22 -0700
    Subject: [PATCH 86/91] Added i18n.
    
    I think we use the word 'description' elsewhere inside Jenkins to refer to human-readable text (like job description), so I'm making description the localized string. I'm assuming Kutzi has some use for all upper-case ID, yet the notion of 'upper case' only makes sense in some locale (for example not in Chinese), so I'm now calling it ID and I'm deriving it from the English localization.
    ---
     .../main/java/hudson/model/ResultTrend.java   | 41 ++++++++++---------
     .../hudson/model/Messages.properties          |  9 ++++
     2 files changed, 30 insertions(+), 20 deletions(-)
    
    diff --git a/core/src/main/java/hudson/model/ResultTrend.java b/core/src/main/java/hudson/model/ResultTrend.java
    index fa887dc3b0..87f8a986df 100644
    --- a/core/src/main/java/hudson/model/ResultTrend.java
    +++ b/core/src/main/java/hudson/model/ResultTrend.java
    @@ -23,6 +23,8 @@
      */
     package hudson.model;
     
    +import org.jvnet.localizer.Localizable;
    +
     import java.util.Locale;
     
     /**
    @@ -36,60 +38,59 @@ public enum ResultTrend {
          * Previous build was {@link Result#FAILURE} or {@link Result#UNSTABLE}
          * and is now {@link Result#SUCCESS}.
          */
    -    FIXED,
    +    FIXED(Messages._ResultTrend_Fixed()),
         /**
          * Build as well as previous build (if it has a previous build) are {@link Result#SUCCESS}
          */
    -    SUCCESS,
    +    SUCCESS(Messages._ResultTrend_Success()),
         /**
          * Previous build was {@link Result#FAILURE} and is now 'only' {@link Result#UNSTABLE}.
          */
    -    NOW_UNSTABLE("Now unstable"),
    +    NOW_UNSTABLE(Messages._ResultTrend_NowUnstable()),
         /**
          * Build as well as previous build are {@link Result#UNSTABLE}.
          */
    -    STILL_UNSTABLE("Still unstable"),
    +    STILL_UNSTABLE(Messages._ResultTrend_StillUnstable()),
         /**
          * Previous build (if there is one) was {@link Result#SUCCESS} and current build is {@link Result#UNSTABLE}.
          */
    -    UNSTABLE,
    +    UNSTABLE(Messages._ResultTrend_Unstable()),
         /**
          * Build as well as previous build are {@link Result#FAILURE}.
          */
    -    STILL_FAILING("Still failing"),
    +    STILL_FAILING(Messages._ResultTrend_StillFailing()),
         /**
          * Previous build (if there is one) was {@link Result#SUCCESS} or {@link Result#UNSTABLE}
          * and current build is {@link Result#UNSTABLE}.
          */
    -    FAILURE,
    +    FAILURE(Messages._ResultTrend_Failure()),
         /**
          * Build was aborted.
          */
    -    ABORTED,
    +    ABORTED(Messages._ResultTrend_Aborted()),
         /**
          * Build didn't run (yet).
          */
    -    NOT_BUILT("Not built");
    +    NOT_BUILT(Messages._ResultTrend_NotBuilt());
         
    -    private final String description;
    +    private final Localizable description;
     
    -    private ResultTrend() {
    -        this.description = name().charAt(0) + name().substring(1).toLowerCase(Locale.ENGLISH);
    -    }
    -    
    -    private ResultTrend(String description) {
    +    private ResultTrend(Localizable description) {
             this.description = description;
         }
         
         /**
    -     * Returns a short english description of the result.
    +     * Returns a short human-readable description of the result.
          */
         public String getDescription() {
    -        return this.description;
    +        return this.description.toString();
         }
    -    
    -    public String getUpperCaseDescription() {
    -        return this.description.toUpperCase(Locale.ENGLISH);
    +
    +    /**
    +     * Gets all upper case ID like token of the build status.
    +     */
    +    public String getID() {
    +        return this.description.toString(Locale.ENGLISH).toUpperCase(Locale.ENGLISH);
         }
         
         /**
    diff --git a/core/src/main/resources/hudson/model/Messages.properties b/core/src/main/resources/hudson/model/Messages.properties
    index be510c3925..b2c7cbba97 100644
    --- a/core/src/main/resources/hudson/model/Messages.properties
    +++ b/core/src/main/resources/hudson/model/Messages.properties
    @@ -166,6 +166,15 @@ Queue.WaitingForNextAvailableExecutor=Waiting for next available executor
     Queue.WaitingForNextAvailableExecutorOn=Waiting for next available executor on {0}
     Queue.init=Restoring the build queue
     
    +ResultTrend.Aborted=Aborted
    +ResultTrend.Failure=Failure
    +ResultTrend.Fixed=Fixed
    +ResultTrend.NotBuilt=Not built
    +ResultTrend.NowUnstable=Now unstable
    +ResultTrend.StillFailing=Still failing
    +ResultTrend.StillUnstable=Still unstable
    +ResultTrend.Success=Success
    +ResultTrend.Unstable=Unstable
     Run.BuildAborted=Build was aborted
     Run.MarkedExplicitly=explicitly marked to keep the record
     Run.Permissions.Title=Run
    
    From 114c566be8ca91d592830a05b56c4e4c046e066f Mon Sep 17 00:00:00 2001
    From: Vincent Latombe <vincent@latombe.net>
    Date: Sat, 28 May 2011 12:02:31 +0200
    Subject: [PATCH 87/91] Use relative path to validate new view name (in order
     to allow ViewGroups like NestedView to override)
    
    ---
     changelog.html                                            | 2 ++
     core/src/main/resources/hudson/model/Hudson/newView.jelly | 2 +-
     2 files changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/changelog.html b/changelog.html
    index 29b88dd83d..e276c4ee3c 100644
    --- a/changelog.html
    +++ b/changelog.html
    @@ -55,6 +55,8 @@ Upcoming changes</a>
     <!-- Record your changes in the trunk here. -->
     <div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
     <ul class=image>
    +  <li class=bug>
    +  	Validate new view name relative to current context
       <li class=rfe>
         Improved the URL hyperlinking behavior in the console output
         (<a href="https://github.com/jenkinsci/jenkins/pull/119">pull request #119</a>)
    diff --git a/core/src/main/resources/hudson/model/Hudson/newView.jelly b/core/src/main/resources/hudson/model/Hudson/newView.jelly
    index 68ca7e9183..e8a49b03a8 100644
    --- a/core/src/main/resources/hudson/model/Hudson/newView.jelly
    +++ b/core/src/main/resources/hudson/model/Hudson/newView.jelly
    @@ -33,7 +33,7 @@ THE SOFTWARE.
         <l:main-panel>
           <f:form method="post" action="createView" name="createView">
             <f:entry title="${%View name}">
    -          <f:textbox id="name" name="name" checkUrl="'${rootURL}/viewExistsCheck?value='+encodeURIComponent(this.value)"
    +          <f:textbox id="name" name="name" checkUrl="'viewExistsCheck?value='+encodeURIComponent(this.value)"
                          onchange="updateOk(this.form)" onkeyup="updateOk(this.form)" />
               <script>
                 $('name').focus();
    
    From 0c6144ca5b3c1ad0d6b512e109cf8a14c7b5c240 Mon Sep 17 00:00:00 2001
    From: Seiji Sogabe <s.sogabe@gmail.com>
    Date: Sun, 5 Jun 2011 23:45:50 +0900
    Subject: [PATCH 88/91] updated ja.
    
    ---
     .../tasks/junit/History/index_ja.properties   |  6 +++--
     .../widgets/HistoryWidget/entry_ja.properties | 23 +++++++++++++++++++
     2 files changed, 27 insertions(+), 2 deletions(-)
     create mode 100644 core/src/main/resources/hudson/widgets/HistoryWidget/entry_ja.properties
    
    diff --git a/core/src/main/resources/hudson/tasks/junit/History/index_ja.properties b/core/src/main/resources/hudson/tasks/junit/History/index_ja.properties
    index aabcfd20c4..d3aa17dcd6 100644
    --- a/core/src/main/resources/hudson/tasks/junit/History/index_ja.properties
    +++ b/core/src/main/resources/hudson/tasks/junit/History/index_ja.properties
    @@ -1,6 +1,6 @@
     # The MIT License
     #
    -# Copyright (c) 2004-2010, Sun Microsystems, Inc., Seiji Sogabe
    +# Copyright (c) 2004-2011, Sun Microsystems, Inc., Seiji Sogabe
     #
     # Permission is hereby granted, free of charge, to any person obtaining a copy
     # of this software and associated documentation files (the "Software"), to deal
    @@ -22,4 +22,6 @@
     
     title={0}\u306e\u5c65\u6b74
     More\ than\ 1\ builds\ are\ needed\ for\ the\ chart.=\
    - \u30c1\u30e3\u30fc\u30c8\u3092\u8868\u793a\u3059\u308b\u306b\u306f\u30012\u500b\u4ee5\u4e0a\u306e\u30d3\u30eb\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002
    \ No newline at end of file
    + \u30c1\u30e3\u30fc\u30c8\u3092\u8868\u793a\u3059\u308b\u306b\u306f\u30012\u500b\u4ee5\u4e0a\u306e\u30d3\u30eb\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002
    +Newer=\u65b0\u3057\u3044\u5c65\u6b74\u3078
    +Older=\u53e4\u3044\u5c65\u6b74\u3078
    \ No newline at end of file
    diff --git a/core/src/main/resources/hudson/widgets/HistoryWidget/entry_ja.properties b/core/src/main/resources/hudson/widgets/HistoryWidget/entry_ja.properties
    new file mode 100644
    index 0000000000..3d7a5f4e2b
    --- /dev/null
    +++ b/core/src/main/resources/hudson/widgets/HistoryWidget/entry_ja.properties
    @@ -0,0 +1,23 @@
    +# The MIT License
    +# 
    +# Copyright (c) 2004-2011, Seiji Sogabe
    +# 
    +# Permission is hereby granted, free of charge, to any person obtaining a copy
    +# of this software and associated documentation files (the "Software"), to deal
    +# in the Software without restriction, including without limitation the rights
    +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +# copies of the Software, and to permit persons to whom the Software is
    +# furnished to do so, subject to the following conditions:
    +# 
    +# The above copyright notice and this permission notice shall be included in
    +# all copies or substantial portions of the Software.
    +# 
    +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +# THE SOFTWARE.
    +
    +Console\ Output=\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b
    \ No newline at end of file
    
    From e4a846d3b58b79a975d8b4d96cad76575db159af Mon Sep 17 00:00:00 2001
    From: Dominic Mitchell <dom@happygiraffe.net>
    Date: Sun, 5 Jun 2011 13:09:46 -0700
    Subject: [PATCH 89/91] Strip whitespace on maven installation.
    
    ---
     core/src/main/java/hudson/tasks/Maven.java | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/core/src/main/java/hudson/tasks/Maven.java b/core/src/main/java/hudson/tasks/Maven.java
    index 5ad114f2b3..9e09ed6f75 100644
    --- a/core/src/main/java/hudson/tasks/Maven.java
    +++ b/core/src/main/java/hudson/tasks/Maven.java
    @@ -381,7 +381,7 @@ public class Maven extends Builder {
     
             @DataBoundConstructor
             public MavenInstallation(String name, String home, List<? extends ToolProperty<?>> properties) {
    -            super(name, home, properties);
    +            super(Util.fixEmptyAndTrim(name), Util.fixEmptyAndTrim(home), properties);
             }
     
             /**
    
    From 5da00d03b4576995265fc2ba114e1e0c0760e106 Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 14:47:08 -0700
    Subject: [PATCH 90/91] Fixed the test failures.
    
    ---
     .../src/test/java/hudson/tasks/junit/SuiteResultTest.java     | 4 +++-
     .../src/test/java/hudson/tasks/junit/TestResultTest.java      | 3 ++-
     .../hudson/tasks/junit/eclipse-plugin-test-report.xml         | 0
     .../test/resources/hudson/tasks/junit/junit-report-1233.xml   | 0
     .../test/resources/hudson/tasks/junit/junit-report-1463.xml   | 0
     .../test/resources/hudson/tasks/junit/junit-report-1472.xml   | 0
     .../test/resources/hudson/tasks/junit/junit-report-2874.xml   | 0
     .../hudson/tasks/junit/junit-report-errror-details.xml        | 0
     .../src/test/resources/hudson/tasks/junit/junitResult.xml     | 0
     9 files changed, 5 insertions(+), 2 deletions(-)
     rename {core => test}/src/test/java/hudson/tasks/junit/SuiteResultTest.java (98%)
     rename {core => test}/src/test/java/hudson/tasks/junit/TestResultTest.java (97%)
     rename {core => test}/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml (100%)
     rename {core => test}/src/test/resources/hudson/tasks/junit/junit-report-1233.xml (100%)
     rename {core => test}/src/test/resources/hudson/tasks/junit/junit-report-1463.xml (100%)
     rename {core => test}/src/test/resources/hudson/tasks/junit/junit-report-1472.xml (100%)
     rename {core => test}/src/test/resources/hudson/tasks/junit/junit-report-2874.xml (100%)
     rename {core => test}/src/test/resources/hudson/tasks/junit/junit-report-errror-details.xml (100%)
     rename {core => test}/src/test/resources/hudson/tasks/junit/junitResult.xml (100%)
    
    diff --git a/core/src/test/java/hudson/tasks/junit/SuiteResultTest.java b/test/src/test/java/hudson/tasks/junit/SuiteResultTest.java
    similarity index 98%
    rename from core/src/test/java/hudson/tasks/junit/SuiteResultTest.java
    rename to test/src/test/java/hudson/tasks/junit/SuiteResultTest.java
    index b10096fe83..8383b103bc 100755
    --- a/core/src/test/java/hudson/tasks/junit/SuiteResultTest.java
    +++ b/test/src/test/java/hudson/tasks/junit/SuiteResultTest.java
    @@ -30,6 +30,8 @@ import java.net.URISyntaxException;
     import junit.framework.TestCase;
     
     import hudson.XmlFile;
    +import org.jvnet.hudson.test.HudsonTestCase;
    +
     import java.io.FileWriter;
     import java.io.PrintWriter;
     import java.io.Writer;
    @@ -41,7 +43,7 @@ import java.io.Writer;
      * 
      * @author Erik Ramfelt
      */
    -public class SuiteResultTest extends TestCase {
    +public class SuiteResultTest extends HudsonTestCase {
     
         private File getDataFile(String name) throws URISyntaxException {
             return new File(SuiteResultTest.class.getResource(name).toURI());
    diff --git a/core/src/test/java/hudson/tasks/junit/TestResultTest.java b/test/src/test/java/hudson/tasks/junit/TestResultTest.java
    similarity index 97%
    rename from core/src/test/java/hudson/tasks/junit/TestResultTest.java
    rename to test/src/test/java/hudson/tasks/junit/TestResultTest.java
    index 51cb06166c..7c2aa16edc 100644
    --- a/core/src/test/java/hudson/tasks/junit/TestResultTest.java
    +++ b/test/src/test/java/hudson/tasks/junit/TestResultTest.java
    @@ -32,12 +32,13 @@ import java.net.URISyntaxException;
     import java.util.Collection;
     import java.util.List;
     import junit.framework.TestCase;
    +import org.jvnet.hudson.test.HudsonTestCase;
     
     /**
      *
      * @author dty
      */
    -public class TestResultTest extends TestCase {
    +public class TestResultTest extends HudsonTestCase {
         private File getDataFile(String name) throws URISyntaxException {
             return new File(TestResultTest.class.getResource(name).toURI());
         }
    diff --git a/core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml b/test/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
    similarity index 100%
    rename from core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
    rename to test/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
    diff --git a/core/src/test/resources/hudson/tasks/junit/junit-report-1233.xml b/test/src/test/resources/hudson/tasks/junit/junit-report-1233.xml
    similarity index 100%
    rename from core/src/test/resources/hudson/tasks/junit/junit-report-1233.xml
    rename to test/src/test/resources/hudson/tasks/junit/junit-report-1233.xml
    diff --git a/core/src/test/resources/hudson/tasks/junit/junit-report-1463.xml b/test/src/test/resources/hudson/tasks/junit/junit-report-1463.xml
    similarity index 100%
    rename from core/src/test/resources/hudson/tasks/junit/junit-report-1463.xml
    rename to test/src/test/resources/hudson/tasks/junit/junit-report-1463.xml
    diff --git a/core/src/test/resources/hudson/tasks/junit/junit-report-1472.xml b/test/src/test/resources/hudson/tasks/junit/junit-report-1472.xml
    similarity index 100%
    rename from core/src/test/resources/hudson/tasks/junit/junit-report-1472.xml
    rename to test/src/test/resources/hudson/tasks/junit/junit-report-1472.xml
    diff --git a/core/src/test/resources/hudson/tasks/junit/junit-report-2874.xml b/test/src/test/resources/hudson/tasks/junit/junit-report-2874.xml
    similarity index 100%
    rename from core/src/test/resources/hudson/tasks/junit/junit-report-2874.xml
    rename to test/src/test/resources/hudson/tasks/junit/junit-report-2874.xml
    diff --git a/core/src/test/resources/hudson/tasks/junit/junit-report-errror-details.xml b/test/src/test/resources/hudson/tasks/junit/junit-report-errror-details.xml
    similarity index 100%
    rename from core/src/test/resources/hudson/tasks/junit/junit-report-errror-details.xml
    rename to test/src/test/resources/hudson/tasks/junit/junit-report-errror-details.xml
    diff --git a/core/src/test/resources/hudson/tasks/junit/junitResult.xml b/test/src/test/resources/hudson/tasks/junit/junitResult.xml
    similarity index 100%
    rename from core/src/test/resources/hudson/tasks/junit/junitResult.xml
    rename to test/src/test/resources/hudson/tasks/junit/junitResult.xml
    
    From 2ff3cabba21b53eaa726e1387752da378e55fbdc Mon Sep 17 00:00:00 2001
    From: Kohsuke Kawaguchi <kk@kohsuke.org>
    Date: Sun, 5 Jun 2011 16:15:43 -0700
    Subject: [PATCH 91/91] Parsing can happen in the forked Maven process. Support
     remoting.
    
    ---
     .../java/hudson/tasks/junit/SuiteResult.java  |  2 +-
     .../java/hudson/tasks/junit/TestResult.java   |  2 ++
     .../hudson/util/io/ParserConfigurator.java    | 26 ++++++++++++++++---
     3 files changed, 26 insertions(+), 4 deletions(-)
    
    diff --git a/core/src/main/java/hudson/tasks/junit/SuiteResult.java b/core/src/main/java/hudson/tasks/junit/SuiteResult.java
    index 067d4e6999..06761acc97 100644
    --- a/core/src/main/java/hudson/tasks/junit/SuiteResult.java
    +++ b/core/src/main/java/hudson/tasks/junit/SuiteResult.java
    @@ -102,7 +102,7 @@ public final class SuiteResult implements Serializable {
          * This method returns a collection, as a single XML may have multiple &lt;testsuite>
          * elements wrapped into the top-level &lt;testsuites>.
          */
    -    static List<SuiteResult> parse(File xmlReport, boolean keepLongStdio) throws DocumentException, IOException {
    +    static List<SuiteResult> parse(File xmlReport, boolean keepLongStdio) throws DocumentException, IOException, InterruptedException {
             List<SuiteResult> r = new ArrayList<SuiteResult>();
     
             // parse into DOM
    diff --git a/core/src/main/java/hudson/tasks/junit/TestResult.java b/core/src/main/java/hudson/tasks/junit/TestResult.java
    index 44e3122294..43f6c98738 100644
    --- a/core/src/main/java/hudson/tasks/junit/TestResult.java
    +++ b/core/src/main/java/hudson/tasks/junit/TestResult.java
    @@ -199,6 +199,8 @@ public final class TestResult extends MetaTabulatedResult {
             try {
                 for (SuiteResult suiteResult : SuiteResult.parse(reportFile, keepLongStdio))
                     add(suiteResult);
    +        } catch (InterruptedException e) {
    +            throw new IOException2("Failed to read "+reportFile,e);
             } catch (RuntimeException e) {
                 throw new IOException2("Failed to read "+reportFile,e);
             } catch (DocumentException e) {
    diff --git a/core/src/main/java/hudson/util/io/ParserConfigurator.java b/core/src/main/java/hudson/util/io/ParserConfigurator.java
    index c2bae27673..97907a8937 100644
    --- a/core/src/main/java/hudson/util/io/ParserConfigurator.java
    +++ b/core/src/main/java/hudson/util/io/ParserConfigurator.java
    @@ -26,8 +26,16 @@ package hudson.util.io;
     import hudson.ExtensionList;
     import hudson.ExtensionPoint;
     import hudson.model.Hudson;
    +import hudson.remoting.Callable;
    +import hudson.remoting.Channel;
     import org.dom4j.io.SAXReader;
     
    +import java.io.IOException;
    +import java.io.Serializable;
    +import java.util.ArrayList;
    +import java.util.Collection;
    +import java.util.Collections;
    +
     /**
      * Configures XML parsers to be used for various XML parsing activities inside Jenkins.
      *
    @@ -45,7 +53,7 @@ import org.dom4j.io.SAXReader;
      * @author Kohsuke Kawaguchi
      * @since 1.416
      */
    -public abstract class ParserConfigurator implements ExtensionPoint {
    +public abstract class ParserConfigurator implements ExtensionPoint, Serializable {
         /**
          * Configures the given {@link SAXReader}
          *
    @@ -62,8 +70,20 @@ public abstract class ParserConfigurator implements ExtensionPoint {
             return Hudson.getInstance().getExtensionList(ParserConfigurator.class);
         }
     
    -    public static void applyConfiguration(SAXReader reader, Object context) {
    -        for (ParserConfigurator pc : all())
    +    public static void applyConfiguration(SAXReader reader, Object context) throws IOException, InterruptedException {
    +        Collection<ParserConfigurator> all = Collections.emptyList();
    +
    +        if (Hudson.getInstance()==null) {
    +            Channel ch = Channel.current();
    +            if (ch!=null)
    +                all = ch.call(new Callable<Collection<ParserConfigurator>, IOException>() {
    +                    public Collection<ParserConfigurator> call() throws IOException {
    +                        return new ArrayList<ParserConfigurator>(all());
    +                    }
    +                });
    +        } else
    +            all = all();
    +        for (ParserConfigurator pc : all)
                 pc.configure(reader,context);
         }
     }