Class NuGetCommand

All Implemented Interfaces:
ExtensionPoint, Describable<Builder>, BuildStep, SimpleBuildStep
Direct Known Subclasses:
DeleteOrPush, Locals

public class NuGetCommand extends Command
A build step executing a subcommand of dotnet nuget.
  • Field Details

    • forceEnglishOutput

      protected boolean forceEnglishOutput
      Indicates whether the command output should be forced to be in English.
  • Constructor Details

    • NuGetCommand

      protected NuGetCommand()
      Creates a new dotnet nuget build step.
    • NuGetCommand

      protected NuGetCommand(@NonNull String subCommand)
      Creates a new dotnet nuget build step.
      Parameters:
      subCommand - The dotnet nuget subcommand to execute.
  • Method Details

    • addCommandLineArguments

      protected void addCommandLineArguments(@NonNull DotNetArguments args) throws AbortException
      Adds command line arguments for this .NET NuGet command invocation.

      This adds:

      1. nuget
      2. The sub-command (e.g. push), if applicable.
      3. --force-english-output, if requested via setForceEnglishOutput(boolean).
      Overrides:
      addCommandLineArguments in class Command
      Parameters:
      args - The current set of arguments.
      Throws:
      AbortException - When something goes wrong.
    • isForceEnglishOutput

      public boolean isForceEnglishOutput()
      Determines whether the command output should be forced to be in English.
      Returns:
      true when the command output should be forced to be in English; false otherwise.
    • setForceEnglishOutput

      @DataBoundSetter public void setForceEnglishOutput(boolean forceEnglishOutput)
      Determines whether the command output should be forced to be in English.
      Parameters:
      forceEnglishOutput - true to force the command output to be in English; false otherwise.