Package jenkins.mvn
Class SettingsProvider
- All Implemented Interfaces:
ExtensionPoint
,Describable<SettingsProvider>
- Direct Known Subclasses:
DefaultSettingsProvider
,FilePathSettingsProvider
public abstract class SettingsProvider
extends AbstractDescribableImpl<SettingsProvider>
implements ExtensionPoint
- Since:
- 1.491
- Author:
- Nicolas De Loof, Dominik Bartholdi (imod)
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilePath
getSettingsFilePath
(SettingsProvider settings, AbstractBuild<?, ?> build, TaskListener listener) Convenience method handling allnull
checks.static String
getSettingsRemotePath
(SettingsProvider settings, AbstractBuild<?, ?> build, TaskListener listener) Convenience method handling allnull
checks.static SettingsProvider
parseSettingsProvider
(org.kohsuke.stapler.StaplerRequest req) Deprecated.static SettingsProvider
parseSettingsProvider
(org.kohsuke.stapler.StaplerRequest2 req) abstract FilePath
supplySettings
(AbstractBuild<?, ?> build, TaskListener listener) Configure maven launcher argument list with adequate settings path.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
SettingsProvider
public SettingsProvider()
-
-
Method Details
-
supplySettings
Configure maven launcher argument list with adequate settings path. Implementations should be aware that this method might get called multiple times during a build.- Returns:
- the filepath to the provided file.
null
if no settings will be provided.
-
parseSettingsProvider
public static SettingsProvider parseSettingsProvider(org.kohsuke.stapler.StaplerRequest2 req) throws Descriptor.FormException, jakarta.servlet.ServletException - Throws:
Descriptor.FormException
jakarta.servlet.ServletException
-
parseSettingsProvider
@Deprecated public static SettingsProvider parseSettingsProvider(org.kohsuke.stapler.StaplerRequest req) throws Descriptor.FormException, javax.servlet.ServletException Deprecated.- Throws:
Descriptor.FormException
javax.servlet.ServletException
-
getSettingsFilePath
public static FilePath getSettingsFilePath(SettingsProvider settings, AbstractBuild<?, ?> build, TaskListener listener) Convenience method handling allnull
checks. Provides the path on the (possible) remote settings file.- Parameters:
settings
- the provider to be usedbuild
- the active buildlistener
- the listener of the current build- Returns:
- the path to the settings.xml
-
getSettingsRemotePath
public static String getSettingsRemotePath(SettingsProvider settings, AbstractBuild<?, ?> build, TaskListener listener) Convenience method handling allnull
checks. Provides the path on the (possible) remote settings file.- Parameters:
settings
- the provider to be usedbuild
- the active buildlistener
- the listener of the current build- Returns:
- the path to the settings.xml
-
parseSettingsProvider(StaplerRequest2)