Package hudson.tasks
Class Maven.MavenInstallation
java.lang.Object
hudson.model.AbstractDescribableImpl<ToolInstallation>
hudson.tools.ToolInstallation
hudson.tasks.Maven.MavenInstallation
- All Implemented Interfaces:
ExtensionPoint
,Describable<ToolInstallation>
,EnvironmentSpecific<Maven.MavenInstallation>
,NodeSpecific<Maven.MavenInstallation>
,Serializable
- Enclosing class:
- Maven
public static final class Maven.MavenInstallation
extends ToolInstallation
implements EnvironmentSpecific<Maven.MavenInstallation>, NodeSpecific<Maven.MavenInstallation>
Represents a Maven installation in a system.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from class hudson.tools.ToolInstallation
ToolInstallation.ToolConverter
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMavenInstallation
(String name, String home) Deprecated.as of 1.308.MavenInstallation
(String name, String home, List<? extends ToolProperty<?>> properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildEnvVars
(EnvVars env) Expose any environment variables that this tool installation wants the build to see.boolean
forEnvironment
(EnvVars environment) Returns a specialized copy of T for functioning in the given environment.forNode
(Node node, TaskListener log) Returns a specialized copy of T for functioning in the given node.getExecutable
(Launcher launcher) Gets the executable path of this maven on the given target system.boolean
Returns true if the executable exists.Deprecated.as of 1.308.int
hashCode()
boolean
isMaven2_1
(Launcher launcher) Is this Maven 2.1.x or 2.2.x - but not Maven 3.x?boolean
meetsMavenReqVersion
(Launcher launcher, int mavenReqVersion) Compares the version of this Maven installation to the minimum required version specified.Methods inherited from class hudson.tools.ToolInstallation
all, getHome, getName, getProperties, readResolve, toString, translate, translate, translateFor, writeReplace
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
MAVEN_20
public static final int MAVEN_20Constants for describing Maven versions for comparison.- See Also:
-
MAVEN_21
public static final int MAVEN_21- See Also:
-
MAVEN_30
public static final int MAVEN_30- See Also:
-
-
Constructor Details
-
MavenInstallation
Deprecated.as of 1.308. UseMavenInstallation(String, String, List)
-
MavenInstallation
@DataBoundConstructor public MavenInstallation(String name, String home, List<? extends ToolProperty<?>> properties)
-
-
Method Details
-
getMavenHome
Deprecated.as of 1.308. UseToolInstallation.getHome()
.install directory. -
getHomeDir
-
buildEnvVars
Description copied from class:ToolInstallation
Expose any environment variables that this tool installation wants the build to see.To add entry to PATH, do
envVars.put("PATH+XYZ",path)
where 'XYZ' is something unique. Variable names of the form 'A+B' is interpreted as adding the value to the existing PATH.- Overrides:
buildEnvVars
in classToolInstallation
-
meetsMavenReqVersion
public boolean meetsMavenReqVersion(Launcher launcher, int mavenReqVersion) throws IOException, InterruptedException Compares the version of this Maven installation to the minimum required version specified.- Parameters:
launcher
- Represents the node on which we evaluate the path.mavenReqVersion
- Represents the minimum required Maven version - constants defined above.- Throws:
IOException
InterruptedException
-
isMaven2_1
Is this Maven 2.1.x or 2.2.x - but not Maven 3.x?- Parameters:
launcher
- Represents the node on which we evaluate the path.- Throws:
IOException
InterruptedException
-
getExecutable
Gets the executable path of this maven on the given target system.- Throws:
IOException
InterruptedException
-
getExists
public boolean getExists()Returns true if the executable exists. -
forEnvironment
Description copied from interface:EnvironmentSpecific
Returns a specialized copy of T for functioning in the given environment.- Specified by:
forEnvironment
in interfaceEnvironmentSpecific<Maven.MavenInstallation>
-
forNode
public Maven.MavenInstallation forNode(Node node, TaskListener log) throws IOException, InterruptedException Description copied from interface:NodeSpecific
Returns a specialized copy of T for functioning in the given node.- Specified by:
forNode
in interfaceNodeSpecific<Maven.MavenInstallation>
- Throws:
IOException
InterruptedException
-
equals
-
hashCode
public int hashCode()
-