CommandBox : CLI, Package Manager, REPL & More
5.5.0
5.5.0
  • Introduction
  • About This Book
  • Authors
  • Overview
  • Release History
    • 5.x Versions
      • What's New in 5.4.2
      • What's New in 5.4.1
      • What's New in 5.4.0
      • What's New in 5.3.1
      • What's New in 5.3.0
      • What's New in 5.2.1
      • What's New in 5.2.0
      • What's New in 5.1.1
      • What's New in 5.1.0
      • What's New in 5.0.0
    • 4.x Versions
      • What's new in 4.8.0
      • What's New in 4.7.0
      • What's New in 4.6.0
      • What's New in 4.5.0
      • What's New in 4.4.0
      • What's New in 4.3.0
      • What's New in 4.2.0
      • What's New in 4.1.0
      • What's New in 4.0.0
    • 3.x Versions
      • What's New in 3.9.0
      • What's New in 3.8.0
      • What's New in 3.7.0
      • What's New in 3.6.0
      • What's New in 3.5.0
      • What's New in 3.4.0
      • What's New in 3.3.0
      • What's New in 3.2.0
      • What's New in 3.1.1
      • What's New in 3.0.1
      • What's New in 3.0.0
    • 2.x Versions
      • What's New in 2.2.0
      • What's New in 2.1.1
      • What's New in 2.1.0
      • What's New in 2.0.0
    • 1.x Versions
      • What's in 1.0.0
  • Getting Started Guide
  • Setup
    • Requirements
    • Download
    • Installation
    • Light and Thin Binaries
    • Non-Oracle JREs
    • Upgrading
    • Common Errors
  • Usage
    • Execution
      • Recipes
      • CFML Files
        • Using a DB in CFML scripts
      • OS Binaries
      • CFML Functions
      • Exit Codes
    • Commands
    • Parameters
      • Escaping Special Characters
      • File Paths
      • Globbing Patterns
      • Piping into Commands
      • Expressions
    • Command Help
    • Environment Variables
    • System Settings
    • System Setting Expansion Namespaces
    • Ad-hoc Command Aliases
    • Default Command Parameters
    • REPL
    • Tab Completion
    • Interactive Shell Features
    • forEach Command
    • watch Command
    • jq Command
    • printTable Command
    • sql Command
    • Auto Update Checks
    • Bullet Train Prompt
    • 256 Color Support
    • A Little Fun
  • IDE Integrations
    • Sublime Text
    • Visual Studio Code
  • Config Settings
    • Module Settings
    • Proxy Settings
    • Endpoint Settings
    • Server Settings
    • JSON Settings
    • Misc Settings
    • Task Runner Settings
    • Env Var Overrides
  • Embedded Server
    • Multi-Engine Support
    • ModCFML Support
    • Server Versions
    • Start HTML Server
    • Offline Server Starts
    • Debugging Server Starts
    • Server Processes
    • Manage Servers
    • FusionReactor
    • Server Logs
    • Server Scripts
    • Configuring Your Server
      • Server Profiles
      • Server Rules
        • Baked in Rules
        • Allowed Static Files
        • Rule Language
        • Custom Predicates/Handlers
        • Rule Examples
        • Debugging Server Rules
      • Server Port and Host
      • Proxy IP
      • SSL Certs
      • HTTPS Redirect/HSTS
      • URL Rewrites
      • Aliases
      • Custom Error Pages
      • Welcome Files
      • Basic Authentication
      • Custom Java Version
      • Adding Custom Libs
      • GZip Compression
      • REST Servlet
      • Performance Tuning
      • Undertow Options
      • Custom Tray Menus
      • JVM Args
      • Ad-hoc Env Vars
      • Ad-Hoc Java System Properties
      • server.json Env Var overrides
      • Server Home
      • web.xml Overrides
      • Experimental Features
    • External Web Server
    • Starting as a Service
    • Single Server Mode
    • Server.json
      • Working with server.json
      • Packaging Your Server
      • Using Multiple server.json Files
  • Package Management
    • Installing Packages
      • Installation Path
      • Installation Options
      • Advanced Installation
    • Private Packages
    • System Modules
    • Code Endpoints
      • ForgeBox
      • HTTP(S)
      • File
      • Folder
      • Git
      • Java
      • S3
      • CFLib
      • Jar (via HTTP)
      • Lex (via HTTP or File)
      • Gist
    • Package Scripts
    • Dependencies
    • Semantic Versioning
    • Updating Packages
    • Creating Packages
      • Editing Package Properties
      • Publishing Lucee Extensions to ForgeBox
    • Artifacts
    • Box.json
      • Basic Package Data
      • Extended Package Data
      • Package URLs
      • Installation
      • Embedded Server
      • Dependencies
      • TestBox
    • Managing Version
  • Task Runners
    • Task Anatomy
    • BaseTask Super Class
    • Task Target Dependencies
    • Passing Parameters
    • Using Parameters
    • Task Output
      • Printing tables
    • Lifecycle Events
    • Threading/Async
    • Task Interactivity
    • Shell Integration
    • Downloading Files
    • Running Other Commands
    • Error Handling
    • Hitting Your Database
    • Sending E-mail
    • Interactive Jobs
    • Watchers
    • Property Files
    • Running other Tasks
    • Loading Ad hoc Jars
    • Loading Ad-hoc Modules
    • Cancel Long Tasks
    • Progress Bar
    • Caching Task Runners
  • Helpful Commands
    • Token Replacements
    • Checksums
    • Code Quality Tools
    • ask and confirm
  • Deploying CommandBox
    • Github Actions
    • Docker
    • Heroku
    • Amazon Lightsail
  • TestBox Integration
    • Test Runner
    • Test Watcher
  • Developing For CommandBox
    • Modules
      • Installation and Locations
      • Configuration
        • Public Properties
        • Configure() Method
        • Lifecycle Methods
      • Conventions
      • User Settings
      • Linking Modules
    • Commands
      • Aliases
      • Using Parameters
        • Using File Globs
        • Dynamic Parameters
      • Command Output
      • Tab Completion & Help
      • Interactivity
      • Watchers
      • Shell integration
      • Running Other Commands
      • Error handling
      • Watchers
      • Loading Ad hoc Jars
    • Interceptors
      • Core Interception Points
        • CLI Lifecycle
        • Command Execution Lifecycle
        • Module Lifecycle
        • Server Lifecycle
        • Error Handling
        • Package Lifecycle
      • Custom Interception Points
    • Injection DSL
    • Example Project
    • FusionReactor for the CLI
  • ForgeBox Enterprise
    • Introduction
    • Storage
    • Commands
      • List
      • Register
      • Login
      • Set Default
      • Remove
    • Usage
Powered by GitBook
On this page
  • web.xml Overrides
  • Funky Parameters
  • Library updates
  • Smarter Jar Endpoint
  • ask and confirm commands
  • server prune command
  • Release Notes
  • Bug
  • Improvement
  • New Feature
  • Task

Was this helpful?

Edit on GitHub
Export as PDF
  1. Release History
  2. 5.x Versions

What's New in 5.4.0

PreviousWhat's New in 5.4.1NextWhat's New in 5.3.1

Last updated 3 years ago

Was this helpful?

web.xml Overrides

When you start an Adobe or Lucee CF Engine, the WAR CommandBox uses has a stock web.xml baked into it. Sometimes you may want to add custom servlets, servlet mappings, etc into your server. You can override the stock web.xml in part or in total with a file of your own which you specify in the server.json like so:

{
  "app" : {
    "webXMLOverride" : "path/to/web-override.xml"
  }
}

More info here:

Funky Parameters

In addition to quoting parameter values, parameter names can also be quoted. This is useful when setting keys into settings or JSON files that have spaces, hyphens or special characters. Each of these examples are now supported:

# quoted string
package set foo."bar.baz"=bum

# bracketed string
package set foo[bar.baz]=bum

# quoted, bracketed string
package set foo["bar.baz"]=bum

More info here:

Library updates

Lucee Server has been updated to 5.3.8.201 and JBoss Undertow has been updated to 2.2.10.Final. The Lucee update, as usual, applies to the CLI as well as the default server you get when you run server start.

Smarter Jar Endpoint

When you install a Jar via HTTP URL and the version number is baked into the URL, the jar endpoint now makes more assumptions about what the version of the package is that allows it to optimize the update checks and eliminate unnecessary downloads.

More info here:

ask and confirm commands

Here are some fun commands for user interactivity in the shell. You can use these as part of a recipe or a nice "one-liner".

ask

The ask command is similar to the ask() method in Task Runners. It requires an interactive terminal and will ask the user a question and return their answer. It is meant to be changed with other commands.

set color=`ask "favorite Color? "`
echo "you said ${Setting: color not found}"

or with default values

ask question="Who is cool? " defaultResponse="Balbino!"

or with masked input

ask question="What is your password? " mask=*

Or fun stuff like this

ask "Secret phrase: " | assertEqual "mockingbird" || echo "access denied!" && exit 1

confirm

The confirm command will ask the user a yes/no question and return a passing or failing exit code from the command based on the answer.

confirm "do you want to update your packages? " && update

Remember the && operator will only execute the second command if the first command returns an exit code of 0.

More info here:

server prune command

You can easily forget all servers which have not been started for a certain period of time with the server prune command. It accepts the number of days that need to have passed since a server was last started in order to prune it.

server prune days=30

# Skip the confirmation check
server prune --force

More info here:

Release Notes

Here are the full release notes for CommandBox 5.4.0

Bug

Improvement

New Feature

Task

Cancelling a prompt with active job doesn't clear job logs

Param tab completion is off-by-one when piping

Can't list files in directory with brackets ( [ or ] ) in the name

forgebox timeout is too small when publishing packages

dir command returns no results in drive root

Summary over 200 chars in box.json causes error when publishing

Addition of Apache logging classes breaks 3rd party libs using it

Installing a system module as one-off command doesn't clear wirebox metadata cache

Commenting server rules doesn't work correctly in text files

CommandDSL doesn't handle struct args

create a server prune command

Server start can hang when CF engine blows up

Tab complete doesn't work after a pipe

Working dir of server custom menu items doesn't default properly

Error when setting failing exist code in Task Runner

updating commandbox to 5.3.1 via Homebrew breaks with a java error

Rewrite rule with query string doubles up question mark

printTable column validation breaks with spaces in list

Directory listing not showing folders properly when names are numeric

Certain Java installs fail version check

ask and confirm command to capture user input from shell

Improve version handling in JAR endpoint

Update to Lucee 5.3.8

Support dots in struct keys with set/show/clear commands

printTable custom header names for non-array input

Add printTable check for data with no columns

Sort column names in printTable --debug

Set env vars directly in server.json for local one-off overrides

Support web.xml Overrides

Update to Undertow 2.2.10.Final

https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/web.xml-overrides
https://commandbox.ortusbooks.com/usage/parameters
https://commandbox.ortusbooks.com/package-management/code-endpoints/jar-via-http#semantic-versioning
https://commandbox.ortusbooks.com/helpful-commands/ask-and-confirm
https://commandbox.ortusbooks.com/embedded-server/manage-servers#prune-old-servers
COMMANDBOX-1364
COMMANDBOX-1361
COMMANDBOX-1360
COMMANDBOX-1356
COMMANDBOX-1354
COMMANDBOX-1353
COMMANDBOX-1352
COMMANDBOX-1350
COMMANDBOX-1348
COMMANDBOX-1346
COMMANDBOX-1344
COMMANDBOX-1339
COMMANDBOX-1338
COMMANDBOX-1337
COMMANDBOX-1336
COMMANDBOX-1334
COMMANDBOX-1333
COMMANDBOX-1332
COMMANDBOX-1330
COMMANDBOX-1230
COMMANDBOX-1366
COMMANDBOX-1365
COMMANDBOX-1351
COMMANDBOX-1347
COMMANDBOX-1342
COMMANDBOX-1331
COMMANDBOX-1329
COMMANDBOX-1362
COMMANDBOX-1011
COMMANDBOX-1363