mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
add @since 1.490
This commit is contained in:
1 parent
2c977c79ea
commit
32bb46bf33
13 files changed
+54
-15
No files matched your search
@@ -1044,6 +1044,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
|
||||
/**
|
||||
* {@link AdministrativeMonitor} that informs the administrator about a required plugin update.
|
||||
* @since 1.490
|
||||
*/
|
||||
@Extension
|
||||
public static final class PluginUpdateMonitor extends AdministrativeMonitor {
|
||||
|
||||
@@ -68,7 +68,6 @@ import org.kohsuke.stapler.QueryParameter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Properties;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.List;
|
||||
@@ -127,13 +126,13 @@ public class Maven extends Builder {
|
||||
|
||||
/**
|
||||
* Provides access to the settings.xml to be used for a build.
|
||||
* @since 1.488
|
||||
* @since 1.490
|
||||
*/
|
||||
private SettingsProvider settings = new DefaultSettingsProvider();
|
||||
|
||||
/**
|
||||
* Provides access to the global settings.xml to be used for a build.
|
||||
* @since 1.488
|
||||
* @since 1.490
|
||||
*/
|
||||
private GlobalSettingsProvider globalSettings = new DefaultGlobalSettingsProvider();
|
||||
|
||||
@@ -167,11 +166,17 @@ public class Maven extends Builder {
|
||||
public String getTargets() {
|
||||
return targets;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 1.490
|
||||
*/
|
||||
public SettingsProvider getSettings() {
|
||||
return settings != null ? settings : new DefaultSettingsProvider();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.490
|
||||
*/
|
||||
public GlobalSettingsProvider getGlobalSettings() {
|
||||
return globalSettings != null ? globalSettings : new DefaultGlobalSettingsProvider();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.kohsuke.stapler.DataBoundConstructor;
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @author Dominik Bartholdi (imod)
|
||||
* @since 1.490
|
||||
*/
|
||||
public class DefaultGlobalSettingsProvider extends GlobalSettingsProvider {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.kohsuke.stapler.DataBoundConstructor;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @since 1.490
|
||||
*/
|
||||
public class DefaultSettingsProvider extends SettingsProvider {
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.kohsuke.stapler.DataBoundConstructor;
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @author Dominik Bartholdi (imod)
|
||||
* @since 1.490
|
||||
*/
|
||||
public class FilePathGlobalSettingsProvider extends GlobalSettingsProvider {
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.kohsuke.stapler.DataBoundConstructor;
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @author Dominik Bartholdi (imod)
|
||||
* @since 1.490
|
||||
*/
|
||||
public class FilePathSettingsProvider extends SettingsProvider {
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.kohsuke.stapler.StaplerRequest;
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @author Dominik Bartholdi (imod)
|
||||
* @since 1.490
|
||||
*/
|
||||
public abstract class GlobalSettingsProvider extends AbstractDescribableImpl<GlobalSettingsProvider> implements ExtensionPoint {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import jenkins.model.Jenkins;
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @author Dominik Bartholdi (imod)
|
||||
* @since 1.490
|
||||
*/
|
||||
public abstract class GlobalSettingsProviderDescriptor extends Descriptor<GlobalSettingsProvider> {
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.kohsuke.stapler.StaplerRequest;
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @author Dominik Bartholdi (imod)
|
||||
* @since 1.490
|
||||
*/
|
||||
public abstract class SettingsProvider extends AbstractDescribableImpl<SettingsProvider> implements ExtensionPoint {
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import jenkins.model.Jenkins;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
* @since 1.490
|
||||
*/
|
||||
public abstract class SettingsProviderDescriptor extends Descriptor<SettingsProvider> {
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
package hudson.maven;
|
||||
|
||||
import static hudson.Util.*;
|
||||
import static hudson.model.ItemGroupMixIn.loadChildren;
|
||||
import hudson.CopyOnWrite;
|
||||
import hudson.EnvVars;
|
||||
@@ -34,7 +33,6 @@ import hudson.Functions;
|
||||
import hudson.Indenter;
|
||||
import hudson.Plugin;
|
||||
import hudson.Util;
|
||||
import hudson.PluginManager.PluginUpdateMonitor;
|
||||
import hudson.maven.local_repo.DefaultLocalRepositoryLocator;
|
||||
import hudson.maven.local_repo.LocalRepositoryLocator;
|
||||
import hudson.maven.local_repo.PerJobLocalRepositoryLocator;
|
||||
@@ -275,23 +273,26 @@ public class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,MavenMod
|
||||
protected transient String globalSettingConfigPath;
|
||||
|
||||
/**
|
||||
* @since 1.488
|
||||
* @since 1.490
|
||||
*/
|
||||
private SettingsProvider settings = new DefaultSettingsProvider();
|
||||
|
||||
/**
|
||||
* @since 1.488
|
||||
* @since 1.490
|
||||
*/
|
||||
private GlobalSettingsProvider globalSettings = new DefaultGlobalSettingsProvider();
|
||||
|
||||
|
||||
/**
|
||||
* @since 1.490
|
||||
*/
|
||||
public Object readResolve() {
|
||||
// backward compatibility
|
||||
// backward compatibility, maven-plugin used to have a dependency to the config-file-provider plugin
|
||||
Plugin plugin = null;
|
||||
if(StringUtils.isNotBlank(this.settingConfigId) || StringUtils.isNotBlank(this.globalSettingConfigId)) {
|
||||
plugin = Jenkins.getInstance().getPlugin("config-file-provider");
|
||||
if(plugin == null || !plugin.getWrapper().isEnabled()){
|
||||
System.err.println("ERROR: 'config-file-provider' is not installed or disabled, therefore the config cant be fully loaded!!");
|
||||
System.err.println(Messages.MavenModuleSet_readResolve_missingConfigProvider());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,8 +307,8 @@ public class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,MavenMod
|
||||
this.settings = newInstance;
|
||||
this.settingConfigId = null;
|
||||
} catch (Exception e) {
|
||||
// The PluginUpdateMonitor is also informing the admin about the update
|
||||
System.err.println("ERROR: Please update the 'config-file-provider' plugin, the current version is not supported anymore! (settingConfigId="+settingConfigId+")");
|
||||
// The PluginUpdateMonitor is also informing the admin about the update (via hudson.maven.PluginImpl.init())
|
||||
System.err.println(Messages.MavenModuleSet_readResolve_updateConfigProvider(settingConfigId));
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -320,8 +321,8 @@ public class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,MavenMod
|
||||
this.globalSettings = newInstance;
|
||||
this.globalSettingConfigId = null;
|
||||
} catch (Exception e) {
|
||||
// The PluginUpdateMonitor is also informing the admin about the update
|
||||
System.err.println("ERROR: Please update the 'config-file-provider' plugin, the current version is not supported anymore! (globalSettingConfigId="+globalSettingConfigId+")");
|
||||
// The PluginUpdateMonitor is also informing the admin about the update (via hudson.maven.PluginImpl.init())
|
||||
System.err.println(Messages.MavenModuleSet_readResolve_updateConfigProvider(globalSettingConfigId));
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -580,6 +581,20 @@ public class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,MavenMod
|
||||
public void setLocalRepository(LocalRepositoryLocator localRepository) {
|
||||
this.localRepository = localRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.490
|
||||
*/
|
||||
public void setSettings(SettingsProvider settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.490
|
||||
*/
|
||||
public void setGlobalSettings(GlobalSettingsProvider globalSettings) {
|
||||
this.globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
public void setIgnoreUpstremChanges(boolean ignoreUpstremChanges) {
|
||||
this.ignoreUpstremChanges = ignoreUpstremChanges;
|
||||
|
||||
@@ -31,6 +31,7 @@ import hudson.model.Items;
|
||||
|
||||
/**
|
||||
* @author huybrechts
|
||||
* @author Dominik Bartholdi (imod)
|
||||
*/
|
||||
public class PluginImpl extends Plugin {
|
||||
@Override
|
||||
@@ -44,10 +45,13 @@ public class PluginImpl extends Plugin {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.490
|
||||
*/
|
||||
@Initializer(after=InitMilestone.PLUGINS_STARTED)
|
||||
public static void init(){
|
||||
// inform the admin if there is a version of the config file provider installed which is not compatible
|
||||
PluginUpdateMonitor.getInstance().ifPluginOlderThenReport("config-file-provider", "2.2.2", "The current installed version of 'config-file-provider' is not compatible with this core anymore (requires > 2.2.1)");
|
||||
PluginUpdateMonitor.getInstance().ifPluginOlderThenReport("config-file-provider", "2.2.2", Messages.PluginImpl_updateConfiProvider());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -32,6 +32,10 @@ MavenModule.Pronoun=Module
|
||||
|
||||
MavenModuleSet.DiplayName=Build a maven2/3 project
|
||||
MavenModuleSet.AlternateSettingsRelativePath=Alternate settings file must be a relative path.
|
||||
MavenModuleSet.readResolve_missingConfigProvider=ERROR: 'config-file-provider' is not installed or disabled, therefore the config can't be fully loaded!!
|
||||
MavenModuleSet.readResolve_updateConfigProvider=ERROR: Please update the 'config-file-provider' plugin, the current version is not supported anymore! (id={0})
|
||||
|
||||
PluginImpl.updateConfiProvider=The current installed version of 'config-file-provider' is not compatible with this core anymore (requires > 2.2.1)
|
||||
|
||||
MavenModuleSetBuild.DiscoveredModule=Discovered a new module {0} {1}
|
||||
MavenModuleSetBuild.DownloadedArtifact=Downloaded artifact {0}/{1}
|
||||
@@ -57,3 +61,5 @@ ProcessCache.Reusing=Reusing existing maven process
|
||||
RedeployPublisher.getDisplayName=Deploy artifacts to Maven repository
|
||||
RedeployPublisher.RepositoryURL.Mandatory=Repository URL is mandatory
|
||||
ReleaseAction.DisplayName=Release New Version
|
||||
|
||||
|
||||
Reference in new issue
Block a user