diff --git a/core/src/main/java/hudson/PluginManager.java b/core/src/main/java/hudson/PluginManager.java index e4575086d9fb..c3cd3a750e6d 100644 --- a/core/src/main/java/hudson/PluginManager.java +++ b/core/src/main/java/hudson/PluginManager.java @@ -1412,16 +1412,6 @@ public HttpResponse doPluginsSearch(@QueryParameter String query, @QueryParamete if (plugin.isForNewerHudson()) { jsonObject.put("newerCoreRequired", Messages.PluginManager_coreWarning(plugin.requiredCore)); } - if (plugin.isForNewerJava()) { - jsonObject.put("newerJavaRequired", Messages.PluginManager_javaWarning(plugin.minimumJavaVersion)); - } - if (plugin.isNeededDependenciesForNewerJava()) { - VersionNumber javaVersion = plugin.getNeededDependenciesMinimumJavaVersion(); - if (javaVersion == null) { - throw new IllegalStateException("java version cannot be null here"); - } - jsonObject.put("dependenciesNewerJava", Messages.PluginManager_depJavaWarning(javaVersion.toString())); - } if (plugin.hasWarnings()) { JSONObject unresolvedSecurityWarnings = new JSONObject(); unresolvedSecurityWarnings.put("text", Messages.PluginManager_securityWarning()); @@ -2057,9 +2047,6 @@ private void logPluginWarnings(Map.Entry requestedPlugin, if (toInstall.isForNewerHudson()) { LOGGER.log(WARNING, "{0}@{1} was built for a newer Jenkins", new Object[] {toInstall.name, toInstall.version}); } - if (toInstall.isForNewerJava()) { - LOGGER.log(WARNING, "{0}@{1} was built for a newer Java", new Object[] {toInstall.name, toInstall.version}); - } } /** diff --git a/core/src/main/java/hudson/PluginWrapper.java b/core/src/main/java/hudson/PluginWrapper.java index a42596726cdb..aa408cf9c752 100644 --- a/core/src/main/java/hudson/PluginWrapper.java +++ b/core/src/main/java/hudson/PluginWrapper.java @@ -43,7 +43,6 @@ import hudson.model.UpdateCenter; import hudson.model.UpdateSite; import hudson.util.VersionNumber; -import io.jenkins.lib.versionnumber.JavaSpecificationVersion; import java.io.Closeable; import java.io.File; import java.io.IOException; @@ -75,7 +74,6 @@ import jenkins.security.UpdateSiteWarningsMonitor; import jenkins.util.AntClassLoader; import jenkins.util.URLClassLoader2; -import jenkins.util.java.JavaUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.LogFactory; import org.kohsuke.accmod.Restricted; @@ -690,20 +688,6 @@ private String getVersionOf(Manifest manifest) { return null; } - /** - * Returns the minimum Java version of this plugin, as specified in the plugin metadata. - * Generally coming from the {@code java.level} extracted as MANIFEST's metadata with - * this addition on the plugins' parent pom. - * - * @see maven-hpi-plugin#PR-75 - * - * @since 2.158 - */ - @Exported - public @CheckForNull String getMinimumJavaVersion() { - return manifest.getMainAttributes().getValue("Minimum-Java-Version"); - } - /** * Returns the version number of this plugin */ @@ -958,14 +942,6 @@ public boolean hasLicensesXml() { versionDependencyError(Messages.PluginWrapper_obsoleteCore(Jenkins.getVersion().toString(), requiredCoreVersion), Jenkins.getVersion().toString(), requiredCoreVersion); } } - - String minimumJavaVersion = getMinimumJavaVersion(); - if (minimumJavaVersion != null) { - JavaSpecificationVersion actualVersion = JavaUtils.getCurrentJavaRuntimeVersionNumber(); - if (actualVersion.isOlderThan(new JavaSpecificationVersion(minimumJavaVersion))) { - versionDependencyError(Messages.PluginWrapper_obsoleteJava(actualVersion.toString(), minimumJavaVersion), actualVersion.toString(), minimumJavaVersion); - } - } } // make sure dependencies exist for (Dependency d : dependencies) { diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java index 985aef2020e1..389e3cb3890f 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -44,7 +44,6 @@ import hudson.util.HttpResponses; import hudson.util.TextFile; import hudson.util.VersionNumber; -import io.jenkins.lib.versionnumber.JavaSpecificationVersion; import java.io.File; import java.io.IOException; import java.net.URI; @@ -80,7 +79,6 @@ import jenkins.util.JSONSignatureValidator; import jenkins.util.PluginLabelUtil; import jenkins.util.SystemProperties; -import jenkins.util.java.JavaUtils; import net.sf.json.JSONArray; import net.sf.json.JSONException; import net.sf.json.JSONObject; @@ -1141,13 +1139,6 @@ public final class Plugin extends Entry { */ @Exported public final String requiredCore; - /** - * Version of Java this plugin requires to run. - * - * @since 2.158 - */ - @Exported - public final String minimumJavaVersion; /** * Categories for grouping plugins, taken from labels assigned to wiki page. * Can be {@code null} if the update center does not return categories. @@ -1211,7 +1202,6 @@ public Plugin(String sourceId, JSONObject o) { this.title = get(o, "title"); this.excerpt = get(o, "excerpt"); this.compatibleSinceVersion = Util.intern(get(o, "compatibleSinceVersion")); - this.minimumJavaVersion = Util.intern(get(o, "minimumJavaVersion")); this.latest = get(o, "latest"); this.requiredCore = Util.intern(get(o, "requiredCore")); final String releaseTimestamp = get(o, "releaseTimestamp"); @@ -1301,9 +1291,9 @@ public boolean isCompatible() { @Restricted(NoExternalUse.class) // table.jelly public boolean isCompatible(PluginManager.MetadataCache cache) { - return isCompatibleWithInstalledVersion() && !isForNewerHudson() && !isForNewerJava() && + return isCompatibleWithInstalledVersion() && !isForNewerHudson() && isNeededDependenciesCompatibleWithInstalledVersion(cache) && - !isNeededDependenciesForNewerJenkins(cache) && !isNeededDependenciesForNewerJava(); + !isNeededDependenciesForNewerJenkins(cache); } /** @@ -1387,21 +1377,6 @@ public boolean isForNewerHudson() { } } - /** - * Returns true iff the plugin declares a minimum Java version and it's newer than what the Jenkins master is running on. - * @since 2.158 - */ - public boolean isForNewerJava() { - try { - final JavaSpecificationVersion currentRuntimeJavaVersion = JavaUtils.getCurrentJavaRuntimeVersionNumber(); - return minimumJavaVersion != null && new JavaSpecificationVersion(minimumJavaVersion).isNewerThan( - currentRuntimeJavaVersion); - } catch (NumberFormatException nfe) { - logBadMinJavaVersion(); - return false; // treat this as undeclared minimum Java version - } - } - public VersionNumber getNeededDependenciesRequiredCore() { VersionNumber versionNumber = null; try { @@ -1416,36 +1391,6 @@ public VersionNumber getNeededDependenciesRequiredCore() { return versionNumber; } - /** - * Returns the minimum Java version needed to use the plugin and all its dependencies. - * @since 2.158 - * @return the minimum Java version needed to use the plugin and all its dependencies, or null if unspecified. - */ - @CheckForNull - public VersionNumber getNeededDependenciesMinimumJavaVersion() { - VersionNumber versionNumber = null; - try { - versionNumber = minimumJavaVersion == null ? null : new VersionNumber(minimumJavaVersion); - } catch (NumberFormatException nfe) { - logBadMinJavaVersion(); - } - for (Plugin p : getNeededDependencies()) { - VersionNumber v = p.getNeededDependenciesMinimumJavaVersion(); - if (v == null) { - continue; - } - if (versionNumber == null || v.isNewerThan(versionNumber)) { - versionNumber = v; - } - } - return versionNumber; - } - - private void logBadMinJavaVersion() { - LOGGER.log(Level.WARNING, "minimumJavaVersion was specified for plugin {0} but unparseable (received {1})", - new String[]{this.name, this.minimumJavaVersion}); - } - public boolean isNeededDependenciesForNewerJenkins() { return isNeededDependenciesForNewerJenkins(new PluginManager.MetadataCache()); } @@ -1462,20 +1407,6 @@ public boolean isNeededDependenciesForNewerJenkins(PluginManager.MetadataCache c }); } - /** - * Returns true iff any of the plugin dependencies require a newer Java than Jenkins is running on. - * - * @since 2.158 - */ - public boolean isNeededDependenciesForNewerJava() { - for (Plugin p : getNeededDependencies()) { - if (p.isForNewerJava() || p.isNeededDependenciesForNewerJava()) { - return true; - } - } - return false; - } - /** * If at least some of the plugin's needed dependencies are already installed, and the new version of the * needed dependencies plugin have a "compatibleSinceVersion" diff --git a/core/src/main/java/jenkins/install/SetupWizard.java b/core/src/main/java/jenkins/install/SetupWizard.java index b4467b5c9e68..6513823cd82a 100644 --- a/core/src/main/java/jenkins/install/SetupWizard.java +++ b/core/src/main/java/jenkins/install/SetupWizard.java @@ -644,7 +644,7 @@ public JSONArray getPlatformPluginUpdates() { for (UpdateSite site : jenkins.getUpdateCenter().getSiteList()) { UpdateSite.Plugin sitePlug = site.getPlugin(pluginName); if (sitePlug != null - && !sitePlug.isForNewerHudson() && !sitePlug.isForNewerJava() + && !sitePlug.isForNewerHudson() && !sitePlug.isNeededDependenciesForNewerJenkins()) { foundCompatibleVersion = true; break; diff --git a/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java b/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java index 9a0bd3d4ed22..779ab79ace89 100644 --- a/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java +++ b/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java @@ -5,7 +5,6 @@ import hudson.ClassicPluginStrategy; import hudson.PluginWrapper; import hudson.util.VersionNumber; -import io.jenkins.lib.versionnumber.JavaSpecificationVersion; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; @@ -17,7 +16,6 @@ import java.util.logging.Logger; import java.util.stream.Collectors; import java.util.stream.Stream; -import jenkins.util.java.JavaUtils; import org.apache.commons.io.IOUtils; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.NoExternalUse; @@ -54,11 +52,9 @@ public class DetachedPluginsUtil { DETACHED_LIST = Collections.unmodifiableList(configLines(is).map(line -> { String[] pieces = line.split(" "); - // defaults to Java 1.0 to install unconditionally if unspecified return new DetachedPluginsUtil.DetachedPlugin(pieces[0], pieces[1] + ".*", - pieces[2], - pieces.length == 4 ? pieces[3] : "1.0"); + pieces[2]); }).collect(Collectors.toList())); } catch (IOException x) { throw new ExceptionInInitializerError(x); @@ -101,16 +97,13 @@ public static List getImpliedDependencies(String plugi } /** - * Get the list of all plugins that have ever been {@link DetachedPlugin detached} from Jenkins core, applicable to the current Java runtime. + * Get the list of all plugins that have ever been {@link DetachedPlugin detached} from Jenkins core. * * @return A {@link List} of {@link DetachedPlugin}s. - * @see JavaUtils#getCurrentJavaRuntimeVersionNumber() */ public static @NonNull List getDetachedPlugins() { - return DETACHED_LIST.stream() - .filter(plugin -> JavaUtils.getCurrentJavaRuntimeVersionNumber().isNewerThanOrEqualTo(plugin.getMinimumJavaVersion())) - .collect(Collectors.toList()); + return Collections.unmodifiableList(new ArrayList<>(DETACHED_LIST)); } /** @@ -174,13 +167,11 @@ public static final class DetachedPlugin { */ private final VersionNumber splitWhen; private final String requiredVersion; - private final JavaSpecificationVersion minJavaVersion; - private DetachedPlugin(String shortName, String splitWhen, String requiredVersion, String minJavaVersion) { + private DetachedPlugin(String shortName, String splitWhen, String requiredVersion) { this.shortName = shortName; this.splitWhen = new VersionNumber(splitWhen); this.requiredVersion = requiredVersion; - this.minJavaVersion = new JavaSpecificationVersion(minJavaVersion); } /** @@ -215,10 +206,5 @@ public VersionNumber getRequiredVersion() { public String toString() { return shortName + " " + splitWhen.toString().replace(".*", "") + " " + requiredVersion; } - - @NonNull - public JavaSpecificationVersion getMinimumJavaVersion() { - return minJavaVersion; - } } } diff --git a/core/src/main/resources/hudson/Messages.properties b/core/src/main/resources/hudson/Messages.properties index f230ae775826..269870d713f2 100644 --- a/core/src/main/resources/hudson/Messages.properties +++ b/core/src/main/resources/hudson/Messages.properties @@ -75,9 +75,6 @@ PluginManager.parentCompatWarning=The following plugins are affected by this: PluginManager.coreWarning=\ Warning: This plugin is built for Jenkins {0} or newer. \ Jenkins will refuse to load this plugin if installed. -PluginManager.javaWarning=\ - Warning: This plugin requires Java {0} or newer. \ - Jenkins will refuse to load this plugin if installed. PluginManager.depCompatWarning=\ Warning: This plugin requires newer versions of dependencies and at least one of those plugins is not compatible with the installed version. \ This is usually the case because its behavior or APIs changed, or it uses a different settings format than the installed version. \ @@ -87,10 +84,6 @@ PluginManager.depCoreWarning=\ Warning: This plugin has dependencies on other plugins that require Jenkins {0} or newer. \ Jenkins will refuse to load the dependencies requiring a newer version of Jenkins, \ and in turn loading this plugin will fail. -PluginManager.depJavaWarning=\ - Warning: this plugin has dependencies on other plugins that require Java {0} or newer. \ - Jenkins will refuse to load the dependencies requiring a newer version of Jenkins, \ - and in turn loading this plugin will fail. PluginManager.securityWarning=\ Warning: This plugin version may not be safe to use. Please review the following security notices: PluginManager.ago={0} ago @@ -129,7 +122,6 @@ PluginWrapper.failed_to_load_dependency_2=Failed to load: {0} ({1} {2}) PluginWrapper.disabled_2=Required plugin is disabled: {0} ({1}) PluginWrapper.obsolete_2=Update required: {0} ({1} {2}) to be updated to {3} or higher PluginWrapper.obsoleteCore=Jenkins ({1}) or higher required -PluginWrapper.obsoleteJava=Java ({1}) or higher required PluginWrapper.PluginWrapperAdministrativeMonitor.DisplayName=Plugins Failed To Load PluginWrapper.Already.Disabled=The plugin ''{0}'' was already disabled PluginWrapper.Plugin.Has.Dependent=The plugin ''{0}'' has, at least, one dependent plugin ({1}) and the disable strategy is {2}, so it cannot be disabled diff --git a/core/src/main/resources/hudson/Messages_es.properties b/core/src/main/resources/hudson/Messages_es.properties index bb187a5c68ee..79a08114bc74 100644 --- a/core/src/main/resources/hudson/Messages_es.properties +++ b/core/src/main/resources/hudson/Messages_es.properties @@ -76,9 +76,6 @@ PluginManager.parentCompatWarning=Esto afecta a los siguientes plugins: PluginManager.coreWarning=\ Aviso: Este plugin est\u00e1 construido para Jenkins {0} o posterior. \ Jenkins no cargar\u00e1 este plugin aunque est\u00e1 instalado. -PluginManager.javaWarning=\ - Aviso: Este plugin requiere Java {0} o m\u00e1s reciente. \ - Jenkins no cargar\u00e1 este plugin aunque est\u00e1 instalado. PluginManager.depCompatWarning=\ Aviso: Este plugin requiere versiones m\u00e1s recientes de dependencias y al menos uno de esos plugins no es compatible con la versi\u00f3n instalada. \ Esto puede ocurrir porque su comportamiento ha cambiado o utiliza un formato de configuraci\u00f3n diferente que la versi\u00f3n instalada. \ @@ -88,10 +85,6 @@ PluginManager.depCoreWarning=\ Aviso: Este plugin tiene dependencias de otros plugins que requieren Jenkins {0} o m\u00e1s reciente. \ Jenkins no se cargar\u00e1 las dependencias que requieren una versi\u00f3n m\u00e1s reciente de Jenkins. \ Por lo que no poder\u00e1 cargar este plugin. -PluginManager.depJavaWarning=\ - Aviso: Este plugin tiene dependencias de otros plugins que requieren Java {0} o m\u00e1s reciente. \ - Jenkins no se cargar\u00e1 las dependencias que requieren una versi\u00f3n m\u00e1s reciente de Jenkins. \ - Por lo que no poder\u00e1 cargar este plugin. PluginManager.securityWarning=\ Aviso: Esta versi\u00f3n del plugin puede no ser segura. Por favor, revise los siguientes avisos de seguridad: PluginManager.ago=Hace {0} @@ -126,7 +119,6 @@ PluginWrapper.disabledAndObsolete=Acutalizaci\u00f3n requerida: {0} ({1}) a {2} PluginWrapper.disabled=El plugin requerido est\u00e1 desactivado: {0} PluginWrapper.obsolete=Acutalizaci\u00f3n requerida: {0} ({1}) va a actualizar a {2} o superior PluginWrapper.obsoleteCore=Se requiere Jenkins ({1}) o superior -PluginWrapper.obsoleteJava=Se requiere Java ({1}) o superior PluginWrapper.PluginWrapperAdministrativeMonitor.DisplayName=No se pueden cargar los plugins PluginWrapper.Already.Disabled=El plugin {0} ya estaba deshabilitado PluginWrapper.Plugin.Has.Dependant=El plugin {0} tiene, al menos, un plugin dependiente ({1}) y la estrategia de deshabilitaci\u00F3n es {2}, as\u00ED que no puede ser deshabilitado diff --git a/core/src/main/resources/hudson/Messages_it.properties b/core/src/main/resources/hudson/Messages_it.properties index 4e0a19e4c47f..b8d21635e891 100644 --- a/core/src/main/resources/hudson/Messages_it.properties +++ b/core/src/main/resources/hudson/Messages_it.properties @@ -98,7 +98,6 @@ PluginWrapper.NoSuchPlugin=Non PluginWrapper.obsolete=Aggiornamento richiesto: {0} ({1}) deve essere \ aggiornato alla versione {2} o successiva PluginWrapper.obsoleteCore=� richiesto Jenkins ({1}) o una versione successiva -PluginWrapper.obsoleteJava=� richiesto Java ({1}) o una versione successiva PluginWrapper.Plugin.Disabled=Componente aggiuntivo "{0}" disabilitato PluginWrapper.Plugin.Has.Dependent=Il componente aggiuntivo "{0}" ha almeno \ un componente aggiuntivo dipendente ({1}) e la strategia di disabilitazione \ diff --git a/core/src/main/resources/hudson/Messages_pt_BR.properties b/core/src/main/resources/hudson/Messages_pt_BR.properties index 75287b5c8dad..0a7eb5601afb 100644 --- a/core/src/main/resources/hudson/Messages_pt_BR.properties +++ b/core/src/main/resources/hudson/Messages_pt_BR.properties @@ -68,13 +68,8 @@ PluginWrapper.NoSuchPlugin=Nenhuma extens\u00E3o encontrada com o nome ''{0}'' PluginWrapper.failed_to_load_plugin_2=Falhou para carregar: {0} ({1} {2}) PluginManager.invalidUrl= \ Voc\u00EA est\u00E1 usando uma URL inv\u00E1lida para baixar a extens\u00E3o, somente https e http (n\u00E3o recomendado) s\u00E3o suportados. -PluginManager.depJavaWarning= \ - Aviso: esta extens\u00E3o tem dependencias de outras extens\u00F5es que requerem Java {0} ou mais recente. \ - O Jenkins se recusar\u00E1 a carregar as dependencias que requerem uma nova vers\u00E3o dele e \ - como resultado o carregamento da extens\u00E3o ir\u00E1 falhar. PluginWrapper.Already.Disabled=A extens\u00E3o ''{0}'' j\u00E1 foi desabilitada PluginWrapper.disabled_2=A extens\u00E3o requerida est\u00E1 desabilitada: {0} {1} -PluginWrapper.obsoleteJava=Java ({1}) ou maior \u00E9 requerido PluginManager.parentDepCompatWarning=As seguintes extens\u00F5es s\u00E3o incompat\u00EDveis: PluginManager.PluginDeprecationMonitor.DisplayName=Monitor de extens\u00F5es descontinuadas Util.month={0} m\u00EAs @@ -108,9 +103,6 @@ PluginManager.adoptThisPlugin= \ Visite nossa iniciativa \ Adopt a Plugin para maiores informa\u00E7\u00F5es. -PluginManager.javaWarning= \ - Aviso: esta extens\u00E3o requer o Java na vers\u00E3o {0} ou mais recente. \ - O Jenkins se recusar\u00E1 a carregar esta extens\u00E3o se instalada. PluginManager.compatWarning= \ Aviso: a vers\u00E3o mais nova desta extens\u00E3o est\u00E1 marcada como incompat\u00EDvel com a vers\u00E3o instalada. \ Isto geralmente acontece por seu comportamento ou APIs mudaram ou porque ela tem configura\u00E7\u00F5es em formato diferente \ diff --git a/core/src/main/resources/hudson/Messages_zh_TW.properties b/core/src/main/resources/hudson/Messages_zh_TW.properties index cbbac736753d..05b5a9efecb9 100644 --- a/core/src/main/resources/hudson/Messages_zh_TW.properties +++ b/core/src/main/resources/hudson/Messages_zh_TW.properties @@ -65,10 +65,7 @@ PluginManager.compatWarning=\u8b66\u544a\: \u65b0\u7248\u672c\u4e0d\u76f8\u5bb9\ PluginManager.parentDepCompatWarning=\u4e0b\u5217\u5916\u639b\u4e0d\u76f8\u5bb9\: PluginManager.parentCompatWarning=\u4e0b\u5217\u5916\u639b\u6703\u53d7\u5230\u5f71\u97ff\: PluginManager.coreWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7a0b\u5f0f\u662f\u70ba Jenkins {0} \u4e4b\u5f8c\u7684\u7248\u672c\u8a2d\u8a08\u3002\u5728\u60a8\u76ee\u524d\u7684 Jenkins \u4e0d\u898b\u5f97\u53ef\u4ee5\u6b63\u5e38\u904b\u4f5c\u3002 -PluginManager.javaWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7a0b\u5f0f\u9700\u8981 Java {0} \u6216\u66f4\u65b0\u7248\u672c\u3002\u5728\u60a8\u76ee\u524d\u7684 Jenkins \u4e0d\u898b\u5f97\u53ef\u4ee5\u6b63\u5e38\u904b\u4f5c\u3002 -PluginManager.depCompatWarning=\u8b66\u544a\: \u6b64\u5916\u639b\u9700\u8981\u66f4\u65b0\u76f8\u4f9d\u6027\u5916\u639b\uff0c\u4e14\u5176\u4e2d\u81f3\u5c11\u6709\u4e00\u500b\u4e0d\u76f8\u5bb9\u65bc\u76ee\u524d\u7248\u672c\u3002\u9019\u901a\u5e38\u662f\u56e0\u70ba\u5b83\u672c\u8eab\u7684\u884c\u70ba\u6a21\u5f0f\u6216 API \u6709\u66f4\u52d5\uff0c\u6216\u5b83\u7684\u8a2d\u5b9a\u503c\u683c\u5f0f\u4e0d\u540c\u65bc\u76ee\u524d\u7248\u672c\u3002\u5176\u4ed6\u76f8\u4f9d\u65bc\u5b83\u7684\u5916\u639b\u53ef\u80fd\u6703\u4e0d\u76f8\u5bb9\u65bc\u6b64\u66f4\u65b0\u4e26\u4e14\u4e0d\u518d\u5982\u9810\u671f\u5730\u904b\u4f5c\uff0c\u4f7f\u7528\u6b64\u5916\u639b\u7684\u4f5c\u696d\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u8a2d\u5b9a\u3002\u60a8\u53ef\u80fd\u5f97\u624b\u52d5\u9084\u539f\u820a\u8a2d\u5b9a\u503c\u624d\u80fd\u9084\u539f\u5230\u820a\u7248\u3002\u8a73\u60c5\u8acb\u53c3\u8003\u6b64\u5916\u639b\u7684\u767c\u884c\u8cc7\u8a0a\u3002 PluginManager.depCoreWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7684\u76f8\u4f9d\u6027\u5916\u639b\u9700\u8981 Jenkins {0} \u6216\u66f4\u65b0\u7248\u672c\u3002Jenkins \u5c07\u6703\u62d2\u7d55\u8f09\u5165\u8a72\u76f8\u4f9d\u6027\u5916\u639b\uff0c\u9019\u6703\u5c0e\u81f4\u9019\u500b\u5916\u639b\u8f09\u5165\u5931\u6557\u3002 -PluginManager.depJavaWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7684\u76f8\u4f9d\u6027\u5916\u639b\u9700\u8981 Java {0} \u6216\u66f4\u65b0\u7248\u672c\u3002Jenkins \u5c07\u6703\u62d2\u7d55\u8f09\u5165\u8a72\u76f8\u4f9d\u6027\u5916\u639b\uff0c\u9019\u6703\u5c0e\u81f4\u9019\u500b\u5916\u639b\u8f09\u5165\u5931\u6557\u3002 PluginManager.securityWarning=\u8b66\u544a\: \u9019\u500b\u7248\u672c\u7684\u5916\u639b\u7528\u8d77\u4f86\u53ef\u80fd\u4e0d\u5b89\u5168\u3002\u8acb\u67e5\u770b\u4e0b\u5217\u5b89\u5168\u6027\u9808\u77e5\: PluginManager.ago={0}\u524d PluginManager.adoptThisPlugin=\u6b64\u5916\u639b\u958b\u653e\u8a8d\u990a\uff01\u6211\u5011\u6b63\u5728\u5c0b\u627e\u65b0\u7684\u7dad\u8b77\u8005\uff0c\u8acb\u9020\u8a2a Adopt a Plugin \u53d6\u5f97\u66f4\u591a\u8cc7\u8a0a\u3002 @@ -97,7 +94,6 @@ PluginWrapper.failed_to_load_dependency_2=\u8f09\u5165\u5931\u6557\: {0} ({1} {2 PluginWrapper.disabled_2=\u5fc5\u8981\u7684\u5916\u639b\u5df2\u88ab\u505c\u7528\: {0} ({1}) PluginWrapper.obsolete_2=\u9700\u8981\u66f4\u65b0\: {0} ({1} {2}) \u9700\u8981\u66f4\u65b0\u5230 {3} \u6216\u66f4\u65b0\u7684\u7248\u672c PluginWrapper.obsoleteCore=\u9700\u8981 Jenkins ({1}) \u6216\u66f4\u65b0\u7248\u672c -PluginWrapper.obsoleteJava=\u9700\u8981 Java ({1}) \u6216\u66f4\u65b0\u7248\u672c PluginWrapper.PluginWrapperAdministrativeMonitor.DisplayName=\u8f09\u5165\u5916\u639b\u5931\u6557 PluginWrapper.Already.Disabled=\u5916\u639b\u300c{0}\u300d\u65e9\u5df2\u505c\u7528 PluginWrapper.Plugin.Has.Dependent=\u5916\u639b\u300c{0}\u300d\u6709\u81f3\u5c11\u4e00\u500b\u76f8\u4f9d\u6027\u5916\u639b ({1}) \u4e14\u505c\u7528\u7b56\u7565\u70ba {2}\uff0c\u56e0\u6b64\u7121\u6cd5\u88ab\u505c\u7528 diff --git a/core/src/main/resources/hudson/PluginManager/table.jelly b/core/src/main/resources/hudson/PluginManager/table.jelly index b64f6344e650..feef003ce2a0 100644 --- a/core/src/main/resources/hudson/PluginManager/table.jelly +++ b/core/src/main/resources/hudson/PluginManager/table.jelly @@ -155,9 +155,6 @@ THE SOFTWARE.
${%coreWarning(p.requiredCore)}
- -
${%javaWarning(p.minimumJavaVersion)}
-
${%Applying this update will address security vulnerabilities in the currently installed version.} @@ -184,11 +181,6 @@ THE SOFTWARE. ${%depCoreWarning(p.getNeededDependenciesRequiredCore().toString())}
- -
- ${%depJavaWarning(p.getNeededDependenciesMinimumJavaVersion().toString())} -
-
${%securityWarning}
    diff --git a/core/src/main/resources/hudson/PluginManager/table.properties b/core/src/main/resources/hudson/PluginManager/table.properties index 21d7b265b55b..78ee0550a203 100644 --- a/core/src/main/resources/hudson/PluginManager/table.properties +++ b/core/src/main/resources/hudson/PluginManager/table.properties @@ -29,9 +29,6 @@ parentCompatWarning=The following plugins are affected by this: coreWarning=\ Warning: This plugin is built for Jenkins {0} or newer. \ Jenkins will refuse to load this plugin if installed. -javaWarning=\ - Warning: This plugin requires Java {0} or newer. \ - Jenkins will refuse to load this plugin if installed. depCompatWarning=\ Warning: This plugin requires newer versions of dependencies and at least one of those plugins is not compatible with the installed version. \ This is usually the case because its behavior changed, or it uses a different settings format than the installed version. \ @@ -41,10 +38,6 @@ depCoreWarning=\ Warning: This plugin has dependencies on other plugins that require Jenkins {0} or newer. \ Jenkins will refuse to load the dependencies requiring a newer version of Jenkins, \ and in turn loading this plugin will fail. -depJavaWarning=\ - Warning: this plugin has dependencies on other plugins that require Java {0} or newer. \ - Jenkins will refuse to load the dependencies requiring a newer version of Jenkins, \ - and in turn loading this plugin will fail. securityWarning=\ Warning: This plugin version may not be safe to use. Please review the following security notices: ago={0} ago diff --git a/core/src/main/resources/hudson/PluginManager/table_it.properties b/core/src/main/resources/hudson/PluginManager/table_it.properties index 274fa48c6512..4b62e3f54c4e 100644 --- a/core/src/main/resources/hudson/PluginManager/table_it.properties +++ b/core/src/main/resources/hudson/PluginManager/table_it.properties @@ -59,11 +59,6 @@ depCoreWarning=Avviso: questo componente aggiuntivo dipende da altri \ rifiuter� di caricare le dipendenze che richiedono una versione pi� recente \ di Jenkins e, a sua volta, il caricamento di questo componente aggiuntivo \ non riuscir�. -depJavaWarning=Avviso: questo componente aggiuntivo dipende da altri \ - componenti che richiedono Java {0} o una versione successiva. Jenkins si \ - rifiuter� di caricare le dipendenze che richiedono una versione pi� recente \ - di Java e, a sua volta, il caricamento di questo componente aggiuntivo \ - non riuscir�. Download\ now\ and\ install\ after\ restart=Scarica ora ed esegui \ l''installazione dopo il riavvio filter=Filtra @@ -74,9 +69,6 @@ Install\ without\ restart=Installa senza riavviare instructions=Utilizzare la casella di ricerca soprastante per cercare i \ componenti aggiuntivi disponibili. loading=Caricamento elenco componenti aggiuntivi in corso... -javaWarning=Avviso: questo componente aggiuntivo richiede Java {0} o una \ - versione successiva. Jenkins si rifiuter� di caricare questo componente \ - aggiuntivo se installato. Name=Nome newerVersionEntry=Questa versione del componente aggiuntivo esiste ma non � \ offerta come aggiornamento. Questo � il caso tipico se non sono soddisfatti \ diff --git a/core/src/main/resources/hudson/PluginManager/table_pt_BR.properties b/core/src/main/resources/hudson/PluginManager/table_pt_BR.properties index 4fdf7d4efe92..e4b00b50d3f1 100644 --- a/core/src/main/resources/hudson/PluginManager/table_pt_BR.properties +++ b/core/src/main/resources/hudson/PluginManager/table_pt_BR.properties @@ -66,14 +66,7 @@ deprecationWarning=Esta extens\u00E3o est\u00E1 descontinuada.E maiores detalhes. Released=Liberada unavailable=Indispon\u00EDvel -javaWarning= \ - Aviso: esta extens\u00E3o requer Java {0} ou mais recente. \ - O Jenkins se recusar\u00E1 a carregar esta extens\u00E3o se instalada. Search=Busca -depJavaWarning= \ - Aviso: esta extens\u00E3o tem depend\u00EAncias de outras extens\u00F5es que requerem Java {0} ou mais recente. \ - O Jenkins se recusar\u00E1 a carregar depend\u00EAncias que requerem uma vers\u00E3o mais nova do Jenkins e portanto \ - o carregamento desta extens\u00E3o ir\u00E1 falhar. ago={0} atr\u00E1s Applying\ this\ update\ will\ address\ security\ vulnerabilities\ in\ the\ currently\ installed\ version.=Aplicar\ esta\ atualiza\u00E7\u00E3o\ ir\u00E1\ endere\u00E7ar\ vulnerabilidades\ de\ seguran\u00E7a\ na\ vers\u00E3o\ atualmente\ instalada. instructions=instru\u00E7\u00F5es diff --git a/core/src/main/resources/hudson/PluginManager/table_zh_TW.properties b/core/src/main/resources/hudson/PluginManager/table_zh_TW.properties index a514fb847302..71b163f17409 100644 --- a/core/src/main/resources/hudson/PluginManager/table_zh_TW.properties +++ b/core/src/main/resources/hudson/PluginManager/table_zh_TW.properties @@ -24,10 +24,8 @@ compatWarning=\u8b66\u544a\: \u65b0\u7248\u672c\u4e0d\u76f8\u5bb9\u65bc\u73fe\u5 parentDepCompatWarning=\u4e0b\u5217\u5916\u639b\u4e0d\u76f8\u5bb9\: parentCompatWarning=\u4e0b\u5217\u5916\u639b\u6703\u53d7\u5230\u5f71\u97ff\: coreWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7a0b\u5f0f\u662f\u70ba Jenkins {0} \u4e4b\u5f8c\u7684\u7248\u672c\u8a2d\u8a08\u3002\u5728\u60a8\u76ee\u524d\u7684 Jenkins \u4e0d\u898b\u5f97\u53ef\u4ee5\u6b63\u5e38\u904b\u4f5c\u3002 -javaWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7a0b\u5f0f\u9700\u8981 Java {0} \u6216\u66f4\u65b0\u7248\u672c\u3002\u5728\u60a8\u76ee\u524d\u7684 Jenkins \u4e0d\u898b\u5f97\u53ef\u4ee5\u6b63\u5e38\u904b\u4f5c\u3002 depCompatWarning=\u8b66\u544a\: \u6b64\u5916\u639b\u9700\u8981\u66f4\u65b0\u76f8\u4f9d\u6027\u5916\u639b\uff0c\u4e14\u5176\u4e2d\u81f3\u5c11\u6709\u4e00\u500b\u4e0d\u76f8\u5bb9\u65bc\u76ee\u524d\u7248\u672c\u3002\u9019\u901a\u5e38\u662f\u56e0\u70ba\u5b83\u672c\u8eab\u7684\u884c\u70ba\u6a21\u5f0f\u6709\u66f4\u52d5\uff0c\u6216\u5b83\u7684\u8a2d\u5b9a\u503c\u683c\u5f0f\u4e0d\u540c\u65bc\u76ee\u524d\u7248\u672c\u3002\u4f7f\u7528\u6b64\u5916\u639b\u7684\u4f5c\u696d\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u8a2d\u5b9a\u3002\u60a8\u53ef\u80fd\u5f97\u624b\u52d5\u9084\u539f\u820a\u8a2d\u5b9a\u503c\u624d\u80fd\u9084\u539f\u5230\u820a\u7248\u3002\u8a73\u60c5\u8acb\u53c3\u8003\u6b64\u5916\u639b\u7684\u767c\u884c\u8cc7\u8a0a\u3002 depCoreWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7684\u76f8\u4f9d\u6027\u5916\u639b\u9700\u8981 Jenkins {0} \u6216\u66f4\u65b0\u7248\u672c\u3002Jenkins \u5c07\u6703\u62d2\u7d55\u8f09\u5165\u8a72\u76f8\u4f9d\u6027\u5916\u639b\uff0c\u9019\u6703\u5c0e\u81f4\u9019\u500b\u5916\u639b\u8f09\u5165\u5931\u6557\u3002 -depJavaWarning=\u8b66\u544a\: \u9019\u500b\u5916\u639b\u7684\u76f8\u4f9d\u6027\u5916\u639b\u9700\u8981 Java {0} \u6216\u66f4\u65b0\u7248\u672c\u3002Jenkins \u5c07\u6703\u62d2\u7d55\u8f09\u5165\u8a72\u76f8\u4f9d\u6027\u5916\u639b\uff0c\u9019\u6703\u5c0e\u81f4\u9019\u500b\u5916\u639b\u8f09\u5165\u5931\u6557\u3002 securityWarning=\u8b66\u544a\: \u9019\u500b\u7248\u672c\u7684\u5916\u639b\u7528\u8d77\u4f86\u53ef\u80fd\u4e0d\u5b89\u5168\u3002\u8acb\u67e5\u770b\u4e0b\u5217\u5b89\u5168\u6027\u9808\u77e5\: ago={0}\u524d adoptThisPlugin=\u6b64\u5916\u639b\u958b\u653e\u8a8d\u990a\uff01\u6211\u5011\u6b63\u5728\u5c0b\u627e\u65b0\u7684\u7dad\u8b77\u8005\uff0c\u8acb\u9020\u8a2a Adopt a Plugin \u53d6\u5f97\u66f4\u591a\u8cc7\u8a0a\u3002 diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index 823c851988cc..95aac78d69a5 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -1,6 +1,6 @@ # See ClassicPluginStrategy.DETACHED_LIST. As of JENKINS-47634 also used by plugin-compat-tester. -# Columns are: plugin ID, last core release still containing the plugin's functionality, plugin version that's implied, minimum Java specification version where to install the plugin +# Columns are: plugin ID, last core release still containing the plugin's functionality, plugin version that's implied # Note that all split plugins between and including matrix-auth and jaxb incorrectly use the first # core release without the plugin's functionality when they should use the immediately prior release. @@ -27,7 +27,7 @@ command-launcher 2.86 1.0 jdk-tool 2.112 1.0 # JENKINS-55681 -jaxb 2.163 2.3.0 11 +jaxb 2.163 2.3.0 #JENKINS-43610 Split Trilead out from Core trilead-api 2.184 1.0.4 diff --git a/core/src/test/java/jenkins/plugins/DetachedPluginsUtilTest.java b/core/src/test/java/jenkins/plugins/DetachedPluginsUtilTest.java index 3bd68814a7a2..afe87953a077 100644 --- a/core/src/test/java/jenkins/plugins/DetachedPluginsUtilTest.java +++ b/core/src/test/java/jenkins/plugins/DetachedPluginsUtilTest.java @@ -3,7 +3,6 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasItems; -import static org.hamcrest.Matchers.not; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -13,7 +12,6 @@ import java.nio.charset.StandardCharsets; import java.util.List; import java.util.stream.Collectors; -import jenkins.util.java.JavaUtils; import org.apache.commons.io.IOUtils; import org.junit.Test; @@ -28,19 +26,13 @@ public void checkJaxb() { DetachedPluginsUtil.DetachedPlugin jaxb = plugins.get(0); - assertEquals(new VersionNumber("11"), jaxb.getMinimumJavaVersion()); - final List detachedPlugins = mapToPluginShortName(DetachedPluginsUtil.getDetachedPlugins()); - if (JavaUtils.isRunningWithJava8OrBelow()) { - assertThat(detachedPlugins, not(hasItem("jaxb"))); - } else { - assertThat(detachedPlugins, hasItem("jaxb")); + assertThat(detachedPlugins, hasItem("jaxb")); - final List detachedPluginsSince2_161 = - DetachedPluginsUtil.getDetachedPlugins(new VersionNumber("2.161")); + final List detachedPluginsSince2_161 = + DetachedPluginsUtil.getDetachedPlugins(new VersionNumber("2.161")); - assertThat(mapToPluginShortName(detachedPluginsSince2_161), hasItems("jaxb", "trilead-api")); - } + assertThat(mapToPluginShortName(detachedPluginsSince2_161), hasItems("jaxb", "trilead-api")); } private List mapToPluginShortName(List detachedPlugins) { diff --git a/test/src/test/java/hudson/model/UpdateSiteTest.java b/test/src/test/java/hudson/model/UpdateSiteTest.java index 757adb58efdd..946e42df59ac 100644 --- a/test/src/test/java/hudson/model/UpdateSiteTest.java +++ b/test/src/test/java/hudson/model/UpdateSiteTest.java @@ -25,11 +25,9 @@ package hudson.model; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; import hudson.PluginWrapper; import hudson.model.UpdateSite.Data; @@ -61,7 +59,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.jvnet.hudson.test.Issue; import org.jvnet.hudson.test.JenkinsRule; public class UpdateSiteTest { @@ -174,36 +171,6 @@ public void shutdownWebserver() throws Exception { assertNotEquals("plugin data is present", Collections.emptyMap(), site.getData().plugins); } - @Issue("JENKINS-56477") - @Test - public void isPluginUpdateCompatible() throws Exception { - UpdateSite site = getUpdateSite("/plugins/minJavaVersion-update-center.json"); - final UpdateSite.Plugin tasksPlugin = site.getPlugin("tasks"); - assertNotNull(tasksPlugin); - assertFalse(tasksPlugin.isNeededDependenciesForNewerJava()); - assertFalse(tasksPlugin.isForNewerJava()); - assertTrue(tasksPlugin.isCompatible()); - } - - @Issue("JENKINS-55048") - @Test public void minimumJavaVersion() throws Exception { - UpdateSite site = getUpdateSite("/plugins/minJavaVersion-update-center.json"); - - final UpdateSite.Plugin tasksPlugin = site.getPlugin("tasks"); - assertNotNull(tasksPlugin); - assertFalse(tasksPlugin.isNeededDependenciesForNewerJava()); - assertFalse(tasksPlugin.isForNewerJava()); - - final UpdateSite.Plugin pluginCompiledForTooRecentJava = site.getPlugin("java-too-recent"); - assertFalse(pluginCompiledForTooRecentJava.isNeededDependenciesForNewerJava()); - assertTrue(pluginCompiledForTooRecentJava.isForNewerJava()); - - final UpdateSite.Plugin pluginDependingOnPluginCompiledForTooRecentJava = site.getPlugin("depending-on-too-recent-java"); - assertTrue(pluginDependingOnPluginCompiledForTooRecentJava.isNeededDependenciesForNewerJava()); - assertFalse(pluginDependingOnPluginCompiledForTooRecentJava.isForNewerJava()); - - } - @Test public void getAvailables() throws Exception { UpdateSite site = getUpdateSite("/plugins/available-update-center.json"); List available = site.getAvailables(); diff --git a/test/src/test/resources/plugins/minJavaVersion-update-center.json b/test/src/test/resources/plugins/minJavaVersion-update-center.json deleted file mode 100644 index 05a9e188b906..000000000000 --- a/test/src/test/resources/plugins/minJavaVersion-update-center.json +++ /dev/null @@ -1,57 +0,0 @@ -updateCenter.post( -{"connectionCheckUrl":"http://www.google.com/", - "core": { - "buildDate": "Dec 31, 1969", - "name": "core", - "url": "jenkins.war", - "version": "23" - }, - "id": "default", - "plugins": { - "tasks": { - "buildDate": "Dec 17, 2008", - "dependencies": [], - "developers": [{"name": "lokadm"}], - "excerpt": " This plug-in scans for open tasks in a specified set of files in the project modules and visualizes the results. ", - "name": "tasks", - "requiredCore": "1.264", - "sha1": "wtzlciUKiMcg90H5CTYkGX6+r8Y=", - "title": "Jenkins Task Scanner Plug-in", - "url": "tasks.jpi", - "version": "2.23" - }, - "java-too-recent": { - "buildDate": "Dec 17, 2008", - "dependencies": [], - "developers": [], - "excerpt": "…", - "name": "dummy", - "requiredCore": "1.100", - "sha1": "wtzlcjUKiMcg90H5CTYkGX6+r8Y=", - "title": "Dummy", - "url": "http://nowhere.net/dummy.hpi", - "version": "1.0", - "minimumJavaVersion": "25" - }, - "depending-on-too-recent-java": { - "buildDate": "Dec 17, 2008", - "dependencies": [ - { - "name": "java-too-recent", - "optional": false, - "version":"1.0" - } - ], - "developers": [{"name": "lokadm"}], - "excerpt": " This plug-in scans for open tasks in a specified set of files in the project modules and visualizes the results. ", - "name": "tasks", - "requiredCore": "1.264", - "sha1": "wtzlciUKiMcg90H5CTYkGX6+r8Y=", - "title": "Jenkins Task Scanner Plug-in", - "url": "tasks.jpi", - "version": "2.23" - } - }, - "updateCenterVersion": 1 -} -); diff --git a/war/src/main/js/templates/plugin-manager/available.hbs b/war/src/main/js/templates/plugin-manager/available.hbs index ea276ffe62ad..7d276ea377d5 100644 --- a/war/src/main/js/templates/plugin-manager/available.hbs +++ b/war/src/main/js/templates/plugin-manager/available.hbs @@ -35,11 +35,6 @@ {{{ this.newerCoreRequired }}}
{{/if}} - {{#if this.dependenciesNewerJava }} -
- {{{ this.dependenciesNewerJava }}} -
- {{/if}} {{#if this.unresolvedSecurityWarnings }}
{{ this.unresolvedSecurityWarnings.text }}