githubEdit

What's New in 5.4.0

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:

https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/web.xml-overridesarrow-up-right

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:

https://commandbox.ortusbooks.com/usage/parametersarrow-up-right

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:

https://commandbox.ortusbooks.com/package-management/code-endpoints/jar-via-http#semantic-versioningarrow-up-right

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.

or with default values

or with masked input

Or fun stuff like this

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.

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

More info here:

https://commandbox.ortusbooks.com/helpful-commands/ask-and-confirmarrow-up-right

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.

More info here:

https://commandbox.ortusbooks.com/embedded-server/manage-servers#prune-old-serversarrow-up-right

Release Notes

Here are the full release notes for CommandBox 5.4.0

Bug

COMMANDBOX-1364arrow-up-right Cancelling a prompt with active job doesn't clear job logs

COMMANDBOX-1361arrow-up-right Param tab completion is off-by-one when piping

COMMANDBOX-1360arrow-up-right Can't list files in directory with brackets ( [ or ] ) in the name

COMMANDBOX-1356arrow-up-right forgebox timeout is too small when publishing packages

COMMANDBOX-1354arrow-up-right dir command returns no results in drive root

COMMANDBOX-1353arrow-up-right Summary over 200 chars in box.json causes error when publishing

COMMANDBOX-1352arrow-up-right Addition of Apache logging classes breaks 3rd party libs using it

COMMANDBOX-1350arrow-up-right Installing a system module as one-off command doesn't clear wirebox metadata cache

COMMANDBOX-1348arrow-up-right Commenting server rules doesn't work correctly in text files

COMMANDBOX-1346arrow-up-right CommandDSL doesn't handle struct args

COMMANDBOX-1344arrow-up-right create a server prune command

COMMANDBOX-1339arrow-up-right Server start can hang when CF engine blows up

COMMANDBOX-1338arrow-up-right Tab complete doesn't work after a pipe

COMMANDBOX-1337arrow-up-right Working dir of server custom menu items doesn't default properly

COMMANDBOX-1336arrow-up-right Error when setting failing exist code in Task Runner

COMMANDBOX-1334arrow-up-right updating commandbox to 5.3.1 via Homebrew breaks with a java error

COMMANDBOX-1333arrow-up-right Rewrite rule with query string doubles up question mark

COMMANDBOX-1332arrow-up-right printTable column validation breaks with spaces in list

COMMANDBOX-1330arrow-up-right Directory listing not showing folders properly when names are numeric

COMMANDBOX-1230arrow-up-right Certain Java installs fail version check

Improvement

COMMANDBOX-1366arrow-up-right ask and confirm command to capture user input from shell

COMMANDBOX-1365arrow-up-right Improve version handling in JAR endpoint

COMMANDBOX-1351arrow-up-right Update to Lucee 5.3.8

COMMANDBOX-1347arrow-up-right Support dots in struct keys with set/show/clear commands

COMMANDBOX-1342arrow-up-right printTable custom header names for non-array input

COMMANDBOX-1331arrow-up-right Add printTable check for data with no columns

COMMANDBOX-1329arrow-up-right Sort column names in printTable --debug

New Feature

COMMANDBOX-1362arrow-up-right Set env vars directly in server.json for local one-off overrides

COMMANDBOX-1011arrow-up-right Support web.xml Overrides

Task

COMMANDBOX-1363arrow-up-right Update to Undertow 2.2.10.Final

Last updated

Was this helpful?