Package jenkins.mvn
Class GlobalSettingsProvider
java.lang.Object
jenkins.mvn.GlobalSettingsProvider
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalSettingsProvider>
- Direct Known Subclasses:
DefaultGlobalSettingsProvider
,FilePathGlobalSettingsProvider
public abstract class GlobalSettingsProvider
extends Object
implements Describable<GlobalSettingsProvider>, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilePath
getSettingsFilePath
(GlobalSettingsProvider settings, AbstractBuild<?, ?> build, TaskListener listener) Convenience method handling allnull
checks.static String
getSettingsRemotePath
(GlobalSettingsProvider provider, AbstractBuild<?, ?> build, TaskListener listener) Convenience method handling allnull
checks.static GlobalSettingsProvider
parseSettingsProvider
(org.kohsuke.stapler.StaplerRequest req) Deprecated.static GlobalSettingsProvider
parseSettingsProvider
(org.kohsuke.stapler.StaplerRequest2 req) abstract FilePath
supplySettings
(AbstractBuild<?, ?> build, TaskListener listener) configure maven launcher argument list with adequate settings pathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
GlobalSettingsProvider
public GlobalSettingsProvider()
-
-
Method Details
-
supplySettings
configure maven launcher argument list with adequate settings path- Parameters:
build
- the build to provide the settings for- Returns:
- the filepath to the provided file.
null
if no settings will be provided.
-
parseSettingsProvider
public static GlobalSettingsProvider parseSettingsProvider(org.kohsuke.stapler.StaplerRequest2 req) throws Descriptor.FormException, jakarta.servlet.ServletException - Throws:
Descriptor.FormException
jakarta.servlet.ServletException
- Since:
- 2.475
-
parseSettingsProvider
@Deprecated public static GlobalSettingsProvider parseSettingsProvider(org.kohsuke.stapler.StaplerRequest req) throws Descriptor.FormException, javax.servlet.ServletException Deprecated.- Throws:
Descriptor.FormException
javax.servlet.ServletException
-
getSettingsFilePath
public static FilePath getSettingsFilePath(GlobalSettingsProvider 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 global settings.xml
-
getSettingsRemotePath
public static String getSettingsRemotePath(GlobalSettingsProvider provider, AbstractBuild<?, ?> build, TaskListener listener) Convenience method handling allnull
checks. Provides the path on the (possible) remote settings file.- Parameters:
provider
- the provider to be usedbuild
- the active buildlistener
- the listener of the current build- Returns:
- the path to the global settings.xml
-
parseSettingsProvider(StaplerRequest2)