Class ListPackage
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
io.jenkins.plugins.dotnet.commands.Command
io.jenkins.plugins.dotnet.commands.ListPackage
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
A build step to run "
dotnet list package
", showing a project's package dependencies.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A descriptor for "dotnet list package
" build steps.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
Field Summary
Fields inherited from class io.jenkins.plugins.dotnet.commands.Command
sdk, showSdkInfo, shutDownBuildServers, unstableIfErrors, unstableIfWarnings, workDirectory
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds command line arguments for this "dotnet list package
" invocation.Gets theNuGet.config
file to use.Gets the sole target framework moniker to use.String[]
Gets the target framework monikers to use.Gets the target framework monikers to use.Gets the project to list packages for.Gets the sole package source to use.String[]
Gets the package sources to use.Gets the package sources to use.Gets the verbosity to use for the command.boolean
Determines whether deprecated packages should be shown.boolean
Determines whether to consider only packages where at most the minor version has changed.boolean
Determines whether to consider only packages where at most the patch version has changed.boolean
Determines whether to consider prerelease packages.boolean
Determines whether to show transitive dependencies.boolean
Determines whether outdated packages should be shown.boolean
Determines whether packages with known vulnerabilities should be shown.void
Sets theNuGet.config
file to use.void
setDeprecated
(boolean deprecated) Determines whether deprecated packages should be shown.void
setFramework
(String framework) Sets the sole target framework moniker to use.void
setFrameworks
(String... frameworks) Sets the target framework monikers to use.void
setFrameworksString
(String frameworks) Sets the target framework monikers to use.void
setHighestMinor
(boolean highestMinor) Determines whether to consider only packages where at most the minor version has changed.void
setHighestPatch
(boolean highestPatch) Determines whether to consider only packages where at most the patch version has changed.void
setIncludePrerelease
(boolean includePrerelease) Determines whether to consider prerelease packages.void
setIncludeTransitive
(boolean includeTransitive) Determines whether to show transitive dependencies.void
setOutdated
(boolean outdated) Determines whether outdated packages should be shown.void
setProject
(String project) Sets the project to list packages for.void
Sets the sole package source to use.void
setSources
(String... sources) Sets the package sources to use.void
setSourcesString
(String sources) Sets the package sources to use.void
setVerbosity
(String verbosity) Sets the verbosity to use for the command.void
setVulnerable
(boolean vulnerable) Determines whether packages with known vulnerabilities should be shown.Methods inherited from class io.jenkins.plugins.dotnet.commands.Command
getCharset, getDescriptor, getSdk, getSdkDescriptor, getWorkDirectory, isContinueOnError, isShowSdkInfo, isSpecificSdkVersion, perform, setCharset, setContinueOnError, setSdk, setShowSdkInfo, setSpecificSdkVersion, setWorkDirectory
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
ListPackage
@DataBoundConstructor public ListPackage()Creates a new "dotnet list package
" build step.
-
-
Method Details
-
addCommandLineArguments
Adds command line arguments for this "dotnet list package
" invocation.This adds:
list
- The project specified via
setProject(String)
. package
--deprecated
, if requested viasetDeprecated(boolean)
.--outdated
, if requested viasetOutdated(boolean)
.-
--framework xxx
for each target framework moniker specified viasetFramework(String)
,setFrameworks(String...)
orsetFrameworksString(String)
. --include-transitive
, if requested viasetIncludeTransitive(boolean)
.-v:xxx
, if a verbosity has been specified viasetVerbosity(String)
.
--include-prerelease
, if requested viasetIncludePrerelease(boolean)
.--highest-minor
, if requested viasetHighestMinor(boolean)
.--highest-patch
, if requested viasetHighestPatch(boolean)
.--config xxx
, if a configuration file was specified viasetConfig(String)
.-
--source xxx
for each source specified viasetSource(String)
,setSources(String...)
orsetSourcesString(String)
.
- Overrides:
addCommandLineArguments
in classCommand
- Parameters:
args
- The current set of arguments.
-
getConfig
Gets theNuGet.config
file to use.- Returns:
- The
NuGet.config
file to use.
-
setConfig
Sets theNuGet.config
file to use.- Parameters:
config
- TheNuGet.config
file to use.
-
isDeprecated
public boolean isDeprecated()Determines whether deprecated packages should be shown.- Returns:
true
if deprecated packages should be shown;false
otherwise.
-
setDeprecated
@DataBoundSetter public void setDeprecated(boolean deprecated) Determines whether deprecated packages should be shown.- Parameters:
deprecated
-true
to show deprecated packages;false
otherwise.
-
getFramework
Gets the sole target framework moniker to use.- Returns:
- The sole target framework moniker to use, or
null
when there is not exactly one target framework moniker set.
-
setFramework
Sets the sole target framework moniker to use.To set more than one, use
setFrameworks(String...)
instead.- Parameters:
framework
- The sole target framework moniker to use.
-
getFrameworks
Gets the target framework monikers to use.- Returns:
- The target framework monikers to use.
-
setFrameworks
Sets the target framework monikers to use.- Parameters:
frameworks
- The target framework monikers to use.
-
getFrameworksString
Gets the target framework monikers to use.- Returns:
- The target framework monikers to use.
-
setFrameworksString
Sets the target framework monikers to use.- Parameters:
frameworks
- The target framework monikers to use.
-
isHighestMinor
public boolean isHighestMinor()Determines whether to consider only packages where at most the minor version has changed.- Returns:
true
if only packages where at most the minor version has changed are considered;false
otherwise.
-
setHighestMinor
@DataBoundSetter public void setHighestMinor(boolean highestMinor) Determines whether to consider only packages where at most the minor version has changed.- Parameters:
highestMinor
-true
to only consider packages where at most the minor version has changed;false
otherwise.
-
isHighestPatch
public boolean isHighestPatch()Determines whether to consider only packages where at most the patch version has changed.- Returns:
true
if only packages where at most the patch version has changed are considered;false
otherwise.
-
setHighestPatch
@DataBoundSetter public void setHighestPatch(boolean highestPatch) Determines whether to consider only packages where at most the patch version has changed.- Parameters:
highestPatch
-true
to only consider packages where at most the patch version has changed;false
otherwise.
-
isIncludePrerelease
public boolean isIncludePrerelease()Determines whether to consider prerelease packages.- Returns:
true
if prerelease packages are considered;false
otherwise.
-
setIncludePrerelease
@DataBoundSetter public void setIncludePrerelease(boolean includePrerelease) Determines whether to consider prerelease packages.- Parameters:
includePrerelease
-true
to consider prerelease packages;false
otherwise.
-
isIncludeTransitive
public boolean isIncludeTransitive()Determines whether to show transitive dependencies.- Returns:
true
if transitive dependencies are shown;false
otherwise.
-
setIncludeTransitive
@DataBoundSetter public void setIncludeTransitive(boolean includeTransitive) Determines whether to show transitive dependencies.- Parameters:
includeTransitive
-true
to show transitive dependencies;false
otherwise.
-
isOutdated
public boolean isOutdated()Determines whether outdated packages should be shown.- Returns:
true
if outdated packages should be shown;false
otherwise.
-
setOutdated
@DataBoundSetter public void setOutdated(boolean outdated) Determines whether outdated packages should be shown.- Parameters:
outdated
-true
to show outdated packages;false
otherwise.
-
getProject
Gets the project to list packages for.- Returns:
- The project to list packages for.
-
setProject
Sets the project to list packages for.- Parameters:
project
- The project to list packages for.
-
getSource
Gets the sole package source to use.- Returns:
- The sole package source to use, or
null
when there is not exactly one package source set.
-
setSource
Sets the sole package source to use.To set more than one, use
setSources(String...)
instead.- Parameters:
source
- The sole package source to use.
-
getSources
Gets the package sources to use.- Returns:
- The package sources to use.
-
setSources
Sets the package sources to use.- Parameters:
sources
- The package sources to use.
-
getSourcesString
Gets the package sources to use.- Returns:
- The package sources to use.
-
setSourcesString
Sets the package sources to use.- Parameters:
sources
- The package sources to use.
-
getVerbosity
Gets the verbosity to use for the command.- Returns:
- The verbosity to use for the command.
-
setVerbosity
Sets the verbosity to use for the command.- Parameters:
verbosity
- The verbosity to use for the command.
-
isVulnerable
public boolean isVulnerable()Determines whether packages with known vulnerabilities should be shown.- Returns:
true
if packages with known vulnerabilities should be shown;false
otherwise.
-
setVulnerable
@DataBoundSetter public void setVulnerable(boolean vulnerable) Determines whether packages with known vulnerabilities should be shown.- Parameters:
vulnerable
-true
to show packages with known vulnerabilities;false
otherwise.
-