Class ToolInstallation

All Implemented Interfaces:
ExtensionPoint, Describable<ToolInstallation>, Serializable
Direct Known Subclasses:
JDK, Maven.MavenInstallation

public abstract class ToolInstallation extends AbstractDescribableImpl<ToolInstallation> implements Serializable, ExtensionPoint
Formalization of a tool installed in nodes used for builds. (Examples include things like JDKs, Ants, Mavens, and Groovys.)

You can define such a concept in your plugin entirely on your own, without extending from this class, but choosing this class as a base class has several benefits:

  • Hudson allows admins to specify different locations for tools on some agents. For example, JDK on the controller might be on /usr/local/java but on a Windows agent it could be at c:\Program Files\Java
  • Hudson can verify the existence of tools and provide warnings and diagnostics for admins. (TBD)
  • Hudson can perform automatic installations for users. (TBD)

Implementations of this class are strongly encouraged to also implement NodeSpecific (by using translateFor(Node, TaskListener)) and EnvironmentSpecific (by using EnvVars.expand(String).) Callers such as build steps can then use translate(AbstractBuild,TaskListener) and cast to the desired ToolInstallation subtype, or just call NodeSpecific.forNode(hudson.model.Node, hudson.model.TaskListener) and EnvironmentSpecific.forEnvironment(hudson.EnvVars) directly.

To contribute an extension point, put Extension on your ToolDescriptor class.

See Also: