public static final class Maven.MavenInstallation extends ToolInstallation implements EnvironmentSpecific<Maven.MavenInstallation>, NodeSpecific<Maven.MavenInstallation>
Modifier and Type | Class and Description |
---|---|
static class |
Maven.MavenInstallation.ConverterImpl |
static class |
Maven.MavenInstallation.DescriptorImpl |
ToolInstallation.ToolConverter
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static int |
MAVEN_20
Constants for describing Maven versions for comparison.
|
static int |
MAVEN_21 |
static int |
MAVEN_30 |
Constructor and Description |
---|
MavenInstallation(String name,
String home)
Deprecated.
as of 1.308.
Use
MavenInstallation(String, String, List) |
MavenInstallation(String name,
String home,
List<? extends ToolProperty<?>> properties) |
Modifier and Type | Method and Description |
---|---|
void |
buildEnvVars(EnvVars env)
Expose any environment variables that this tool installation wants the build to see.
|
boolean |
equals(Object o) |
Maven.MavenInstallation |
forEnvironment(EnvVars environment)
Returns a specialized copy of T for functioning in the given environment.
|
Maven.MavenInstallation |
forNode(Node node,
TaskListener log)
Returns a specialized copy of T for functioning in the given node.
|
String |
getExecutable(Launcher launcher)
Gets the executable path of this maven on the given target system.
|
boolean |
getExists()
Returns true if the executable exists.
|
File |
getHomeDir() |
String |
getMavenHome()
Deprecated.
as of 1.308. Use
ToolInstallation.getHome() . |
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.
|
all, getHome, getName, getProperties, readResolve, toString, translate, translate, translateFor, writeReplace
getDescriptor
public static final int MAVEN_20
public static final int MAVEN_21
public static final int MAVEN_30
@Deprecated public MavenInstallation(String name, String home)
MavenInstallation(String, String, List)
@DataBoundConstructor public MavenInstallation(String name, String home, List<? extends ToolProperty<?>> properties)
@Deprecated public String getMavenHome()
ToolInstallation.getHome()
.public File getHomeDir()
public void buildEnvVars(EnvVars env)
ToolInstallation
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.
buildEnvVars
in class ToolInstallation
public boolean meetsMavenReqVersion(Launcher launcher, int mavenReqVersion) throws IOException, InterruptedException
launcher
- Represents the node on which we evaluate the path.mavenReqVersion
- Represents the minimum required Maven version - constants defined above.IOException
InterruptedException
public boolean isMaven2_1(Launcher launcher) throws IOException, InterruptedException
launcher
- Represents the node on which we evaluate the path.IOException
InterruptedException
public String getExecutable(Launcher launcher) throws IOException, InterruptedException
IOException
InterruptedException
public boolean getExists()
public Maven.MavenInstallation forEnvironment(EnvVars environment)
EnvironmentSpecific
forEnvironment
in interface EnvironmentSpecific<Maven.MavenInstallation>
public Maven.MavenInstallation forNode(Node node, TaskListener log) throws IOException, InterruptedException
NodeSpecific
forNode
in interface NodeSpecific<Maven.MavenInstallation>
IOException
InterruptedException
Copyright © 2004–2022. All rights reserved.