diff --git a/core/src/main/java/hudson/Plugin.java b/core/src/main/java/hudson/Plugin.java index 4808f208ed..75af4fda01 100644 --- a/core/src/main/java/hudson/Plugin.java +++ b/core/src/main/java/hudson/Plugin.java @@ -40,15 +40,18 @@ import java.io.File; import net.sf.json.JSONObject; import com.thoughtworks.xstream.XStream; +import hudson.init.Initializer; +import hudson.init.Terminator; import java.net.URI; import java.net.URISyntaxException; +import jenkins.model.GlobalConfiguration; import org.kohsuke.stapler.HttpResponses; /** * Base class of Hudson plugin. * *

- * A plugin may derive from this class, or it may directly define extension + * A plugin may {@linkplain #Plugin derive from this class}, or it may directly define extension * points annotated with {@link hudson.Extension}. For a list of extension * points, see * https://wiki.jenkins-ci.org/display/JENKINS/Extension+points. @@ -78,6 +81,22 @@ import org.kohsuke.stapler.HttpResponses; */ public abstract class Plugin implements Saveable { + /** + * You do not need to create custom subtypes: + *

+ * Note that every plugin gets a {@link DummyImpl} by default, + * which will still route the URL space, serve {@link #getWrapper}, and so on. + * @deprecated Use more modern APIs rather than subclassing. + */ + @Deprecated + protected Plugin() {} + /** * Set by the {@link PluginManager}, before the {@link #start()} method is called. * This points to the {@link PluginWrapper} that wraps diff --git a/core/src/main/java/hudson/model/JobProperty.java b/core/src/main/java/hudson/model/JobProperty.java index d664fe8e82..2c982286e4 100644 --- a/core/src/main/java/hudson/model/JobProperty.java +++ b/core/src/main/java/hudson/model/JobProperty.java @@ -25,7 +25,6 @@ package hudson.model; import hudson.ExtensionPoint; import hudson.Launcher; -import hudson.Plugin; import hudson.model.Descriptor.FormException; import hudson.model.queue.SubTask; import hudson.tasks.BuildStep; @@ -49,7 +48,7 @@ import javax.annotation.Nonnull; * Extensible property of {@link Job}. * *

- * {@link Plugin}s can extend this to define custom properties + * Plugins can extend this to define custom properties * for {@link Job}s. {@link JobProperty}s show up in the user * configuration screen, and they are persisted with the job object. * diff --git a/core/src/main/java/hudson/model/PageDecorator.java b/core/src/main/java/hudson/model/PageDecorator.java index 550db5805d..5411b346b5 100644 --- a/core/src/main/java/hudson/model/PageDecorator.java +++ b/core/src/main/java/hudson/model/PageDecorator.java @@ -24,7 +24,6 @@ package hudson.model; import hudson.ExtensionPoint; -import hudson.Plugin; import hudson.Extension; import hudson.ExtensionList; import hudson.util.DescriptorList; @@ -45,7 +44,7 @@ import java.util.List; * *

Life-cycle

*

- * {@link Plugin}s that contribute this extension point + * Plugins that contribute this extension point * should implement a new decorator and put {@link Extension} on the class. * *

Associated Views

diff --git a/core/src/main/java/hudson/model/UserProperty.java b/core/src/main/java/hudson/model/UserProperty.java index 3400bb27ee..0f0958d95c 100644 --- a/core/src/main/java/hudson/model/UserProperty.java +++ b/core/src/main/java/hudson/model/UserProperty.java @@ -24,7 +24,6 @@ package hudson.model; import hudson.ExtensionPoint; -import hudson.Plugin; import hudson.DescriptorExtensionList; import hudson.model.Descriptor.FormException; import jenkins.model.Jenkins; @@ -37,7 +36,7 @@ import org.kohsuke.stapler.export.ExportedBean; * Extensible property of {@link User}. * *

- * {@link Plugin}s can extend this to define custom properties + * Plugins can extend this to define custom properties * for {@link User}s. {@link UserProperty}s show up in the user * configuration screen, and they are persisted with the user object. *