public abstract class JkPlugin
extends java.lang.Object
JkCommandSet instance. The relationship is bidirectional :
JkCommandSet instances can invoke plugin methods and vice-versa.
Therefore plugins can interact with (or load) other plugins from the owning JkCommandSet instance
(which is a quite common pattern).
| Modifier | Constructor and Description |
|---|---|
protected |
JkPlugin(JkCommandSet commandSet) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterSetup()
Override this method to perform some actions, once the plugin has been setup by
JkCommandSet.setup() method. |
protected void |
beforeSetup()
Override this method to initialize the plugin.
|
protected java.lang.String |
getBreakingVersionRegistryUrl()
When publishing a plugin, authors can not guess which future version of Jeka will break compatibility.
|
protected JkCommandSet |
getCommandSet() |
protected java.lang.String |
getLowestJekaCompatibleVersion()
Returns a the lowest Jeka version which is compatible with this plugin.
|
void |
help() |
java.lang.String |
name() |
java.lang.String |
toString() |
protected JkPlugin(JkCommandSet commandSet)
public void help()
protected void beforeSetup()
throws java.lang.Exception
JkCommandSet.setup() is invoked.java.lang.Exceptionprotected void afterSetup()
throws java.lang.Exception
JkCommandSet.setup() method.
Typically, some plugins have to configure other ones (For instance, java plugin configures
scaffold plugin to instruct what to use as a template build class). Those kind of
configuration is better done here as the setup made in JkCommandSet is likely
to impact the result of the configuration.
java.lang.Exceptionprotected java.lang.String getLowestJekaCompatibleVersion()
null and
running Jeka version is lower then a warning log will be emitted.protected java.lang.String getBreakingVersionRegistryUrl()
The register is expected to be a simple flat file.
Each row is structured as pluginVersion : jekaVersion.
The example below means that :
1.2.1.RELEASE : 0.9.1.RELEASE
1.3.0.RELEASE : 0.9.5.M1
public final java.lang.String name()
protected JkCommandSet getCommandSet()
public java.lang.String toString()
toString in class java.lang.Object