CommandBox : CLI, Package Manager, REPL & More
5.4.0
5.4.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
    • Server Versions
    • Start HTML Server
    • Offline Server Starts
    • Debugging Server Starts
    • Server Processes
    • Manage Servers
    • FusionReactor
    • Server Logs
    • Configuring Your Server
      • Server Profiles
      • Server Rules
        • Baked in Rules
        • Allowed Static Files
        • Rule Language
        • Custom Predicates/Handlers
        • Rule Examples
        • Debugging Server Rules
      • JVM Args
      • Server Port and Host
      • 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
      • Ad-hoc Env Vars
      • 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
  • Upgrade Compatibility
  • What's New?
  • New Libraries
  • New Features/Enhancements
  • Release Notes
  • Sub-task
  • Bug
  • New Feature
  • Task
  • Improvement

Was this helpful?

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

What's New in 5.0.0

PreviousWhat's New in 5.1.0Next4.x Versions

Last updated 4 years ago

Was this helpful?

Upgrade Compatibility

Even though this is a new major version, it should be very backwards compatible. CommandBox proper has no known backwards compatibility issues we're aware of, but note we've bumped libraries like Lucee Server, Undertow, and Java support, so you may notice differences due to these 3rd party lib updates. For example, one in Lucee 5.3 (which now powers your default server) is how page output buffer is handled.

You should be able to simply replace your box.exe binary and run it to get the same in-place upgrade you're used to. If you run into issue, you can try removing the "engine" folder in your ~/.CommandBox folder and try again. If you need to downgrade for any reason, replace the box binary with the old version, remove the "engine", "cfml", and "lib" folders in your CommandBox home and they will get re-created on the next run.

You may also notice the box binary is larger now. From 44 Megs up to 77 Megs. This is a regrettable byproduct of us turning off the Pack200 process we used to run against the Lucee jar. Lucee seems to have some bugs that causes it to re-download a bunch of OSGI bundles when we compress them and we can't figure it out, or get support on the matter, so for now we're just not compressing as much stuff. This was a huge blocker for anyone needing to run CommandBox on a PC with no external internet access as Lucee provides no mechanism to turn off it's auto-download behavior.

And finally, if you have installed any custom OSGI bundles into your CLI, they will be wiped by the upgrade process now. We didn't want to have to to do this, but Lucee has bugs that cause errors when doing in-place upgrades with the old OSGI bundles left in place and we couldn't get it fixed, so this was the only way to ensure in-place upgrades would "just work" without errors. We are leaving the Lucee engine folder, so any settings you may have put into your CLI should remain in place.

What's New?

There's a lot of new stuff in CommandBox 5.0.0. Here's an overview. One of the biggest new "features" is you can finally use CommandBox on Java 11+. This was not possible in CommandBox 4.x due to the version of Lucee not fully supporting newer versions of Java. Now that Lucee has been bumped to 5.3 (see below) you are free to leave java 8 behind for the CLI. Note if you're using CommandBox to start up older versions of Adobe CF or Lucee/Railo, you may still need to use java 8 specifically for your servers.

New Libraries

Let's start with the library updates. For the most part, all the jars we bundle are a "black box" but in reality, every update is usually for new features, fixes, or security patches. Here's an overview of the new libs:

  • WireBox 5.6.2

  • JLine 3.13.0

  • Runwar 4.0.3 (major bump from 3.x)

  • JBoss Undertow 2.0.27.Final (major bump from 1.x)

  • JGit 5.5.1.201910021850-r

  • Lucee 5.3.4.77("major" bump from 5.2)

  • AdoptOpenJDK jdk-11.0.6+10 (In the JRE-included download) (major bump from 8.x)

New Features/Enhancements

You can now use user/pass or personal access token authentication when cloning Git repos over HTTPS. This has been tested with Github and Gitlab and is an alternative to SSH keys. Please check the docs, as Github and Gitlab both expect slightly different inputs.

install git+https://username:password@domain.com/user/repo.git
or
install git+https://AccessTokenHere@github.com/user/repo.git

There is a new Lex installation endpoint to help you acquire Lucee Extensions your app needs via the "install" command or a dependency in your box.json file. If the current directory has a Lucee server in it, CommandBox will install the extension file directly into your server's "deploy" folder (server context)

install lex:https://downloads.ortussolutions.com/ortussolutions/lucee-extensions/ortus-redis-cache/1.4.0/ortus-redis-cache-1.4.0.lex

The auto-install feature into your server will work on any Lex package, even one coming from ForgeBox:

// ForgeBox slug for Ortus Redis Extension
install 5C558CC6-1E67-4776-96A60F9726D580F1

Tuning your server is easier now. You can configure your Undertow worker-threads setting with first-class server.json property

server set web.maxRequests=200

Which gives you this in your server.json

{
  "web" : {
    "maxRequests" : 200
  }
}

We've also unlocked a method for you to set ANY valid Undertow option or XNIO option. So if Undertow supports it, you can configure it!

server set runwar.undertowOptions.ALLOW_UNESCAPED_CHARACTERS_IN_URL=true

server set runwar.XNIOOptions.WORKER_NAME=myWorker

We've added a new experimental feature that lets you create a batch file, powershell script, or bash shell script that directly starts a server with the exact settings that you get from "server start". This is for you to create super-optimzed startups in Docker or Service that bypass the CLI steps and "lock in" the settings. No server.json or CFConfig, or dotenv code will be processed, but you will have a fast streamlined start that is the same every time. Couple this with our new "dryRun" flag on server start that will unpack the CF engine, but not actually start the server, and you can create your customs start script like so:

server start --console --dryRun startScript=bash startScriptFile=startmebaby.sh

// Later directly from bash...

./startmebaby.sh

The Globber helper can now take more than one globbing pattern. This also means every built-in command in CommandBox that takes a globbing pattern, can now take a comma delimited list of patterns. We've also added an exclude list of globbing patterns to the dir command as well.

dir **.cfc,*.cfm
dir paths=modules excludePath=**.md --recurse
dir paths=samples sort="directory asc, name desc"

We've got a couple new handy commands to help you from the command line, "unique" (modeled after the Bash "uniq" command)

cat names.txt | unique
cat names.txt | unique --count

And "sort" (modeled after the Bash "sort" command)

cat names.txt | sort
cat names.txt | sort type=text
cat names.txt | sort type=numeric
cat names.txt | sort direction=desc

The "grep" command has received a "count" parameter if you just want the count of lines that match the regex (or no regex will count all lines)

dir **.cfc | grep --count

dir | grep .*\.md --count

The tray icon for your servers now has a new option under the "Open" menu that will open up the file system folder where the server home lives. This is nice for finding your CF Engine's log files.

Release Notes

There are a lot of bug fixes and even more enhancements I didn't cover above. You can read the full release notes here:

Sub-task

Bug

New Feature

Task

Improvement

[] - Remove extra stashes on url paths when servlet init params starts with WEB-INF

[] - Tray Icon not displaying on Debian8

[] - X Window Errors

[] - "Coldbox create resource" uses wrong paths on Windows

[] - urlrewrite.xml has file size of 0 on docker restart but not regular start

[] - CommandBox instances crashing because of TrayIcon rendering

[] - CommandBox always reads STDIN even when in non-interactive mode

[] - Using zsh exits out of CommandBox when running a binary command

[] - Shebang scripts no longer work without .cfm extension

[] - If custom rewrite file is already in correct destination, runwar overwrites it as 0 bytes

[] - worker-threads setting no longer has any affect

[] - Tray icon not showing in Ubuntu 18.04

[] - Undertow error output when starting server

[] - [RUNWAR] Tray menu placeholders such as ${Setting: runwar.port not found} are not replaced in sub menus

[] - regex string index out of bounds exception

[] - URL Rewrites fire incorrect on URL containing a space

[] - Browser doesn't open when server start

[] - Host updater does not work

[] - Server doesn't stop on Windows

[] - ConcurrentModificationException with undertow?

[] - Restrict /dumprunwarrequest to be used only on Unit Testing

[] - Remove trailing slash from Adobe updates path

[] - Default command parameters don't work on commands in namespaces

[] - Command DSL has unexpected behavior with equals sign in positional tokens

[] - Tab complete for negated flags isn't complete

[] - box fails to open in vSphere Web Client console due to outdated JLine jar

[] - Server start doesn't correctly expand relative Java Home directory

[] - slashes into the servlet init param paths

[] - Tray icon doesn't disappear on Windows when server stops from CLI

[] - Install dependency from box.json with env var placeholder gets overwritten with actual value

[] - coldbox create resource command ignores specsDirectory argument

[] - foreach cannot be interrupted with Ctrl-C

[] - validate non-numeric exit codes from the "exit" command

[] - Task Runner's loadModule() fails on path with period

[] - Tasks don't treat return 1 and setExitCode( 1 ) the same

[] - When a task sets a failing exit code, no output is sent to console

[] - Commands that set a failing exit code don't raise proper exception

[] - foreach, grep, and sed only break on chr(10)

[] - Ability to install/uninstall box server services

[] - Server command to explode server war but not start it

[] - Set any valid XNIO option

[] - Add generic feature to set any valid Undertow option

[] - Allow no rest mappings to be supplied

[] - Tab completion for task targets

[] - New TestBox commands: generate visualizer and generate browser

[] - Update ColdBox module templates for 5.0 standards

[] - Expose Undertow worker-threads setting with first-class server.json property

[] - Support HTTPS username/password auth

[] - Option for server start to write file with full start args for direct Runwar call

[] - Add lex endpoint for installing Lucee extensions

[] - Add unique command to filter out duplicates rows of input

[] - Add sort command to sort rows of input

[] - Make sure the build works

[] - Document Setup in the Repo

[] - Vet all changes on Runwar since April 25, 2018.

[] - Enhance Globber to take more than one pattern

[] - Enhance Globber to have exclude patterns

[] - Update CLI to Lucee 5.3 and test Java 11

[] - Change CommandBox build to pull Ortus build of Runwar

[] - Output Runwar version and jar path in "info" command output

[] - Need Config for Max Thread Request at runwar

[] - Enhance dir command with new Globber features

[] - Optimize installation of packages with createPackageDirectory set to false

[] - Improve performance of print buffer by using String Builder internally

[] - Add --count flag to grep command

[] - Update CommandBox to Runwar 4.0.0

[] - Upgrade to JGit 5.5

[] - Tie into FusionReactor to report transactions for tasks, commands, etc.

[] - Default location to forgeboxStorage for package init command

[] - Improve default package naming of jar endpoint

[] - Add option to tray menu to open server home directory

[] - Update to latest WireBox

[] - Stop outputting extra line break for commands with no output

breaking change
COMMANDBOX-1069
COMMANDBOX-643
COMMANDBOX-711
COMMANDBOX-812
COMMANDBOX-941
COMMANDBOX-946
COMMANDBOX-975
COMMANDBOX-980
COMMANDBOX-992
COMMANDBOX-1005
COMMANDBOX-1008
COMMANDBOX-1009
COMMANDBOX-1013
COMMANDBOX-1014
COMMANDBOX-1022
COMMANDBOX-1035
COMMANDBOX-1036
COMMANDBOX-1037
COMMANDBOX-1038
COMMANDBOX-1043
COMMANDBOX-1048
COMMANDBOX-1050
COMMANDBOX-1054
COMMANDBOX-1061
COMMANDBOX-1062
COMMANDBOX-1063
COMMANDBOX-1068
COMMANDBOX-1070
COMMANDBOX-1071
COMMANDBOX-1076
COMMANDBOX-1077
COMMANDBOX-1079
COMMANDBOX-1081
COMMANDBOX-1089
COMMANDBOX-1090
COMMANDBOX-1091
COMMANDBOX-1092
COMMANDBOX-1098
COMMANDBOX-148
COMMANDBOX-715
COMMANDBOX-1007
COMMANDBOX-1018
COMMANDBOX-1028
COMMANDBOX-1032
COMMANDBOX-1052
COMMANDBOX-1053
COMMANDBOX-1067
COMMANDBOX-1075
COMMANDBOX-1083
COMMANDBOX-1088
COMMANDBOX-1096
COMMANDBOX-1097
COMMANDBOX-964
COMMANDBOX-965
COMMANDBOX-995
COMMANDBOX-885
COMMANDBOX-886
COMMANDBOX-963
COMMANDBOX-1029
COMMANDBOX-1049
COMMANDBOX-1055
COMMANDBOX-1057
COMMANDBOX-1058
COMMANDBOX-1059
COMMANDBOX-1060
COMMANDBOX-1065
COMMANDBOX-1066
COMMANDBOX-1074
COMMANDBOX-1086
COMMANDBOX-1087
COMMANDBOX-1093
COMMANDBOX-1095
COMMANDBOX-1099