tmpToolInstallerEntries = new LinkedList<>();
+ //we need to skip the processed entries
+ boolean processed[] = new boolean[reducedToolEntries.size()];
+ for (int i = 0; i < reducedToolEntries.size(); i++) {
+ if (processed[i] == true) {
+ continue;
+ }
+ ToolInstallerEntry data1 = reducedToolEntries.get(i);
+ boolean hasDuplicate = false;
+ for (int j = i + 1; j < reducedToolEntries.size(); j ++) {
+ ToolInstallerEntry data2 = reducedToolEntries.get(j);
+ //if we found a duplicate we choose the first one
+ if (data1.id.equals(data2.id)) {
+ hasDuplicate = true;
+ processed[j] = true;
+ tmpToolInstallerEntries.add(data1);
+ //after the first duplicate has been found we break the loop since the duplicates are
+ //processed two by two
+ break;
+ }
+ }
+ //if no duplicate has been found we just insert the entry in the tmp list
+ if (!hasDuplicate) {
+ tmpToolInstallerEntries.add(data1);
+ }
+ }
+ reducedToolEntries = tmpToolInstallerEntries;
+ }
+
+ ToolInstallerList toolInstallerList = new ToolInstallerList();
+ toolInstallerList.list = new ToolInstallerEntry[reducedToolEntries.size()];
+ reducedToolEntries.toArray(toolInstallerList.list);
+ JSONObject reducedToolEntriesJsonList = JSONObject.fromObject(toolInstallerList);
+ //return the list with no duplicates
+ return reducedToolEntriesJsonList;
+ }
+
/**
* This ID needs to be unique, and needs to match the ID token in the JSON update file.
*
diff --git a/core/src/main/java/hudson/tools/JDKInstaller.java b/core/src/main/java/hudson/tools/JDKInstaller.java
index 9072437af8..d270769de1 100644
--- a/core/src/main/java/hudson/tools/JDKInstaller.java
+++ b/core/src/main/java/hudson/tools/JDKInstaller.java
@@ -32,6 +32,7 @@ import hudson.ProxyConfiguration;
import hudson.Util;
import hudson.model.DownloadService.Downloadable;
import hudson.model.JDK;
+import hudson.model.Job;
import hudson.model.Node;
import hudson.model.TaskListener;
import hudson.util.ArgumentListBuilder;
@@ -41,6 +42,7 @@ import hudson.util.Secret;
import jenkins.model.Jenkins;
import jenkins.security.MasterToSlaveCallable;
import net.sf.json.JSONObject;
+import net.sf.json.JsonConfig;
import org.apache.commons.httpclient.Cookie;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethodBase;
@@ -69,6 +71,7 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.logging.Logger;
@@ -669,8 +672,8 @@ public class JDKInstaller extends ToolInstaller {
}
public static final class JDKFamilyList {
- public int version;
public JDKFamily[] data = new JDKFamily[0];
+ public int version;
public boolean isEmpty() {
for (JDKFamily f : data) {
@@ -697,6 +700,18 @@ public class JDKInstaller extends ToolInstaller {
}
public static final class JDKRelease {
+ /**
+ * the list of {@Link JDKFile}s
+ */
+ public JDKFile[] files;
+ /**
+ * the license path
+ */
+ public String licpath;
+ /**
+ * the license title
+ */
+ public String lictitle;
/**
* This maps to the former product code, like "jdk-6u13-oth-JPR"
*/
@@ -705,7 +720,6 @@ public class JDKInstaller extends ToolInstaller {
* This is human readable.
*/
public String title;
- public JDKFile[] files;
/**
* We used to use IDs like "jdk-6u13-oth-JPR@CDS-CDS_Developer", but Oracle switched to just "jdk-6u13-oth-JPR".
@@ -717,9 +731,9 @@ public class JDKInstaller extends ToolInstaller {
}
public static final class JDKFile {
+ public String filepath;
public String name;
public String title;
- public String filepath;
}
@Override
@@ -802,6 +816,123 @@ public class JDKInstaller extends ToolInstaller {
if(d==null) return new JDKFamilyList();
return (JDKFamilyList)JSONObject.toBean(d,JDKFamilyList.class);
}
+
+ /**
+ * @{inheritDoc}
+ */
+ @Override
+ public JSONObject reduce (List jsonObjectList) {
+ List reducedFamilies = new LinkedList<>();
+ int version = 0;
+ JsonConfig jsonConfig = new JsonConfig();
+ jsonConfig.registerPropertyExclusion(JDKFamilyList.class, "empty");
+ jsonConfig.setRootClass(JDKFamilyList.class);
+ //collect all JDKFamily objects from the multiple json objects
+ for (JSONObject jsonJdkFamilyList : jsonObjectList) {
+ JDKFamilyList jdkFamilyList = (JDKFamilyList)JSONObject.toBean(jsonJdkFamilyList, jsonConfig);
+ if (version == 0) {
+ //we set as version the version of the first update center
+ version = jdkFamilyList.version;
+ }
+ JDKFamily[] jdkFamilies = jdkFamilyList.data;
+ reducedFamilies.addAll(Arrays.asList(jdkFamilies));
+ }
+ //we iterate on the list and reduce it until there are no more duplicates
+ //this could be made recursive
+ while (hasDuplicates(reducedFamilies, "name")) {
+ //create a temporary list to store the tmp result
+ List tmpReducedFamilies = new LinkedList<>();
+ //we need to skip the processed families
+ boolean processed [] = new boolean[reducedFamilies.size()];
+ for (int i = 0; i < reducedFamilies.size(); i ++ ) {
+ if (processed [i] == true) {
+ continue;
+ }
+ JDKFamily data1 = reducedFamilies.get(i);
+ boolean hasDuplicate = false;
+ for (int j = i + 1; j < reducedFamilies.size(); j ++ ) {
+ JDKFamily data2 = reducedFamilies.get(j);
+ //if we found a duplicate we need to merge the families
+ if (data1.name.equals(data2.name)) {
+ hasDuplicate = true;
+ processed [j] = true;
+ JDKFamily reducedData = reduceData(data1.name, new LinkedList(Arrays.asList(data1.releases)), new LinkedList(Arrays.asList(data2.releases)));
+ tmpReducedFamilies.add(reducedData);
+ //after the first duplicate has been found we break the loop since the duplicates are
+ //processed two by two
+ break;
+ }
+ }
+ //if no duplicate has been found we just insert the whole family in the tmp list
+ if (!hasDuplicate) {
+ tmpReducedFamilies.add(data1);
+ }
+ }
+ reducedFamilies = tmpReducedFamilies;
+ }
+ JDKFamilyList jdkFamilyList = new JDKFamilyList();
+ jdkFamilyList.version = version;
+ jdkFamilyList.data = new JDKFamily[reducedFamilies.size()];
+ reducedFamilies.toArray(jdkFamilyList.data);
+ JSONObject reducedJdkFamilyList = JSONObject.fromObject(jdkFamilyList, jsonConfig);
+ //return the list with no duplicates
+ return reducedJdkFamilyList;
+ }
+
+ private JDKFamily reduceData(String name, List releases1, List releases2) {
+ LinkedList reducedReleases = new LinkedList<>();
+ for (Iterator iterator = releases1.iterator(); iterator.hasNext(); ) {
+ JDKRelease release1 = iterator.next();
+ boolean hasDuplicate = false;
+ for (Iterator iterator2 = releases2.iterator(); iterator2.hasNext(); ) {
+ JDKRelease release2 = iterator2.next();
+ if (release1.name.equals(release2.name)) {
+ hasDuplicate = true;
+ JDKRelease reducedRelease = reduceReleases(release1, new LinkedList(Arrays.asList(release1.files)), new LinkedList(Arrays.asList(release2.files)));
+ iterator2.remove();
+ reducedReleases.add(reducedRelease);
+ //we assume that in one release list there are no duplicates so we stop at the first one
+ break;
+ }
+ }
+ if (!hasDuplicate) {
+ reducedReleases.add(release1);
+ }
+ }
+ reducedReleases.addAll(releases2);
+ JDKFamily reducedFamily = new JDKFamily();
+ reducedFamily.name = name;
+ reducedFamily.releases = new JDKRelease[reducedReleases.size()];
+ reducedReleases.toArray(reducedFamily.releases);
+ return reducedFamily;
+ }
+
+ private JDKRelease reduceReleases(JDKRelease release, List files1, List files2) {
+ LinkedList reducedFiles = new LinkedList<>();
+ for (Iterator iterator1 = files1.iterator(); iterator1.hasNext(); ) {
+ JDKFile file1 = iterator1.next();
+ for (Iterator iterator2 = files2.iterator(); iterator2.hasNext(); ) {
+ JDKFile file2 = iterator2.next();
+ if (file1.name.equals(file2.name)) {
+ iterator2.remove();
+ //we assume the in one file list there are no duplicates so we break after we find the
+ //first match
+ break;
+ }
+ }
+ }
+ reducedFiles.addAll(files1);
+ reducedFiles.addAll(files2);
+
+ JDKRelease jdkRelease = new JDKRelease();
+ jdkRelease.files = new JDKFile[reducedFiles.size()];
+ reducedFiles.toArray(jdkRelease.files);
+ jdkRelease.name = release.name;
+ jdkRelease.licpath = release.licpath;
+ jdkRelease.lictitle = release.lictitle;
+ jdkRelease.title = release.title;
+ return jdkRelease;
+ }
}
private static final Logger LOGGER = Logger.getLogger(JDKInstaller.class.getName());
diff --git a/core/src/main/java/hudson/tools/ToolInstaller.java b/core/src/main/java/hudson/tools/ToolInstaller.java
index 0c798b4f52..94da3ea494 100644
--- a/core/src/main/java/hudson/tools/ToolInstaller.java
+++ b/core/src/main/java/hudson/tools/ToolInstaller.java
@@ -36,6 +36,8 @@ import hudson.model.TaskListener;
import java.io.File;
import java.io.IOException;
+import org.kohsuke.accmod.Restricted;
+import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.DataBoundConstructor;
/**
@@ -129,4 +131,47 @@ public abstract class ToolInstaller implements Describable, Exten
public ToolInstallerDescriptor> getDescriptor() {
return (ToolInstallerDescriptor) Jenkins.getInstance().getDescriptorOrDie(getClass());
}
+
+ @Restricted(NoExternalUse.class)
+ public static final class ToolInstallerList {
+ /**
+ * the list of {@link ToolInstallerEntry}
+ */
+ public ToolInstallerEntry [] list;
+ }
+
+ @Restricted(NoExternalUse.class)
+ public static final class ToolInstallerEntry {
+ /**
+ * the id of the of the release entry
+ */
+ public String id;
+ /**
+ * the name of the release entry
+ */
+ public String name;
+ /**
+ * the url of the release
+ */
+ public String url;
+
+ /**
+ * public default constructor needed by the JSON parser
+ */
+ public ToolInstallerEntry() {
+
+ }
+
+ /**
+ * The constructor
+ * @param id the id of the release
+ * @param name the name of the release
+ * @param url the URL of thr release
+ */
+ public ToolInstallerEntry (String id, String name, String url) {
+ this.id = id;
+ this.name = name;
+ this.url = url;
+ }
+ }
}
diff --git a/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java b/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
index c93b4e8be1..25ac5f4dfc 100644
--- a/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
+++ b/core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
@@ -353,7 +353,19 @@ public abstract class AbstractLazyLoadRunMap extends AbstractMap i
if (v!=null) return v; // already in memory
// otherwise fall through to load
}
- return load(n, null);
+ synchronized (this) {
+ if (index.byNumber.containsKey(n)) { // JENKINS-22767: recheck inside lock
+ BuildReference ref = index.byNumber.get(n);
+ if (ref == null) {
+ return null;
+ }
+ R v = unwrap(ref);
+ if (v != null) {
+ return v;
+ }
+ }
+ return load(n, null);
+ }
}
protected final synchronized void proposeNewNumber(int number) throws IllegalStateException {
@@ -443,7 +455,8 @@ public abstract class AbstractLazyLoadRunMap extends AbstractMap i
*
* @return null if the data failed to load.
*/
- protected R load(int n, Index editInPlace) {
+ private R load(int n, Index editInPlace) {
+ assert Thread.holdsLock(this);
assert dir != null;
R v = load(new File(dir, String.valueOf(n)), editInPlace);
if (v==null && editInPlace!=null) {
@@ -460,7 +473,8 @@ public abstract class AbstractLazyLoadRunMap extends AbstractMap i
* If non-null, update this data structure.
* Otherwise do a copy-on-write of {@link #index}
*/
- protected synchronized R load(File dataDir, Index editInPlace) {
+ private R load(File dataDir, Index editInPlace) {
+ assert Thread.holdsLock(this);
try {
R r = retrieve(dataDir);
if (r==null) return null;
diff --git a/core/src/main/resources/hudson/Messages_pl.properties b/core/src/main/resources/hudson/Messages_pl.properties
new file mode 100644
index 0000000000..3c92922c27
--- /dev/null
+++ b/core/src/main/resources/hudson/Messages_pl.properties
@@ -0,0 +1,26 @@
+# The MIT License
+#
+# Copyright (c) 2016, Damian Szczepanik
+#
+# 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.
+
+PluginManager.DisplayName=Menad\u017Cer wtyczek
+PluginManager.PluginIsAlreadyInstalled.RestartRequired=Wtyczka {0} by\u0142a ju\u017C zainstalowana. Jenkins musi zosta\u0107 ponownie uruchomiony, aby zaktualizowa\u0107 wtyczk\u0119.
+AboutJenkins.DisplayName=Informacje o Jenkinsie
+AboutJenkins.Description=Sprawd\u017A wersj\u0119 i licencj\u0119
diff --git a/core/src/main/resources/hudson/PluginManager/check_pl.properties b/core/src/main/resources/hudson/PluginManager/check_pl.properties
index 2003bf8df1..579836ad90 100644
--- a/core/src/main/resources/hudson/PluginManager/check_pl.properties
+++ b/core/src/main/resources/hudson/PluginManager/check_pl.properties
@@ -21,3 +21,4 @@
# THE SOFTWARE.
Check\ now=Sprawd\u017A teraz
+lastUpdated=Ostatnie sprawdzenie: {0} temu
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/PluginManager/installed_pl.properties b/core/src/main/resources/hudson/PluginManager/installed_pl.properties
index 799c461da7..47bc109f16 100644
--- a/core/src/main/resources/hudson/PluginManager/installed_pl.properties
+++ b/core/src/main/resources/hudson/PluginManager/installed_pl.properties
@@ -31,4 +31,5 @@ Uninstall=Odinstaluj
Unpin=Odepnij
Version=Wersja
downgradeTo=Powr\u00F3\u0107 do starszej wersji {0}
+requires.restart=Wymagane jest ponowne uruchomienie Jenkinsa. Zmiany wtyczek w tym momencie s\u0105 bardzo niewskazane. Uruchom ponownie Jenkinsa, zanim wprowadzisz zmiany.
wiki.url=http://wiki.jenkins-ci.org/display/JENKINS/Pinned+Plugins
diff --git a/core/src/main/resources/hudson/model/Messages_pl.properties b/core/src/main/resources/hudson/model/Messages_pl.properties
index e36ad43a25..db0c2b82ed 100644
--- a/core/src/main/resources/hudson/model/Messages_pl.properties
+++ b/core/src/main/resources/hudson/model/Messages_pl.properties
@@ -1 +1,25 @@
-ParametersDefinitionProperty.DisplayName=Ten build jest sparametryzowany
+ParametersDefinitionProperty.DisplayName=To budowanie jest sparametryzowane
+ManageJenkinsAction.DisplayName=Zarz\u0105dzaj Jenkinsem
+
+Job.AllRecentBuildFailed=Wszystkie ostatnie budowania nie powiod\u0142y si\u0119.
+Job.BuildStability=Stabilno\u015B\u0107 budowa\u0144: {0}
+Job.NOfMFailed={0} spo\u015Br\u00F3d {1} ostatnich budowa\u0144 nie powiod\u0142o si\u0119.
+Job.NoRecentBuildFailed=Brak ostatnich budowa\u0144 zako\u0144czonych niepowodzeniem.
+AbstractProject.Pronoun=Projekt
+
+BallColor.Aborted=Przerwane
+BallColor.Disabled=Zablokowane
+BallColor.Failed=Nie powiod\u0142o si\u0119
+BallColor.InProgress=W trakcie
+BallColor.NotBuilt=Nie zbudowane
+BallColor.Pending=W oczekiwaniu
+BallColor.Success=Pomy\u015Blne
+BallColor.Unstable=Niestabilne
+
+Permalink.LastBuild=Ostatnie budowanie
+Permalink.LastStableBuild=Ostatnie stabilne budowanie
+Permalink.LastUnstableBuild=Ostatnie niestabilne budowanie
+Permalink.LastUnsuccessfulBuild=Ostatnie niepomy\u015Blne budowanie
+Permalink.LastSuccessfulBuild=Ostatnie pomy\u015Blne budowanie
+Permalink.LastFailedBuild=Ostatnie niepomy\u015Blne budowanie
+Permalink.LastCompletedBuild=Ostatnie zako\u0144czone budowanie
diff --git a/core/src/main/resources/hudson/model/ParametersAction/index.jelly b/core/src/main/resources/hudson/model/ParametersAction/index.jelly
index 2c25579adc..72ed664c44 100644
--- a/core/src/main/resources/hudson/model/ParametersAction/index.jelly
+++ b/core/src/main/resources/hudson/model/ParametersAction/index.jelly
@@ -35,12 +35,21 @@ THE SOFTWARE.
${%Build} ${build.displayName}
-
-
-
-
-
+
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/body_pl.properties b/core/src/main/resources/hudson/model/UpdateCenter/body_pl.properties
index d63f523d32..7515413d86 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/body_pl.properties
+++ b/core/src/main/resources/hudson/model/UpdateCenter/body_pl.properties
@@ -21,5 +21,5 @@
# THE SOFTWARE.
Go\ back\ to\ the\ top\ page=Wr\u00F3\u0107 do strony g\u0142\u00F3wnej
-warning=Zrestartuj Jenkinsa gdy instalacja si\u0119 zako\u0144czy i \u017Cadne zadanie nie b\u0119dzie wykonywane
+warning=Zrestartuj Jenkinsa, gdy instalacja si\u0119 zako\u0144czy i \u017Cadne zadanie nie b\u0119dzie wykonywane
you\ can\ start\ using\ the\ installed\ plugins\ right\ away=Mo\u017Cesz ju\u017C zacz\u0105\u0107 korzysta\u0107 z zainstalowanych wtyczek
diff --git a/core/src/main/resources/hudson/util/HudsonIsLoading/index_pl.properties b/core/src/main/resources/hudson/util/HudsonIsLoading/index_pl.properties
index 6fa1705003..f97f2f8647 100644
--- a/core/src/main/resources/hudson/util/HudsonIsLoading/index_pl.properties
+++ b/core/src/main/resources/hudson/util/HudsonIsLoading/index_pl.properties
@@ -1,4 +1,4 @@
# This file is under the MIT License by authors
-Please\ wait\ while\ Jenkins\ is\ getting\ ready\ to\ work=Poczekaj prosz\u0119 a\u017C Jenkins b\u0119dzie gotowy do pracy
-Your\ browser\ will\ reload\ automatically\ when\ Jenkins\ is\ ready.=Twoja przegl\u0105darka prze\u0142aduje si\u0119 automatycznie kiedy Jenkins b\u0119dzie gotowy.
+Please\ wait\ while\ Jenkins\ is\ getting\ ready\ to\ work=Poczekaj prosz\u0119, a\u017C Jenkins b\u0119dzie gotowy do pracy
+Your\ browser\ will\ reload\ automatically\ when\ Jenkins\ is\ ready.=Twoja przegl\u0105darka automatycznie prze\u0142aduje stron\u0119, kiedy Jenkins b\u0119dzie gotowy.
diff --git a/core/src/main/resources/hudson/views/BuildButtonColumn/column_pl.properties b/core/src/main/resources/hudson/views/BuildButtonColumn/column_pl.properties
index 2b3d505f7b..ef61b47961 100644
--- a/core/src/main/resources/hudson/views/BuildButtonColumn/column_pl.properties
+++ b/core/src/main/resources/hudson/views/BuildButtonColumn/column_pl.properties
@@ -20,6 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-Build_scheduled=Zaplanowany build
-Schedule_a_build=Dodaj kompilacj\u0119 do kolejki dla {0}
+Build_scheduled=Budowanie zaplanowane
+Schedule_a_build=Dodaj budowanie do kolejki dla {0}
Schedule_a_build_with_parameters=Zbuduj z parametrami dla {0}
diff --git a/core/src/main/resources/hudson/views/LastDurationColumn/columnHeader_pl.properties b/core/src/main/resources/hudson/views/LastDurationColumn/columnHeader_pl.properties
index a7ea02acbf..772faa8053 100644
--- a/core/src/main/resources/hudson/views/LastDurationColumn/columnHeader_pl.properties
+++ b/core/src/main/resources/hudson/views/LastDurationColumn/columnHeader_pl.properties
@@ -20,4 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-Last\ Duration=Ostatni Czas Trwania
+Last\ Duration=Czas ostatniego budowania
diff --git a/core/src/main/resources/hudson/widgets/Messages_pl.properties b/core/src/main/resources/hudson/widgets/Messages_pl.properties
new file mode 100644
index 0000000000..37de7c67a6
--- /dev/null
+++ b/core/src/main/resources/hudson/widgets/Messages_pl.properties
@@ -0,0 +1,23 @@
+# The MIT License
+#
+# Copyright (c) 2016, Damian Szczepanik
+#
+# 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.
+
+BuildHistoryWidget.DisplayName=Historia budowa\u0144
diff --git a/core/src/main/resources/jenkins/model/Jenkins/legend_pl.properties b/core/src/main/resources/jenkins/model/Jenkins/legend_pl.properties
index 3e072ee764..5dcd092fc6 100644
--- a/core/src/main/resources/jenkins/model/Jenkins/legend_pl.properties
+++ b/core/src/main/resources/jenkins/model/Jenkins/legend_pl.properties
@@ -4,7 +4,12 @@ blue=Ostatnie budowanie projektu zako\u0144czy\u0142o si\u0119 pomy\u015Blnie.
blue_anime=Ostatnie budowanie projektu zako\u0144czy\u0142o si\u0119 pomy\u015Blnie. Nowa wersja jest w trakcie budowy.
grey=Projekt nie zosta\u0142 dotychczas zbudowany lub jest wy\u0142\u0105czony.
grey_anime=Trwa pierwsze budowanie projektu.
-red=Ostatnia wgrywka nie powiod\u0142a si\u0119.
-red_anime=Ostatnia wgrywka nie powiod\u0142a si\u0119. Nowa wersja jest w trakcie budowy.
+red=Ostatnie budowanie projektu nie powiod\u0142o si\u0119.
+red_anime=Ostatnie budowanie projektu nie powiod\u0142o si\u0119. Nowa wersja jest w trakcie budowy.
yellow=Ostatnie budowanie projektu zako\u0144czy\u0142o si\u0119 pomy\u015Blnie, lecz wersja jest niestabilna. To oznaczenie stosowane jest dla projekt\u00F3w, w kt\u00F3rych testy zako\u0144czy\u0142y si\u0119 niepowodzeniem.
yellow_anime=Ostatnie budowanie projektu zako\u0144czy\u0142o si\u0119 pomy\u015Blnie, lecz wersja jest niestabilna. Nowa wersja jest w trakcie budowy.
+health-81plus=Budowanie zako\u0144czone pomy\u015Blnie w ponad 80 procent przypadk\u00F3w. Przesu\u0144 myszk\u0119 nad ikon\u0119 projektu, aby sprawdzi\u0107 szczeg\u00F3\u0142y.
+health-61to80=Budowanie zako\u0144czone pomy\u015Blnie pomi\u0119dzy 60 a 80 procent przypadk\u00F3w. Przesu\u0144 myszk\u0119 nad ikon\u0119 projektu, aby sprawdzi\u0107 szczeg\u00F3\u0142y.
+health-41to60=Budowanie zako\u0144czone pomy\u015Blnie pomi\u0119dzy 40 a 60 procent przypadk\u00F3w. Przesu\u0144 myszk\u0119 nad ikon\u0119 projektu, aby sprawdzi\u0107 szczeg\u00F3\u0142y.
+health-21to40=Budowanie zako\u0144czone pomy\u015Blnie pomi\u0119dzy 20 a 40 procent przypadk\u00F3w. Przesu\u0144 myszk\u0119 nad ikon\u0119 projektu, aby sprawdzi\u0107 szczeg\u00F3\u0142y.
+health-00to20=Budowanie zako\u0144czone pomy\u015Blnie w poni\u017Cej 20 procent przypadk\u00F3w. Przesu\u0144 myszk\u0119 nad ikon\u0119 projektu, aby sprawdzi\u0107 szczeg\u00F3\u0142y.
diff --git a/core/src/main/resources/jenkins/model/Messages_pl.properties b/core/src/main/resources/jenkins/model/Messages_pl.properties
index a0d73064df..5d8e20a46f 100644
--- a/core/src/main/resources/jenkins/model/Messages_pl.properties
+++ b/core/src/main/resources/jenkins/model/Messages_pl.properties
@@ -1 +1,5 @@
-BuildDiscarderProperty.displayName=Porzu\u0107 stare buildy
+# The MIT License
+
+BuildDiscarderProperty.displayName=Porzu\u0107 stare budowania
+ParameterizedJobMixIn.build_with_parameters=Buduj z parametrami
+ParameterizedJobMixIn.build_now=Buduj teraz
diff --git a/core/src/main/resources/lib/hudson/project/config-concurrentBuild_pl.properties b/core/src/main/resources/lib/hudson/project/config-concurrentBuild_pl.properties
index 14f974c096..7100aeedd3 100644
--- a/core/src/main/resources/lib/hudson/project/config-concurrentBuild_pl.properties
+++ b/core/src/main/resources/lib/hudson/project/config-concurrentBuild_pl.properties
@@ -1,3 +1,3 @@
# This file is under the MIT License by authors
-title.concurrentbuilds=Wykonuj buildy wsp\u00F3\u0142bie\u017Cnie, je\u015Bli zajdzie potrzeba
+title.concurrentbuilds=Wykonuj budowania wsp\u00F3\u0142bie\u017Cnie, je\u015Bli zajdzie potrzeba
diff --git a/core/src/main/resources/lib/hudson/project/config-disableBuild_pl.properties b/core/src/main/resources/lib/hudson/project/config-disableBuild_pl.properties
index d1237e44e8..72f4880d2a 100644
--- a/core/src/main/resources/lib/hudson/project/config-disableBuild_pl.properties
+++ b/core/src/main/resources/lib/hudson/project/config-disableBuild_pl.properties
@@ -1,4 +1,4 @@
# This file is under the MIT License by authors
-Disable\ Build=Zablokuj build
-No\ new\ builds\ will\ be\ executed\ until\ the\ project\ is\ re-enabled.=Nowe buildy nie b\u0119d\u0105 wykonywane dop\u00F3ki projekt nie b\u0119dzie odblokowany
+Disable\ Build=Zablokuj budowanie
+No\ new\ builds\ will\ be\ executed\ until\ the\ project\ is\ re-enabled.=Nowe budowania nie b\u0119d\u0105 wykonywane dop\u00F3ki projekt nie b\u0119dzie odblokowany
diff --git a/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java b/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java
index 88ca41c5d1..4167f668a7 100644
--- a/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java
+++ b/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java
@@ -23,6 +23,7 @@
*/
package jenkins.model.lazy;
+import java.io.File;
import static org.junit.Assert.*;
import jenkins.model.lazy.AbstractLazyLoadRunMap.Direction;
@@ -31,13 +32,19 @@ import org.junit.Rule;
import org.junit.Test;
import java.io.IOException;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.SortedMap;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Future;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
+import jenkins.util.Timer;
import org.junit.BeforeClass;
import org.jvnet.hudson.test.Issue;
@@ -72,6 +79,29 @@ public class AbstractLazyLoadRunMapTest {
}
};
+ private final Map slowBuilderStartSemaphores = new HashMap<>();
+ private final Map slowBuilderEndSemaphores = new HashMap<>();
+ private final Map slowBuilderLoadCount = new HashMap<>();
+ @Rule
+ public FakeMapBuilder slowBuilder = new FakeMapBuilder() {
+ @Override
+ public FakeMap make() {
+ return new FakeMap(getDir()) {
+ @Override
+ protected Build retrieve(File dir) throws IOException {
+ Build b = super.retrieve(dir);
+ slowBuilderStartSemaphores.get(b.n).release();
+ try {
+ slowBuilderEndSemaphores.get(b.n).acquire();
+ } catch (InterruptedException x) {
+ throw new IOException(x);
+ }
+ slowBuilderLoadCount.get(b.n).incrementAndGet();
+ return b;
+ }
+ };
+ }
+ };
@BeforeClass
public static void setUpClass() {
@@ -358,4 +388,36 @@ public class AbstractLazyLoadRunMapTest {
assertTrue(a.entrySet().contains(e));
}
}
+
+ @Issue("JENKINS-22767")
+ @Test
+ public void slowRetrieve() throws Exception {
+ for (int i = 1; i <= 3; i++) {
+ slowBuilder.add(i);
+ slowBuilderStartSemaphores.put(i, new Semaphore(0));
+ slowBuilderEndSemaphores.put(i, new Semaphore(0));
+ slowBuilderLoadCount.put(i, new AtomicInteger());
+ }
+ final FakeMap m = slowBuilder.make();
+ Future firstLoad = Timer.get().submit(new Callable() {
+ @Override
+ public Build call() throws Exception {
+ return m.getByNumber(2);
+ }
+ });
+ Future secondLoad = Timer.get().submit(new Callable() {
+ @Override
+ public Build call() throws Exception {
+ return m.getByNumber(2);
+ }
+ });
+ slowBuilderStartSemaphores.get(2).acquire(1);
+ // now one of them is inside retrieve(…); the other is waiting for the lock
+ slowBuilderEndSemaphores.get(2).release(2); // allow both to proceed
+ Build first = firstLoad.get();
+ Build second = secondLoad.get();
+ assertEquals(1, slowBuilderLoadCount.get(2).get());
+ assertSame(second, first);
+ }
+
}
diff --git a/plugins/pom.xml b/plugins/pom.xml
deleted file mode 100644
index df8053d258..0000000000
--- a/plugins/pom.xml
+++ /dev/null
@@ -1,665 +0,0 @@
-
-
- 4.0.0
-
-
- org.jenkins-ci
- jenkins
- 1.35
-
-
-
- org.jenkins-ci.plugins
- plugin
- Jenkins plugin POM
- 2.0-alpha-1-SNAPSHOT
- pom
-
-
-
- scm:svn:https://svn.jenkins-ci.org/trunk/hudson/plugins/
- scm:svn:https://svn.jenkins-ci.org/trunk/hudson/plugins/
- https://svn.jenkins-ci.org/trunk/hudson/plugins/
- HEAD
-
-
-
- JIRA
- http://issues.jenkins-ci.org/
-
-
-
- UTF-8
- 2
-
- 1.7.7
- 4.0.0
- 2.13.1
-
-
-
-
-
- commons-logging
- commons-logging
- 1.1.3
- provided
-
-
- log4j
- log4j
- 1.2.17
- provided
-
-
-
-
-
- org.jenkins-ci.main
- jenkins-war
- war-for-test
- 2.0-alpha-1-SNAPSHOT
- test
-
-
- org.jenkins-ci.main
- jenkins-core
- 2.0-alpha-1-SNAPSHOT
- provided
-
-
- org.jenkins-ci.main
- jenkins-test-harness
- 2.2
- test
-
-
- org.jenkins-ci
- test-annotations
- 1.2
- test
-
-
-
- javax.servlet
- servlet-api
- 2.4
- provided
-
-
-
- org.codehaus.mojo
- animal-sniffer-annotations
- 1.9
- provided
- true
-
-
- org.slf4j
- slf4j-api
- ${slf4jVersion}
- compile
-
- true
-
-
-
- org.slf4j
- log4j-over-slf4j
- ${slf4jVersion}
- test
-
-
- org.slf4j
- jcl-over-slf4j
- ${slf4jVersion}
- test
-
-
- org.slf4j
- slf4j-jdk14
- ${slf4jVersion}
- test
-
-
-
-
-
- ${project.artifactId}
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- enforce-banned-dependencies
-
- enforce
-
-
-
-
-
- org.sonatype.sisu:sisu-guice
- log4j:log4j:*:jar:compile
- log4j:log4j:*:jar:runtime
- commons-logging:commons-logging:*:jar:compile
- commons-logging:commons-logging:*:jar:runtime
-
-
-
-
-
-
-
-
- org.jenkins-ci.tools
- maven-hpi-plugin
- true
-
- true
- /jenkins
-
-
-
- org.kohsuke.stapler
- maven-stapler-plugin
-
- true
-
-
- maven-release-plugin
-
-
- deploy
-
-
-
- org.jvnet.localizer
- maven-localizer-plugin
-
-
-
-
- generate
-
-
- Messages.properties
- target/generated-sources/localizer
-
-
-
-
-
- maven-javadoc-plugin
-
-
-
- org.codehaus.gmaven
- gmaven-plugin
-
-
-
- test-in-groovy
-
-
- generateTestStubs
- testCompile
-
-
-
-
-
- ant
- ant
- 1.6.5
-
-
-
-
- maven-surefire-plugin
- 2.16
-
-
-
- hudson.udp
- 33849
-
-
- true
- ${concurrency}
-
-
-
- com.cloudbees
- maven-license-plugin
-
-
-
-
- process
-
- prepare-package
-
-
- target/${project.artifactId}/WEB-INF/licenses.xml
-
- if (e.value.packaging=="hpi")
- plugins.add(e.key.id)
- }
-
- // filter out dependencies that don't belong to this plugin
- models.entrySet().removeAll(models.entrySet().findAll { e ->
- def a = e.key;
-
- if (a.dependencyTrail.size()>0 && plugins.contains(a.dependencyTrail[1]))
- return true; // ignore transitive dependencies through other plugins
-
- // if the dependency goes through jenkins core, we don't need to bundle it in the war
- // because jenkins-core comes in the scope, I think this is a bug in Maven that it puts such
- // dependencies into the artifact list.
- if (a.dependencyTrail.find { trail -> trail.contains(":hudson-core:") || trail.contains(":jenkins-core:") })
- return true;
-
- return false;
- })
- }
- ]]>
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-eclipse-plugin
-
- target/eclipse-classes
-
-
- org.eclipse.jdt.groovy.core.groovyNature
-
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- [1.0,)
-
- display-info
-
-
-
-
-
-
-
-
- org.codehaus.gmaven
- gmaven-plugin
- [1.0,)
-
- testCompile
- generateTestStubs
-
-
-
-
-
-
-
-
-
-
-
-
- org.codehaus.mojo
- animal-sniffer-maven-plugin
- 1.9
-
-
-
- check
-
- test
-
-
-
-
-
- org.codehaus.mojo.signature
- java15
- 1.0
-
-
-
-
-
-
-
- org.kohsuke
- wagon-gitsite
- 0.3.5
-
-
-
-
-
-
- repo.jenkins-ci.org
- http://repo.jenkins-ci.org/public/
-
- true
-
-
- false
-
-
-
-
-
-
- repo.jenkins-ci.org
- http://repo.jenkins-ci.org/public/
-
- true
-
-
- false
-
-
-
-
-
-
- github-pages
- gitsite:git@github.com/jenkinsci/maven-site.git:plugin-parent
-
-
- maven.jenkins-ci.org
- http://maven.jenkins-ci.org:8081/content/repositories/snapshots
-
-
-
-
-
- all-tests
-
-
- !test
-
-
-
- true
-
-
-
-
- node-classifier-linux
-
-
- Linux
- amd64
-
-
-
- node-v${node.version}-linux-x64.tar.gz
-
-
-
-
- node-classifier-mac
-
-
- mac
-
-
-
- node-v${node.version}-darwin-x64.tar.gz
-
-
-
-
- node-classifier-windows
-
-
- windows
- x64
-
-
-
- win-x64/node.exe
- /x64
-
-
-
- node-classifier-windows-amd64
-
-
- windows
- amd64
-
-
-
- win-x64/node.exe
- /x64
-
-
-
- node-classifier-windows-x86
-
-
- windows
- x86
-
-
-
- win-x86/node.exe
-
-
-
-
- node-download
-
-
- package.json
-
-
-
-
-
- com.googlecode.maven-download-plugin
- download-maven-plugin
- 1.2.1
-
-
- get-node
- initialize
-
- wget
-
-
- https://nodejs.org/dist/v${node.version}/${node.download.file}
- false
-
- ${project.build.directory}/frontend/v${node.version}${node.download.classifier}
-
-
-
-
- get-npm
- initialize
-
- wget
-
-
- http://registry.npmjs.org/npm/-/npm-${npm.version}.tgz
- false
- ${project.build.directory}/frontend/
- npm-${npm.version}.tgz
-
-
-
-
-
-
-
-
- gulp-execution
-
-
- gulpfile.js
-
-
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- 1.3.1
-
-
- enforce-versions
-
- enforce
-
-
-
-
- 3.1.0
-
-
-
-
-
-
-
- com.github.eirslett
- frontend-maven-plugin
- 0.0.23
-
-
-
-
- initialize
- install node and npm
-
- install-node-and-npm
-
-
- v${node.version}
- ${npm.version}
-
- ${project.baseUri}target/frontend/
-
-
-
-
- initialize
- npm install
-
- npm
-
-
-
- install
-
-
-
-
- generate-sources
- gulp bundle
-
- gulp
-
-
- bundle
-
-
-
-
- test
- gulp test
-
- gulp
-
-
-
-
-
-
-
-
-
- clean-node
-
-
- package.json
-
-
- cleanNode
-
-
-
-
-
- org.apache.maven.plugins
- maven-clean-plugin
-
-
-
- node
- false
-
-
- node_modules
- false
-
-
-
-
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index 9f73ba43e6..ce8bc076fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,6 @@ THE SOFTWARE.
war
test
cli
- plugins
diff --git a/test/src/test/java/hudson/model/DownloadServiceTest.java b/test/src/test/java/hudson/model/DownloadServiceTest.java
index 268b3f9fab..9ded01620a 100644
--- a/test/src/test/java/hudson/model/DownloadServiceTest.java
+++ b/test/src/test/java/hudson/model/DownloadServiceTest.java
@@ -3,8 +3,15 @@ package hudson.model;
import hudson.model.DownloadService.Downloadable;
import java.io.IOException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Set;
import java.util.TreeSet;
+
+import hudson.tasks.Maven;
+import hudson.tools.DownloadFromUrlInstaller;
+import hudson.tools.JDKInstaller;
+import hudson.tools.ToolInstallation;
import jenkins.model.DownloadSettings;
import net.sf.json.JSONObject;
import org.jvnet.hudson.test.Issue;
@@ -36,20 +43,12 @@ public class DownloadServiceTest extends HudsonTestCase {
@Issue("JENKINS-5536")
public void testPost() throws Exception {
- // initially it should fail because the data doesn't have a signature
- assertNull(job.getData());
- createWebClient().goTo("/self/testPost");
- assertNull(job.getData());
+ // we do not save with signature for toolInstallers,
+ //neither we check it in the getData method.
- // and now it should work
- DownloadService.signatureCheck = false;
- try {
- createWebClient().goTo("/self/testPost");
- JSONObject d = job.getData();
- assertEquals(hashCode(),d.getInt("hello"));
- } finally {
- DownloadService.signatureCheck = true;
- }
+ createWebClient().goTo("/self/testPost");
+ JSONObject d = job.getData();
+ assertEquals(hashCode(),d.getInt("hello"));
// TODO: test with a signature
}
@@ -77,4 +76,89 @@ public class DownloadServiceTest extends HudsonTestCase {
assertEquals(expected, new TreeSet(keySet).toString());
}
+ public void testReduceFunctionWithMavenJsons() throws Exception {
+ URL resource1 = DownloadServiceTest.class.getResource("hudson.tasks.Maven.MavenInstaller1.json");
+ URL resource2 = DownloadServiceTest.class.getResource("hudson.tasks.Maven.MavenInstaller2.json");
+ URL resource3 = DownloadServiceTest.class.getResource("hudson.tasks.Maven.MavenInstaller3.json");
+ JSONObject json1 = JSONObject.fromObject(DownloadService.loadJSON(resource1));
+ JSONObject json2 = JSONObject.fromObject(DownloadService.loadJSON(resource2));
+ JSONObject json3 = JSONObject.fromObject(DownloadService.loadJSON(resource3));
+ List jsonObjectList = new ArrayList<>();
+ jsonObjectList.add(json1);
+ jsonObjectList.add(json2);
+ jsonObjectList.add(json3);
+ Downloadable downloadable = new Maven.MavenInstaller.DescriptorImpl().createDownloadable();
+ JSONObject reducedJson = downloadable.reduce(jsonObjectList);
+ URL expectedResult = DownloadServiceTest.class.getResource("hudson.tasks.Maven.MavenInstallerResult.json");
+ JSONObject expectedResultJson = JSONObject.fromObject(DownloadService.loadJSON(expectedResult));
+ assertEquals(reducedJson, expectedResultJson);
+ }
+
+ public void testReduceFunctionWithAntJsons() throws Exception {
+ URL resource1 = DownloadServiceTest.class.getResource("hudson.tasks.Ant.AntInstaller1.json");
+ URL resource2 = DownloadServiceTest.class.getResource("hudson.tasks.Ant.AntInstaller2.json");
+ URL resource3 = DownloadServiceTest.class.getResource("hudson.tasks.Ant.AntInstaller3.json");
+ JSONObject json1 = JSONObject.fromObject(DownloadService.loadJSON(resource1));
+ JSONObject json2 = JSONObject.fromObject(DownloadService.loadJSON(resource2));
+ JSONObject json3 = JSONObject.fromObject(DownloadService.loadJSON(resource3));
+ List jsonObjectList = new ArrayList<>();
+ jsonObjectList.add(json1);
+ jsonObjectList.add(json2);
+ jsonObjectList.add(json3);
+ Downloadable downloadable = new hudson.tasks.Ant.AntInstaller.DescriptorImpl().createDownloadable();
+ JSONObject reducedJson = downloadable.reduce(jsonObjectList);
+ URL expectedResult = DownloadServiceTest.class.getResource("hudson.tasks.Ant.AntInstallerResult.json");
+ JSONObject expectedResultJson = JSONObject.fromObject(DownloadService.loadJSON(expectedResult));
+ assertEquals(reducedJson, expectedResultJson);
+ }
+
+ public void testReduceFunctionWithJDKJsons() throws Exception {
+ URL resource1 = DownloadServiceTest.class.getResource("hudson.tools.JDKInstaller1.json");
+ URL resource2 = DownloadServiceTest.class.getResource("hudson.tools.JDKInstaller2.json");
+ URL resource3 = DownloadServiceTest.class.getResource("hudson.tools.JDKInstaller3.json");
+ JSONObject json1 = JSONObject.fromObject(DownloadService.loadJSON(resource1));
+ JSONObject json2 = JSONObject.fromObject(DownloadService.loadJSON(resource2));
+ JSONObject json3 = JSONObject.fromObject(DownloadService.loadJSON(resource3));
+ List jsonObjectList = new ArrayList<>();
+ jsonObjectList.add(json1);
+ jsonObjectList.add(json2);
+ jsonObjectList.add(json3);
+ JDKInstaller.JDKList downloadable = new JDKInstaller.JDKList();
+ JSONObject reducedJson = downloadable.reduce(jsonObjectList);
+ URL expectedResult = DownloadServiceTest.class.getResource("hudson.tools.JDKInstallerResult.json");
+ JSONObject expectedResultJson = JSONObject.fromObject(DownloadService.loadJSON(expectedResult));
+ assertEquals(reducedJson, expectedResultJson);
+ }
+
+ public void testReduceFunctionWithNotDefaultSchemaJsons() throws Exception {
+ URL resource1 = DownloadServiceTest.class.getResource("hudson.plugins.cmake.CmakeInstaller1.json");
+ URL resource2 = DownloadServiceTest.class.getResource("hudson.plugins.cmake.CmakeInstaller2.json");
+ JSONObject json1 = JSONObject.fromObject(DownloadService.loadJSON(resource1));
+ JSONObject json2 = JSONObject.fromObject(DownloadService.loadJSON(resource2));
+ List jsonObjectList = new ArrayList<>();
+ jsonObjectList.add(json1);
+ jsonObjectList.add(json2);
+ Downloadable downloadable = new GenericDownloadFromUrlInstaller.DescriptorImpl().createDownloadable();
+ JSONObject reducedJson = downloadable.reduce(jsonObjectList);
+ URL expectedResult = DownloadServiceTest.class.getResource("hudson.plugins.cmake.CmakeInstallerResult.json");
+ JSONObject expectedResultJson = JSONObject.fromObject(DownloadService.loadJSON(expectedResult));
+ assertEquals(reducedJson, expectedResultJson);
+ }
+
+ private static class GenericDownloadFromUrlInstaller extends DownloadFromUrlInstaller {
+ protected GenericDownloadFromUrlInstaller(String id) {
+ super(id);
+ }
+
+ public static final class DescriptorImpl extends DownloadFromUrlInstaller.DescriptorImpl {
+ public String getDisplayName() {
+ return "";
+ }
+
+ @Override
+ public boolean isApplicable(Class extends ToolInstallation> toolType) {
+ return true;
+ }
+ }
+ }
}
diff --git a/test/src/test/java/hudson/tasks/BuildTriggerTest.java b/test/src/test/java/hudson/tasks/BuildTriggerTest.java
index 636adab4df..7790179f7d 100644
--- a/test/src/test/java/hudson/tasks/BuildTriggerTest.java
+++ b/test/src/test/java/hudson/tasks/BuildTriggerTest.java
@@ -69,26 +69,27 @@ import org.acegisecurity.context.SecurityContextHolder;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
import org.junit.Assume;
+import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
+import org.jvnet.hudson.test.BuildWatcher;
import org.jvnet.hudson.test.ExtractResourceSCM;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.JenkinsRule.WebClient;
import org.jvnet.hudson.test.TestBuilder;
-import org.jvnet.hudson.test.TestNotifier;
import org.jvnet.hudson.test.MockBuilder;
import org.jvnet.hudson.test.MockQueueItemAuthenticator;
import org.jvnet.hudson.test.ToolInstallations;
import org.xml.sax.SAXException;
-/**
- * Tests for hudson.tasks.BuildTrigger
- * @author Alan.Harder@sun.com
- */
public class BuildTriggerTest {
- public @Rule JenkinsRule j = new JenkinsRule();
+ @Rule
+ public JenkinsRule j = new JenkinsRule();
+
+ @ClassRule
+ public static BuildWatcher buildWatcher = new BuildWatcher();
private FreeStyleProject createDownstreamProject() throws Exception {
FreeStyleProject dp = j.createFreeStyleProject("downstream");
@@ -309,13 +310,6 @@ public class BuildTriggerTest {
final FreeStyleProject us = j.createFreeStyleProject();
us.getPublishersList().add(new BuildTrigger("downstream", true));
- us.getPublishersList().add(new TestNotifier() {
- @Override
- public boolean perform(AbstractBuild, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
- Thread.sleep(5000); // Build does not complete just after the BuildTrigger
- return true;
- }
- });
FreeStyleProject ds = createDownstreamProject();
ds.getBuildersList().add(new AssertTriggerBuildCompleted(us, j.createWebClient()));
@@ -324,7 +318,9 @@ public class BuildTriggerTest {
j.buildAndAssertSuccess(us);
+ j.waitUntilNoActivity();
final FreeStyleBuild dsb = ds.getBuildByNumber(1);
+ assertNotNull(dsb);
j.waitForCompletion(dsb);
j.assertBuildStatusSuccess(dsb);
}
diff --git a/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstaller1.json b/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstaller1.json
new file mode 100644
index 0000000000..f8061acdea
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstaller1.json
@@ -0,0 +1,54 @@
+downloadService.post('hudson.plugins.cmake.CmakeInstaller',{"list": [
+ {
+ "id": "3.4.2",
+ "name": "3.4.2",
+ "variants": [
+ {
+ "arch": "x86",
+ "os": "win32",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-win32-x86.zip"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-Linux-x86_64.tar.gz"
+ },
+ {
+ "arch": "i386",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-Linux-i386.tar.gz"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Darwin",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-Darwin-x86_64.tar.gz"
+ }
+ ]
+ },
+ {
+ "id": "3.4.1",
+ "name": "3.4.1",
+ "variants": [
+ {
+ "arch": "x86",
+ "os": "win32",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-win32-x86.zip"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz"
+ },
+ {
+ "arch": "i386",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-Linux-i386.tar.gz"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Darwin",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz"
+ }
+ ]
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstaller2.json b/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstaller2.json
new file mode 100644
index 0000000000..96de0bc846
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstaller2.json
@@ -0,0 +1,48 @@
+downloadService.post('hudson.plugins.cmake.CmakeInstaller',{"list": [
+ {
+ "id": "2.6.1",
+ "name": "2.6.1",
+ "variants": [
+ {
+ "arch": "x86",
+ "os": "win32",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-win32-x86.zip"
+ },
+ {
+ "arch": "sparc",
+ "os": "SunOS",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-SunOS-sparc.tar.gz"
+ },
+ {
+ "arch": "i386",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-Linux-i386.tar.gz"
+ },
+ {
+ "arch": "n32",
+ "os": "IRIX64",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-IRIX64-n32.tar.gz"
+ },
+ {
+ "arch": "64",
+ "os": "IRIX64",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-IRIX64-64.tar.gz"
+ },
+ {
+ "arch": "9000_785",
+ "os": "HP-UX",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-HP-UX-9000_785.tar.gz"
+ },
+ {
+ "arch": "universal",
+ "os": "Darwin",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-Darwin-universal.tar.gz"
+ },
+ {
+ "arch": "powerpc",
+ "os": "AIX",
+ "url": "https://cmake.org/files/v2.6/cmake-2.6.1-AIX-powerpc.tar.gz"
+ }
+ ]
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstallerResult.json b/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstallerResult.json
new file mode 100644
index 0000000000..f8061acdea
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.plugins.cmake.CmakeInstallerResult.json
@@ -0,0 +1,54 @@
+downloadService.post('hudson.plugins.cmake.CmakeInstaller',{"list": [
+ {
+ "id": "3.4.2",
+ "name": "3.4.2",
+ "variants": [
+ {
+ "arch": "x86",
+ "os": "win32",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-win32-x86.zip"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-Linux-x86_64.tar.gz"
+ },
+ {
+ "arch": "i386",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-Linux-i386.tar.gz"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Darwin",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.2-Darwin-x86_64.tar.gz"
+ }
+ ]
+ },
+ {
+ "id": "3.4.1",
+ "name": "3.4.1",
+ "variants": [
+ {
+ "arch": "x86",
+ "os": "win32",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-win32-x86.zip"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz"
+ },
+ {
+ "arch": "i386",
+ "os": "Linux",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-Linux-i386.tar.gz"
+ },
+ {
+ "arch": "x86_64",
+ "os": "Darwin",
+ "url": "https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz"
+ }
+ ]
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller1.json b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller1.json
new file mode 100644
index 0000000000..b8a55a0f7d
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller1.json
@@ -0,0 +1,17 @@
+downloadService.post('hudson.tasks.Ant.AntInstaller',{"list": [
+ {
+ "id": "1.9.6",
+ "name": "1.9.6",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.6-bin.zip"
+ },
+ {
+ "id": "1.9.5",
+ "name": "1.9.5",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.5-bin.zip"
+ },
+ {
+ "id": "1.9.4",
+ "name": "1.9.4",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller2.json b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller2.json
new file mode 100644
index 0000000000..4b5e16e981
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller2.json
@@ -0,0 +1,17 @@
+downloadService.post('hudson.tasks.Ant.AntInstaller',{"list": [
+ {
+ "id": "1.9.4",
+ "name": "1.9.4",
+ "url": "http://archive1.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.zip"
+ },
+ {
+ "id": "1.9.2",
+ "name": "1.9.2",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.2-bin.zip"
+ },
+ {
+ "id": "1.9.1",
+ "name": "1.9.1",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.1-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller3.json b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller3.json
new file mode 100644
index 0000000000..fa3f006e43
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstaller3.json
@@ -0,0 +1,12 @@
+downloadService.post('hudson.tasks.Ant.AntInstaller',{"list": [
+ {
+ "id": "1.9.3",
+ "name": "1.9.6",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.6-bin.zip"
+ },
+ {
+ "id": "1.9.5",
+ "name": "1.9.5",
+ "url": "http://archive2.apache.org/dist/ant/binaries/apache-ant-1.9.5-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstallerResult.json b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstallerResult.json
new file mode 100644
index 0000000000..ae91c53831
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Ant.AntInstallerResult.json
@@ -0,0 +1,32 @@
+downloadService.post('hudson.tasks.Ant.AntInstaller',{"list": [
+ {
+ "id": "1.9.6",
+ "name": "1.9.6",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.6-bin.zip"
+ },
+ {
+ "id": "1.9.5",
+ "name": "1.9.5",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.5-bin.zip"
+ },
+ {
+ "id": "1.9.4",
+ "name": "1.9.4",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.zip"
+ },
+ {
+ "id": "1.9.2",
+ "name": "1.9.2",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.2-bin.zip"
+ },
+ {
+ "id": "1.9.1",
+ "name": "1.9.1",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.1-bin.zip"
+ },
+ {
+ "id": "1.9.3",
+ "name": "1.9.6",
+ "url": "http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.6-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller1.json b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller1.json
new file mode 100644
index 0000000000..d0539191cc
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller1.json
@@ -0,0 +1,17 @@
+downloadService.post('hudson.tasks.Maven.MavenInstaller',{"list": [
+ {
+ "id": "3.3.9",
+ "name": "3.3.9",
+ "url": "http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip"
+ },
+ {
+ "id": "3.3.3",
+ "name": "3.3.3",
+ "url": "http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip"
+ },
+ {
+ "id": "3.3.1",
+ "name": "3.3.1",
+ "url": "http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.1/apache-maven-3.3.1-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller2.json b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller2.json
new file mode 100644
index 0000000000..22ce55ba28
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller2.json
@@ -0,0 +1,17 @@
+downloadService.post('hudson.tasks.Maven.MavenInstaller',{"list": [
+ {
+ "id": "3.3.1",
+ "name": "3.3.1",
+ "url": "http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.1/apache-maven-3.3.1-bin.zip"
+ },
+ {
+ "id": "3.2.5",
+ "name": "3.2.5",
+ "url": "http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.5/apache-maven-3.2.5-bin.zip"
+ },
+ {
+ "id": "3.2.3",
+ "name": "3.2.3",
+ "url": "http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.3/apache-maven-3.2.3-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller3.json b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller3.json
new file mode 100644
index 0000000000..7e08891270
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstaller3.json
@@ -0,0 +1,12 @@
+downloadService.post('hudson.tasks.Maven.MavenInstaller',{"list": [
+ {
+ "id": "3.3.1",
+ "name": "3.3.1",
+ "url": "http://repo2.maven.org/maven2/org/apache/maven/apache-maven/3.3.1/apache-maven-3.3.1-bin.zip"
+ },
+ {
+ "id": "3.0.4",
+ "name": "3.0.4",
+ "url": "http://archive.apache.org/dist/maven/binaries/apache-maven-3.0.4-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstallerResult.json b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstallerResult.json
new file mode 100644
index 0000000000..e08f5f4a16
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tasks.Maven.MavenInstallerResult.json
@@ -0,0 +1,32 @@
+downloadService.post('hudson.tasks.Maven.MavenInstaller', {"list": [
+ {
+ "id": "3.3.9",
+ "name": "3.3.9",
+ "url": "http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip"
+ },
+ {
+ "id": "3.3.3",
+ "name": "3.3.3",
+ "url": "http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip"
+ },
+ {
+ "id": "3.3.1",
+ "name": "3.3.1",
+ "url": "http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.1/apache-maven-3.3.1-bin.zip"
+ },
+ {
+ "id": "3.2.5",
+ "name": "3.2.5",
+ "url": "http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.5/apache-maven-3.2.5-bin.zip"
+ },
+ {
+ "id": "3.2.3",
+ "name": "3.2.3",
+ "url": "http://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.3/apache-maven-3.2.3-bin.zip"
+ },
+ {
+ "id": "3.0.4",
+ "name": "3.0.4",
+ "url": "http://archive.apache.org/dist/maven/binaries/apache-maven-3.0.4-bin.zip"
+ }
+]})
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller1.json b/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller1.json
new file mode 100644
index 0000000000..e5fc0dfd7e
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller1.json
@@ -0,0 +1,69 @@
+downloadService.post('hudson.tools.JDKInstaller',{
+ "data": [
+ {
+ "name": "JDK 8",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-i586.tar.gz",
+ "name": "jdk-8u66-linux-i586.tar.gz",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-macosx-x64.dmg",
+ "name": "jdk-8u66-macosx-x64.dmg",
+ "title": "Mac OS X x64"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u66-oth-JPR",
+ "title": "Java SE Development Kit 8u66"
+ },
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "name": "jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "title": "Linux ARM v6/v7 Hard Float ABI"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-arm64-vfp-hflt.tar.gz",
+ "name": "jdk-8u65-linux-arm64-vfp-hflt.tar.gz",
+ "title": "Linux ARM v8 Hard Float ABI"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u65-oth-JPR",
+ "title": "Java SE Development Kit 8u65"
+ }
+ ]
+ },
+ {
+ "name": "JDK 7",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-i586.tar.gz",
+ "name": "jdk-7u80-linux-i586.tar.gz",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz",
+ "name": "jdk-7u80-linux-x64.tar.gz",
+ "title": "Linux x64"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-7u80-oth-JPR",
+ "title": "Java SE Development Kit 7u80"
+ }
+ ]
+ }
+ ],
+ "version": 2
+}
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller2.json b/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller2.json
new file mode 100644
index 0000000000..199342841f
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller2.json
@@ -0,0 +1,46 @@
+downloadService.post('hudson.tools.JDKInstaller',{
+"data": [
+ {
+ "name": "JDK 8",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle1.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-i586.tar.gz",
+ "name": "jdk-8u66-linux-i586.tar.gz",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz",
+ "name": "jdk-8u66-linux-x64.tar.gz",
+ "title": "Linux x64"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-macosx-x64.dmg",
+ "name": "jdk-8u66-macosx-x64.dmg",
+ "title": "Mac OS X x64"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u66-oth-JPR",
+ "title": "Java SE Development Kit 8u66"
+ },
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "name": "jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "title": "Linux ARM v6/v7 Hard Float ABI"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u65-oth-JPR",
+ "title": "Java SE Development Kit 8u65"
+ }
+ ]
+ }
+ ],
+ "version": 2
+}
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller3.json b/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller3.json
new file mode 100644
index 0000000000..c9472a4511
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tools.JDKInstaller3.json
@@ -0,0 +1,69 @@
+downloadService.post('hudson.tools.JDKInstaller',{
+"data": [
+ {
+ "name": "JDK 8",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle2.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-i586.tar.gz",
+ "name": "jdk-8u66-linux-i586.tar.gz",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-solaris-x64.tar.gz",
+ "name": "jdk-8u66-solaris-x64.tar.gz",
+ "title": "Solaris x64"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b18/jdk-8u66-windows-i586.exe",
+ "name": "jdk-8u66-windows-i586.exe",
+ "title": "Windows x86"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u66-oth-JPR",
+ "title": "Java SE Development Kit 8u66"
+ },
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "name": "jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "title": "Linux ARM v6/v7 Hard Float ABI"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u65-oth-JPR",
+ "title": "Java SE Development Kit 8u65"
+ }
+ ]
+ },
+ {
+ "name": "JDK 6",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin",
+ "name": "jdk-6u45-linux-i586.bin",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-ia64.bin",
+ "name": "jdk-6u45-linux-ia64.bin",
+ "title": "Linux Intel Itanium"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/downloads/java-se-archive-license-1382604.html",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-6u45-oth-JPR",
+ "title": "Java SE Development Kit 6u45"
+ }
+ ],
+ }
+ ],
+ "version": 3
+}
\ No newline at end of file
diff --git a/test/src/test/resources/hudson/model/hudson.tools.JDKInstallerResult.json b/test/src/test/resources/hudson/model/hudson.tools.JDKInstallerResult.json
new file mode 100644
index 0000000000..07cbf97214
--- /dev/null
+++ b/test/src/test/resources/hudson/model/hudson.tools.JDKInstallerResult.json
@@ -0,0 +1,107 @@
+downloadService.post('hudson.tools.JDKInstaller',{
+ "data": [
+ {
+ "name": "JDK 8",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-i586.tar.gz",
+ "name": "jdk-8u66-linux-i586.tar.gz",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-macosx-x64.dmg",
+ "name": "jdk-8u66-macosx-x64.dmg",
+ "title": "Mac OS X x64"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz",
+ "name": "jdk-8u66-linux-x64.tar.gz",
+ "title": "Linux x64"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-solaris-x64.tar.gz",
+ "name": "jdk-8u66-solaris-x64.tar.gz",
+ "title": "Solaris x64"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u66-b18/jdk-8u66-windows-i586.exe",
+ "name": "jdk-8u66-windows-i586.exe",
+ "title": "Windows x86"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u66-oth-JPR",
+ "title": "Java SE Development Kit 8u66"
+ },
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "name": "jdk-8u65-linux-arm32-vfp-hflt.tar.gz",
+ "title": "Linux ARM v6/v7 Hard Float ABI"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-arm64-vfp-hflt.tar.gz",
+ "name": "jdk-8u65-linux-arm64-vfp-hflt.tar.gz",
+ "title": "Linux ARM v8 Hard Float ABI"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-8u65-oth-JPR",
+ "title": "Java SE Development Kit 8u65"
+ }
+ ]
+ },
+ {
+ "name": "JDK 7",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-i586.tar.gz",
+ "name": "jdk-7u80-linux-i586.tar.gz",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz",
+ "name": "jdk-7u80-linux-x64.tar.gz",
+ "title": "Linux x64"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/terms/license",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-7u80-oth-JPR",
+ "title": "Java SE Development Kit 7u80"
+ }
+ ]
+ },
+ {
+ "name": "JDK 6",
+ "releases": [
+ {
+ "files": [
+ {
+ "filepath": "http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin",
+ "name": "jdk-6u45-linux-i586.bin",
+ "title": "Linux x86"
+ },
+ {
+ "filepath": "http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-ia64.bin",
+ "name": "jdk-6u45-linux-ia64.bin",
+ "title": "Linux Intel Itanium"
+ }
+ ],
+ "licpath": "/technetwork/java/javase/downloads/java-se-archive-license-1382604.html",
+ "lictitle": "Oracle Binary Code License Agreement for Java SE",
+ "name": "jdk-6u45-oth-JPR",
+ "title": "Java SE Development Kit 6u45"
+ }
+ ],
+ }
+ ],
+ "version": 2
+}
\ No newline at end of file