Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This has been pretty big for Windows users who access files on their servers over a UNC network path like \\server-name\foo\bar. You can now cd into paths starting with \\, perform file operations like cat against those paths, etc. Note backslashes need escaped in the CommandBox shell.
This was pretty straightforward since Java already supports this, but I had to change a lot of core path handling to make sure the correct slashes were preserved. This needs a fair amount of testing to make sure we nailed it down for good. If your network share requires permissions, you'll need to have saved those in Windows Explorer already or execute a "net use" OS command from the shell.
When running a task from the CLI, the user will be automatically prompted if they don't supply all the required args. This is just like commands work now.
We also fixed several bugs with passing positional parameters and flag to task runners.
This has been a long time coming, but if you want to work on a CommandBox module now, you don't have to keep copying files over to your CommandBox installation just to test. Instead, just run this from the root of your module's repo:
This will symlink (works on Windows and *nix) your module into the core CLI's modules folder and reload the shell so you can immediately start testing. When you're done, just run package unlink. If you'd like to use this same feature, but to link a ColdBox module's repo over to a test application so you can test it without making a copy, you can pass in the path to the remote modules folder you'd like to link to.
This is a little easier than using your OS's native symlink commands and can be used in recipes that will work across operating systems!
The rest of the changes don't really need a dedicated section but they're worth mentioning, so I've put them in this tidy list :) If you'd like the ticket numbers, you can get them out of this full list of tickets in JIRA: https://ortussolutions.atlassian.net/secure/ReleaseNote.jspa?projectId=11000&version=20400
box install returns failing exit code if a package install fails. This helps builds fail correctly if things go wrong
When prompted to type in something like a missing parameter, your answer is no longer added to the command history
The --debug flag works correctly when starting a server from your OS shell like $> box server start --debug
box.json dependencies are stored with forward slashes so Mac and Windows devs stop fighting over which file to commit
config set no longer prints out the value to avoid leaking secrets in build script output.
Updating a package now uninstalls the previous version first to ensure a fresh start since the new version may have removed files.
If you're setting CommandBox behind an AJP proxy, we exposed the flag and ports for that as first class citizens of server.json.
Visual markers for private packages in the forgebox search command.
The package init command creates a valid slug for private packages in the @user/slug format.
Command parameters defaults work on all the aliases for a command now.
New --local flag to server list to show all servers that have been started in the current working directory
If for some reason you want to supply some ad-hoc JVM args to the actual CLI process, you can create a new environment var called BOX_JAVA_PROPS="foo=bar;brad=wood"
You can now touch files in a non-existent directory and it will create the directory instead of erroring.
Viewing a ForgeBox package via package show with a markdown based description, now has basic formatting in the CLI
The default URL rewrite file doesn't try to rewrite requests to /favicon.ico even when it doesn't exist.
Our CF11 servers no longer have secure profile enabled. That was causing issues due to some of the settings like returning 200 on error. If you were making use of that default, please use CFConfig to set what you need.
At John Farrar's request, several URLs in output messages have had space put before and after them so capable shells will auto-link them correctly.
Improved the Java networking error messages on server start if the host name wasn't correct in your host file and you were letting CommandBox pick a random port for you.
Prevented unnecessary saves to box.json when installing to keep file updated dates from being touched.
Added friendly check for Java 9 since it's not supported yet and the error that displayed made zero sense.
Commands like forgebox show and forgebox list now can provide their data in JSON format. ex: forgebox show coldbox --json
Bug
[COMMANDBOX-579] - --debug flag is eaten when running CommandBox from native OS
[COMMANDBOX-640] - Ensure clean install/update of packages
[COMMANDBOX-681] - Touching file in nonexistent directory errors instead of creating directory
[COMMANDBOX-682] - CommandDSL that errors out doesn't reset CWD
[COMMANDBOX-684] - positional task args don't work
[COMMANDBOX-686] - cp command doesn't work for folders
[COMMANDBOX-689] - CommandBox Modules customInterceptionPoints can't accept an array
[COMMANDBOX-690] - CommandBox has no `processState` method on the InterceptorService
[COMMANDBOX-691] - Flags aren't passed correctly to task runners
[COMMANDBOX-701] - CFML functions don't handle incoming JSON with pound signs
New Feature
[COMMANDBOX-653] - Expose Runwar AJP listener settings
[COMMANDBOX-663] - Update server list and server info to be able to show all the servers on a particular directory
[COMMANDBOX-668] - New package link and package unlink commands
[COMMANDBOX-680] - Add ad-hoc JVM props via an environment variable
Improvement
[COMMANDBOX-178] - Don't store text entered to "ask()" command in history
[COMMANDBOX-565] - Handle minor version updating a bit better
[COMMANDBOX-607] - Always store dependency install paths with forward slashes
[COMMANDBOX-609] - Have a setting to not show secrets when printing out the config
[COMMANDBOX-624] - Support UNC file paths on Windows
[COMMANDBOX-639] - JSON format for forgebox endpoints
[COMMANDBOX-659] - Ask user for required params to task runners
[COMMANDBOX-660] - Visually show if a package is private when listing or showing
[COMMANDBOX-661] - make package init create correct slug for private package
[COMMANDBOX-662] - Make default command parms work on aliases
[COMMANDBOX-670] - Box install failures to produce non-zero exit codes so build fails instead of continuing installation.
[COMMANDBOX-683] - Provide ANSI formatting for markdown package descriptions
[COMMANDBOX-685] - box.json template isn't proper JSON
[COMMANDBOX-687] - Remove background color from CommandBox ASCII art
[COMMANDBOX-688] - Default rewrite rules to ignore favicon.ico
[COMMANDBOX-694] - Disable Secure Profile on CFEngine WARs
[COMMANDBOX-696] - Leave space around URLs so some consoles will be clickable
[COMMANDBOX-697] - Improve performance of package install ignores
[COMMANDBOX-700] - Improve error message in ServerService.getRandomPort()
[COMMANDBOX-707] - Prevent unnecessary writes to box.json file when installing dependencies
[COMMANDBOX-708] - Improve formatting when asking for required param that has no hint
[COMMANDBOX-712] - Add Java 9 check to CommandBox until its supported
Properties weren't being read correctly from the server.json
file. If you have been using server.json
, please double check the format of the file here in our docs:
http://commandbox.ortusbooks.com/content/embedded_server/serverjson.html
This fix will make this functionality work as expected:
If you already have 3.0.0 then this fix only affects the CFML bits and is very easy for you to install. Simply run this command:
If you're still on CommandBox 2.x, check out our 3.0.0 release announcement to see the cool new stuff.
[COMMANDBOX-665] - Relative SSL certFile or keyFile path in server.json isn't expanded
[COMMANDBOX-674] - propertyfile set errors if file doesn't exist
[COMMANDBOX-675] - Allow relative property file paths in task runners
[COMMANDBOX-666] - Allow custom tray contributions to have relative image path
[COMMANDBOX-667] - Improve coldbox create app --wizard
[COMMANDBOX-671] - Always run onServerInstall
[COMMANDBOX-672] - add getInstance() to base interceptor class
[COMMANDBOX-673] - Improve handling of loading a bad modules
[COMMANDBOX-678] - Command to normalize line endings for a batch of files
[COMMANDBOX-679] - Improve package parsing regex for private packages
You've been able to run OS binaries from the CommandBox interactive shell for a while now which is great for adding native CLI calls to your recipes.
The biggest problem with this though was that no output shows on the screen until the OS command is completely finished and if your OS command blocks for interactivity or just never ends, the CommandBox shell will just "hang" with no output. All that is a thing of the past now. The standard input and output of the OS process is now bound to the standard input and output of your CommandBox shell. That means that you see output as soon as the binary outputs it and if it stops to ask you for input, you can provide it. This opens up a world of possibilities.
You can ping an address and watch the output stream as the packets return.
You can do a Git commit and interact with the VI window that appears to capture your commit message.
You can actually open a bash/DOS shell right inside of CommandBox and then "exit" back to box when you're done.
Run native commands that collect input from you to continue like a sudo password.
This has been tested and works pretty well on Mac and Windows. Note, we've seen some issues on Linux where output is streamed, but input is not captured.
preServerForget - Always fires before attempting to forget a server whether or not the forgetting is actually successful
postServerForget - Fires after a successful server forget. If the forget fails, this will not fire.
This was supported in CommandBox 3.4.0, but we had a regression in 3.5.0 that caused issues for users who have a space in their path to CommandBox's home dir. This has been fixed along with some related issues with the FusionReactor module. Make sure you have the latest Fusion Reactor module once you upgrade to CommandBox 3.6.0.
The core version of Lucee that the CLI runs on has been updated to 4.5.5.006. Please note this means the default version of Lucee that starts up for your server when you don't specify otherwise will change. If you have settings like datasources and such that you want to keep, make sure you lock in your exact version of Lucee or check into our new CFConfig project for exporting/importing your server settings.
The testbox run command would return an exit code of 0 when your tests had in fact failed. This has been fixed so you can trust a proper exit code from the process when running your tests inside a Jenkins or Travis CI build.
Previously, you couldn't set a global default HTTP port for all your servers. This was on purpose since it didn't really make sense since one one server can use a port at a time. Now, with the introduction of Chris Schmitz's host updater module, you can more easily run each server on a dedicated host name which is added to your host file for you and bound to a unique port. This allows you to run all your local servers on port 80 which is great for cleaning up your local dev. As such, we've added the ability to set the global HTTP port now in your config setting's server defaults.
Here's the full release notes for the 3.6.0 release.
[COMMANDBOX-553] - Windows CommandBox upgrades fail silently if servers are left running
[COMMANDBOX-554] - Box start error
[COMMANDBOX-555] - All semicolons removed in REPL which breaks some code
[COMMANDBOX-558] - Can't start server when space is in user home dir
[COMMANDBOX-559] - server list --verbose produces an error
[COMMANDBOX-567] - package list sometimes shows incorrect version of 1.0.0
[COMMANDBOX-572] - Running server info on non-server folder creates empty server details
[COMMANDBOX-575] - CommandBox fails to start if a 3rd party module fails to load
[COMMANDBOX-582] - NPE on some URLs occasionally
[COMMANDBOX-587] - testbox run doesn't always return correct exit code on failure
[COMMANDBOX-502] - improve execution of OS binaries in "run"
[COMMANDBOX-556] - Add xxxServerForget interceptors to the Server lifecycle
[COMMANDBOX-570] - Improve port binding detection
[COMMANDBOX-571] - Allow port to be defaulted in config settings
[COMMANDBOX-576] - Improve CommandBox module installations
[COMMANDBOX-578] - Bump Lucee version to 4.5.5.006
We upgraded to a new version of the underlying library that handles the CLI interactions which brought a number of nice things.
The cls command now clears background colors that used to be left on the screen
Tab completion works better when two folders with different case were in the same directory
When developing commands, default text can be placed in the buffer when asking the user for input.
Fixed some instances where undesired spaces would get added when hitting tab completion
We also made the following improvements to the CLI shell environment
You don't need to escape an equals sign that's part of a quoted parameter value
Removed extra line break when piping the output of the "run" command
Fixed some regressions when piping text to the box binary
Added better BOM detection when tailing files
cp command will create destination directories
Windows paths that start with \ or / will be treated as absolute (like DOS works)
All OS's will expand ~ to the current user's home directory
The tail command used to only take a file as input, but now you can pipe raw text in as well.
When tailing a file, you can specify the --follow flag and any new text added to the file will live stream to your console until you press Ctrl-C to stop. This is perfect for tailing application logs while your code is running to see new entries.
The server log command also has a new --follow flag added to it which will live stream a running server's console log to the shell until you press Ctrl-C to stop it.
The artifact storage location is now customizable thanks to Chris Schmitz, allowing you to store your artifacts on another drive, or even a network share so your coworkers can all use the same "local" copies.
CommandBox will always re-download snapshot versions of packages to make sure you get a fresh version.
When you try to install a package and CommandBox is offline, instead of giving up, we'll now look in your local artifacts cache for a satisfying version. If we find a package that works in your artifacts, we'll install it instead.
We added a few new ways to start up a server. You can use the --debug flag when starting a server to see additional information and the foreground process also waits for the server to start before finishing. Now when starting in debug mode this output will stream to the console as it becomes available instead of showing up all at the end. This is great to troubleshoot errors that are happening on server start as well as finding the slow parts of the startup sequence.
By default, your servers fire up in a new process that runs independently from the CLI. There is now a new flag called --console that will start the server up in the foreground and stream the console output to the CLI for you to watch. The start command will not end and will keep streaming the console output until you press Ctrl-C to stop it. You can also use --debug alongside the console flag for even more information.
If you have an app that uses a default welcome file other than index.cfm, you can control that now.
This is one that you take for granted if you've always used Adobe ColdFusion, but for any CF server not running on Adobe's custom version of Tomcat, you can't use SES URLs in a subfolder like this without adding custom mappings to your web.xml:
We've added just a dash of servlet fairy dust that now makes this possible. Note, if you want to hide the index.cfm with URL rewrites, you'll need a custom rewrite config for it to work in a subfolder.
All server engines and versions have been standardized to install into the same reliable directory structure to make it easier for you to script config file replacements.
For Adobe CF WARs, the xml config files are located in the WAR here: /WEB-INF/cfusion/lib/neo.*.xml
For the Lucee server context, the xml config file is located in the WAR here: /WEB-INF/lucee-server/context/lucee-server.xml
For the Lucee web context, the xml config file is located in the WAR here: /WEB-INF/lucee-web/lucee-web.xml.cfm
To find the folder where your WEB-INF lives (as well as lots of other information about your server) you can use the server info command to get useful properties about a starting or started server.
Combining these allows you to do some nice one-liners like scripting out the copying of config settings when the server starts up. Hint: Use an onServerInstall or onServerStart package script!
Read more about this here:
https://commandbox.ortusbooks.com/content/v/development/embedded_server/copy-configs.html
Until now you've had to live with the special directory that CommandBox uses to install your servers into. Now you can get full control over where the server goes which is perfect for creating a folder "seeded" with config files that you want the server to use when it first starts. This trick (with some clever Git ignores) will also allow you to commit changes to your config files back to the repo while ignoring the rest of the engine.
Customize Lucee's server context folder with the serverConfigDir setting
Customize Lucee's web context folder with the webConfigDir setting
Customize where the entire WAR explodes to for any server with the serverHomeDirectory setting
This is very powerful since it gives you full control over the server deployment. Server installs have also been changed to NOT overwrite existing files when they unzip, so any config files you place in the server home prior to starting the server will be left in place and used by the server when it starts up. This means you can have datasources, mappings, and more start out-of-the-box for your site on a fresh install.
Read more about this here.
https://commandbox.ortusbooks.com/content/v/development/embedded_server/custom-server-home.html
There were a few small changes in the "undocumented" core of CommandBox that got rearranged to make more sense. There's a small chance you may have been relying on one of them, so take note:
The serverHome property that comes back from server info has been renamed to serverHomeDirectory.
The webConfigDir property used to point to the server home, but this was incorrect. The property will now be blank unless specified. Use serverHomeDirectory instead.
The default Lucee server used to have a non-standard folder structure, but now matches the WAR folders of all other servers
The web context in Lucee servers used to be in a folder named after a random hash which was kind of silly (and impossible to find). It's now always under /WEB-INF/lucee-web
All "internal" Lucee servers used to share a single server context (and settings). All servers are now separate. Use the serverConfigDir setting to point more than one server at a single server context or use one of the new options for copying configs.
The core CLI server context now has a default password of "commandbox" set. This would apply if you wanted to use the tag from .cfm files executed via the shell or a custom command.
Several new properties were added to the server info data for your convenience. Check them out by starting a server and running server info --JSON.
[COMMANDBOX-236] - `box reload` doesn't clear background colors from buffer on Windows
[COMMANDBOX-248] - tab completion doesn't always work on paths
[COMMANDBOX-500] - CommandBox timeout is shorter than runwar timeout when starting Adobe servers
[COMMANDBOX-505] - BOM interferes with commandbox.properties
[COMMANDBOX-507] - Staring server with defautlPort in box.json, adds optional keys back in.
[COMMANDBOX-509] - Ignore equals in a quoted parameter
[COMMANDBOX-522] - Improve error message when endpoint fails installing server
[COMMANDBOX-526] - Use hostname for "coldbox reinit"
[COMMANDBOX-533] - Error starting CommandBox in some instances
[COMMANDBOX-539] - "run" expressions contain line break on Linux
[COMMANDBOX-542] - Regression in piping input from OS console
[COMMANDBOX-543] - Piping a file of commands with a BOM into box fails
[COMMANDBOX-544] - package set doesn't always set what you expect
[COMMANDBOX-545] - The `commandbox-home` when used in symbolic link mode fails on mac
[COMMANDBOX-234] - ability for server start to deploy web-inf locally instead of server location
[COMMANDBOX-473] - Control list of welcome files
[COMMANDBOX-479] - Make artifacts path customizable
[COMMANDBOX-503] - Allow tail command to follow a log file
[COMMANDBOX-504] - Allow raw text to be piped into the tail command
[COMMANDBOX-506] - Add startTimeout parameter to control how long to wait for server to start
[COMMANDBOX-508] - Console flag to server start
[COMMANDBOX-523] - new preServerStart interceptor
[COMMANDBOX-534] - Add --follow flag to "server log" to tail it and follow
[COMMANDBOX-535] - cp command create directories if necessary when copying file
[COMMANDBOX-536] - If Forgebox is down, use artifacts cache on installs
[COMMANDBOX-538] - Allow programmatic access to server info
[COMMANDBOX-546] - Allow custom server home dir
[COMMANDBOX-153] - Support for double wildcard servlet mappings
[COMMANDBOX-222] - Set default password Lucee CLI context
[COMMANDBOX-439] - absolute paths on Windows don't follow the same rules as DOS
[COMMANDBOX-456] - If forgebox is down, 'internal' server won't start
[COMMANDBOX-498] - Upgrade engine to Lucee 4.5.4.017
[COMMANDBOX-499] - improve contentbox-widget package installation conventions
[COMMANDBOX-501] - Stream server start log when debug is true
[COMMANDBOX-510] - Improve JSON parsing when piping complex values to cfml command
[COMMANDBOX-511] - Allow webConfigDir, serverConfigDir & webXML to be relative
[COMMANDBOX-514] - Improve rewrites to not fire on SES URLs in a subdir
[COMMANDBOX-515] - server forget does not stop server if running
[COMMANDBOX-518] - libdirs aren't relative when starting a server
[COMMANDBOX-519] - Libdirs aren't used for non-internal servers.
[COMMANDBOX-520] - Improve output of server info and server list commands
[COMMANDBOX-521] - Stop loading java agent for Lucee 5
[COMMANDBOX-524] - Improve starting internal server when not specifying buildID
[COMMANDBOX-528] - Improve server start intercepors
[COMMANDBOX-529] - Standardize server home directories
[COMMANDBOX-530] - Upgrade to JLine 2.15-snapshot
[COMMANDBOX-531] - Allow default text to be put in buffer for ask() function
[COMMANDBOX-532] - Don't cache snapshots
[COMMANDBOX-537] - Remove .git folder when cloning a Git repo
[COMMANDBOX-540] - Support ~ as a shortcut for the user home directory like bash.
[COMMANDBOX-547] - Improve tab completion for server/package/config set commands
[COMMANDBOX-549] - Spruce up the opening ASCII art
[COMMANDBOX-550] - Pass JVM args through to background server process
[COMMANDBOX-551] - Fix working directory of xxxInstall package scripts
In this section you will find the release notes for the 3.x version of CommandBox.
Version 3.9.0 - Nov 2017
Version 3.8.0 - Aug 2017
Version 3.7.0 - Jul 2017
Version 3.6.0 - Mar 2017
Version 3.5.0 - Jan 2017
Version 3.4.0 - Nov 2016
Version 3.3.0 - Oct 2016
Version 3.2.0 - Jul 2016
Version 3.1.1 - Jul 2016
Version 3.0.1 - Feb 2016
Version 3.0.0 - Feb 2016
One of the biggest pieces of feedback we got from the CommandBox 3.1 release was that it requires an Internet connection to start a server. Since you can specify the version of the server you want to start, including semver ranges like 5.x, this required a trip to ForgeBox to check and see what the best version match was since it might have changed since the last time you started the server.
Now, if you provide an exact CF engine version number (meaning you give us a major, minor, AND patch version) CommandBox will skip phoning home to ForgeBox and will just continue with that version.
Remember that the version "5" de-sugars to "5.x.x" so you need to have all three numbers even if they're "0"
We even went a step further. Sometimes ForgeBox may be down for maintenance or due to an outage and it was preventing people from being able to start their servers. If ForgeBox can't be reached for some reason while starting the server, we'll try again by comparing the version range you provided with the CF Engines already cached in your local artifacts cache. If we can find a version that satisfies what you asked for, we'll use it to start the server. That means you might not be getting the latest version of the engine from ForgeBox, but at least your server will start with that is has downloaded already.
Unpublishing a package should be something you rarely need to do since once a package is published, someone else may be depending it for their app to run. However, we now have an unpublish command you can run from the CLI to remove a specific version of a package, or the entire package itself from ForgeBox.
We've also included the latest versions of Adobe ColdFusion 10, 11, and 2016 on ForgeBox. This is something we can update separately from our CommandBox releases, but they came at the same time so I bundled the announcements together :) Here are the latest Adobe versions available:
Adobe CF 10.0.20+299202
Adobe CF 11.0.09+299201
Adobe CF 2016.0.02+299200
We also fixed a few bugs too. For example, targeting a Git tag stopped working in version 3.1 due to a library update, plus CommandBox's proxy settings weren't being used for all HTTP requests.
Here's the full list of everything in version 3.2.0 of CommandBox. Click on the ticket numbers for more details in JIRA.
[COMMANDBOX-400] - Box install throws exception on git endpoint with commit-ish syntax
[COMMANDBOX-406] - Starting server from diff directory by name uses wrong web root
[COMMANDBOX-407] - semver isExactVersion returns true for 3 and 3.4
[COMMANDBOX-408] - Proxy server not used in ForgeBox calls
[COMMANDBOX-397] - Unpublish command
[COMMANDBOX-402] - Show package URL location after publish, some consoles allow you to click and visit
[COMMANDBOX-403] - Show number of packages in forgebox types
[COMMANDBOX-404] - Add ForgeBox URL to show command as some consoles allow you to visit
[COMMANDBOX-405] - Add ForgeBox URL to search command so consoles can click and open
[COMMANDBOX-409] - Add new patches for Adobe CF 10, 11, and 2016 to forgebox
[COMMANDBOX-391] - Add Offline Ability for cfengine Server Start
[COMMANDBOX-401] - Add box.json data to pre/post publishing interceptors
The embedded CommandBox server have seen a number of nice enhancements to make it easier for you to use CommandBox for super easy local development.
The more people begin to use CommandBox for local development, the more interested they became in being able to run FusionReactor on their dev servers to help trouble shoot their code. That's why we created a CommandBox FusionReactor module. It's not part of the core, but can be installed in a single command and will attach FusionReactor's server monitor to every server you start. You'll need to have a FusionReactor license or sign up for a trial to use it.
CommandBox allows you to create web aliases for the web server that are similar to virtual directories. The alias path is relative to the web root, but can point to any folder on the hard drive. Aliases can be used for static or CFM files. To configure aliases for your server, create an object under web called alises. The keys are the web-accessible virtual paths and the corresponding values are the relative or absolute path to the folder the alias points to.
Here's what your server.json might look like.
Here's how to create aliases from the server set command:
You can customize the error page that CommandBox servers return. You can have a setting for each status code including a default error page to be used if no other setting applies. Create an errorPages object inside the web object in your server.json where each key is the status code integer or the word default and the value is a relative (to the web root) path to be loaded for that status code. This is what you server.json might look like:
You can set error pages via the server set command like this:
You can customize these tray menus and add your own option for your convenience. To add a menu contribution to an individual server, add the following to your server.json
:
We've updated to a new library that creates the tray icon for your running servers and the menu that appears when you right click. In addition to better support for some Linux distros, we've added some nice new icons to the menus.
Before any package script is run, CommandBox will look for another package script with the same name, but prefixed with pre. After any package script is run, CommandBox will look for another package script with the same name, but prefixed with Post. So if you have a package that contains 3 package scripts: foo, preFoo, and postFoo, they will run in this order.
preFoo
foo
postFoo
This works for built-in package script names as well as as doc package scripts. It also works on any level. In the example above, if you created a 4th package script called prePreFoo, it would run prior to preFoo.
If you use more than one ForgeBox login, perhaps a personal one and a company one, it can be a pain to keep logging in. It's also hard to remember the last user you logged in with. We've introduced two new commands to help with this. Run this to tell you who you are logged in as:
Run this to switch between users that you've previously logged in with:
We've added a new "onRelease" interceptor and package script to help with the workflow of publishing packages. Here's a run down of the three key points when bumping a package version.
preVersion - Announced before the new version is set using the bump command
postVersion - Announced after the new version using the bump command but before the Git repo is tagged.
onRelease - Announced after a new version is set using the bump command and after the Git repo is tagged.
Here is a typical package script work flow for working with a package that's hosted on GitHub and published to ForgeBox:
Then when you want to publish a new version of your package, commit your changes to Git and run the following commands:
Those two commands, in combination with your package scripts, would accomplish the following:
Run the package's test suite (a failure will abort the process)
Increase the minor version of the page
Tag the Git repo
Change the package's location property in box.json to point to the new tag
Commit the tag and new box.json
Publish the package to ForgeBox
Push the new box.json and Git tag
Announced while a package is being installed, after the package endpoint and installation directory has been resolved but before the actual installation occurs. This allows you to override things like the installation directory based on package type. Any values updated in the interceptData struct will override what the install command uses.
The Lucee version that the CLI runs on has been updated to be 4.5.3.020 which is also now the default engine to be used when you use the "server start" command and don't specify a cfengine. If you still want to start a web server on Lucee 4.5.2.018, then simply to this:
There are tons of little bug fixes in this version that you can view in our release notes.
[COMMANDBOX-187] - error when updating forgebox when slugname changes
[COMMANDBOX-422] - Empty command CFCs with no functions throw an error starting box
[COMMANDBOX-423] - Error "key [FUNCTIONS] doesn't exist" thrown when trying to start command box
[COMMANDBOX-426] - server name completion errors on server open command
[COMMANDBOX-434] - Document the resolvePath() differing behaviour on OSX vs Windows
[COMMANDBOX-435] - artifacts clean fails on OSX when there's .DS_Store files
[COMMANDBOX-437] - appSkeleton in the coldbox create app wizard needs to comply to IDs instead of local disk
[COMMANDBOX-449] - "server open" always opens localhost
[COMMANDBOX-451] - The trayicon in server.json does not work with relative paths
[COMMANDBOX-464] - update command doesn't respect original install path
[COMMANDBOX-465] - custom url rewrite location doesn't respect starting server by name in different location
[COMMANDBOX-466] - coldbox create crud doesn't work on Windows
[COMMANDBOX-316] - Add Fusion Reactor support for server
[COMMANDBOX-399] - Starting server in web root with WEB-INF treats CWD as war
[COMMANDBOX-416] - Add "open" flag to touch/new command.
[COMMANDBOX-430] - forgebox whoami command to show what user your API key is set to
[COMMANDBOX-431] - Update the storage of the APIkey in the commandbox settings to include multiple keys
[COMMANDBOX-432] - Have a forgebox use {username} command to switch the current api key
[COMMANDBOX-445] - Allow aliases (virtual directory) in web server
[COMMANDBOX-458] - Provide custom 40x and 50x error pages for servers
[COMMANDBOX-398] - Catch error scenario when user tries to start a server with a WEB-INF
[COMMANDBOX-410] - Upgrade to latest Runwar with several bug fixes
[COMMANDBOX-412] - Refactor string similarity to use external library
[COMMANDBOX-413] - Refactor semver CFC to be separate lib
[COMMANDBOX-414] - Refactor path pattern matcher CFC to be separate lib
[COMMANDBOX-419] - coldbox create app command does not list all templates
[COMMANDBOX-420] - Run pre/post package scripts by convention
[COMMANDBOX-421] - Add onRelease interception point/package script
[COMMANDBOX-424] - Serious performance issue with formatting large JSON strings
[COMMANDBOX-425] - Better handle syntax errors in a module's config
[COMMANDBOX-427] - Move onServerStart interception announcement to have server home dir
[COMMANDBOX-428] - Allow tray options to be customized
[COMMANDBOX-433] - Add onInstall interception point
[COMMANDBOX-436] - Incorrect custom model path in the unit test
[COMMANDBOX-440] - Exit REPL multi-line with extra enter stroke
[COMMANDBOX-442] - Don't use in-use port specified in start params or server.json
[COMMANDBOX-443] - Wait for full debug output when starting server with debug=true
[COMMANDBOX-444] - Append JVM args and runwar args to server defaults
[COMMANDBOX-454] - Update to Runwar 3.4.10
[COMMANDBOX-457] - Improve server status detections
[COMMANDBOX-460] - Show tag stack when executing .cfm files
[COMMANDBOX-461] - Improve tab completion of forgebox slugs
[COMMANDBOX-467] - Allow custom images inside tray menu plus disabled items
[COMMANDBOX-468] - Add overwrite confirmations to all coldbox create commands
[COMMANDBOX-469] - Improve version output in "forgebox show" command
[COMMANDBOX-470] - Upgrade engine to Lucee 4.5.3.020
Task Runners - Run ad-hoc builds from the CLI written in CFML
Manage System Packages - update, list, and uninstall system modules
File Globbing - Use place holders like **.cfc for file operations to affect more than one file at a time.
Command Aliases - Alias your favorite commands for easy access in the future
Global Command Parameter Defaults - Set common parameters to have a given value at a global level
System Settings - Utilize environment variables to make your package and servers more dynamic
Testbox Run - Improved, minimalist output to the "testbox run" command
TestBox Watchers - Watch a directory for file changes and run your unit tests
Customize REST Servlets - Customize or disable the REST servlet paths on Lucee and Adobe servers
Custom Java Versions - Start your CF servers with any version of Java you want
Property files - New commands and helper libs for dealing with property files
Basic Authentication - Enable basic security on your servers with unlimited users
Custom URL to Open - Customize the browser URL that opens when you start a server
Disable Tray Icon - Turn off the system tray icon for your servers entirely
Show Proxy IP - Servers pass through the original user IP through proxies
Jar Endpoint - Install 3rd party jars into your projects
Now CommandBox will not only start up Lucee 4 servers with a single command, but you can start up Adobe ColdFusion, Railo, and even Luce 5 servers all at the same time. Now it's easier than ever to test your code across multiple platforms. CommandBox's embedded server makes for a fast and easy development machine too regardless of what CF engine you need.
We'v released a brand new site with a new UI, fresh features, and a shiny new API. CommandBox 3.1.1 is now powered by the new ForgeBox site and API which includes features like having more than one version for a package.
You no longer need to visit the ForgeBox web site to publish new or updated packages to ForgeBox. This is all available from the CLI once you've logged in. This means you can even automate the process of publishing to cut down on the number of manual steps it takes you to update your projects and share those changes with the community.
You can now run commands of your choosing automatically when certain events in the CLI happen (like publishing a package, or starting a server). You can also create ad-hoc collections of commands to run whenever you want to help automate things like building your projects or publishing to ForgeBox.
This release fixes an issue where Adobe CF servers will not start if you're machine is offline and also fixes a bug where the previous version of CommandBox didn't correctly remove old versions of jar files on upgrade.
Git tags when bumping a package command can have a custom prefix now. Tab completion options are also alphabetized. Ctrl-C is also handled better on Unix and actually works in Windows! Also, the timestamp on your sever.json file won't be updated unless the contents of the file actually changed.
Here is the full list of everything that changed in the CommandBox 3.4.0 release.
[] - Adobe Servers won't start offline
[] - start serverConfigFile=myServer.json doesn't load json settings
[] - Adobe web.xml Flex config path is wrong after first engine start
[] - Error checking whether server is running
[] - cflib-coldbox endpoint creates invalid CFML for Adobe
[] - write history before command finishes
[] - Coldbox create interceptor doesn't create test with proper CFC mapping
[] - war path not stored in server.json as relative path
[] - CFML upgrades don't delete removed files
[] - Forgetting a named server deletes the 'default' server.json too
CommandBox now has a JSON file of settings that can be used to configure any kind of behavior we want. We're still working on implementing features that actually use the settings, but the first will be the ability to set up a proxy server for your corporate network. Config settings give us a place to store ad-hoc settings like this as well as an API for retrieving them. What's great is the settings JSON file can store ANY information, including complex structs and arrays so feel free to use it for your own purposes as well. You can interact with config settings like so:
This is perhaps the most radical thing we've done in CommandBox to date and it is huge. We've introduced modules (just like ColdBox) into the actual CLI itself. A module is a unit of code re-use that allows you to take a folder of code that follows a few simple conventions and drop it into a module-aware application for instant extension. This means that we've broken out all the internal commands into system modules for organization. What's more, you can write your own CommandBox modules that hook into the internal workings with interceptors, register their own custom commands, or help manage settings or servers. Modules can be placed on and installed by your friends in seconds to extend the core of CommandBox. The benefits here can't be understated. Check out and go through the quick, easy steps to create your first CommandBox module.
Not only can modules have settings, but you can also override a module's default settings easily with config settings that follow a simple convention. For example, if a module named "foo" has a setting named "bar", you don't need to edit the module's code to change the setting. Simply run this command:
CommandBox interceptors, like modules, work the same way that ColdBox interceptors do. They give you hooks that you can register to listen to events broadcast by the CommandBox core, or custom events of your own design that you announce. These are very powerful for being able to extend and modify how the core CLI works to build upon it. Interceptors are bundled inside modules so they install quickly and easily. Distribute them on as well. I've already created a that uses the onCLIStart interceptor to modify the ASCII art banner that appears when you start CommandBox.
Here's some of the core interception points:
onCLIStart
onCLIExit
preCommand
postCommand
onServerStart
onServerStop
onException
preInstall
postInstall
Now you can write modules that check for upgrades on CommandBox startup, manipulate the output of commands, log exceptions, customize server startup, or audit what package you install the most!
We've had the ability for custom commands for a while, but they were limited and didn't easily allow you to include additional CFC files with your commands. Now with the addition of modules, your custom commands can be package in a module right alongside settings, interceptors, or services. We also simplified the creation of custom commands so things like extending our BaseCommand class is optional thanks to WireBox's virtual inheritance. We hate boilerplate as much as you do!
This feature has been a long-time coming. There are a lot of options you can set when starting a server, and portability has been hard for people wanting to distribute an app that needs to start with custom JVM args, rewrites, or a specific port. Now all server startup options can be set in your web root in a server.json file which will be used automatically the next time you run "start". You interact with these settings the same as package or config settings.
We've had the "run" command for a while now that allows you to run native binaries from the interactive shell, or from a CommandBox recipe. The output is returned which allows you to create mashups that pipe the output of OS commands directly into CommandBox commands. We took this a step further and borrowed from other CLIs out there so now the parser allows you to call native OS binaries by simply prefixing an exclamation mark (!) in front of the binary name. Now only are OS commands run in the current working directory, they are also executed via the shell for that machine which makes non-binaries and aliases like "ll" function.
This is a really neat feature that allows you to actually run CFML functions straight from the CommandBox CLI as commands. Just prefix the function name with a hash sign (#) and then type the function name with no parenthesis. Any parameters to the function can be passed (or piped) into the command like normal named or positional CLI command parameters.
This really gets cool when you start piping the output of commands together to string together mixtures of CommandBox commands and CFML functions for fancy one-liners. Here's some string manipulation. The first one does some list manipulation. The second one outputs the lowercase package name.
But wait, there's more! You can even use struct and array functions. Their output is returned as JSON and automatically deserialized as input to the next command. Keep in mind that piped data gets passed in as the FIRST parameter to the next command. This outputs a nice list of all the top-level dependencies in your package.
Parameter values passed into a CommandBox command don't have to be static. Any part of the parameter which is enclosed in backticks (`) will be evaluated as a CommandBox expression. That means that the enclosed text will be first executed as though it were a separate command and the output will be substituted in its place.
You can really go crazy with these mashups by combining CFML functions too. This example sets a property in a package's box.json that's equal to a nicely formatted date:
We've really focused on doing CommandBox development now with the possibilities opened up with the addition of modules. One pain point of extending CommandBox was calling other commands since parameters needed to be escaped. We created a nice method-chaining DSL to help execute any other command from inside of your custom commands.
You can even nest the DSL to pipe output between commands:
In line with the previous item, we've made it yet easier to write custom modules that extend the functionality of CommandBox by adding new WireBox injection DSLs. Everything inside of CommandBox is created and autowired by WireBox. You can now ask WireBox to inject core services, module settings, or config settings.
[] - Server start tries to open HTTP URL even if it's disabled
[] - testbox run with runner urls that have a query string fail
[] - cf_scripts folder not working on Adobe 2016
[] - Catastrophic runner errors in testbox run don't fail tests
[] - errors if you start second CLI while first one is using the temp dir
[] - TestBox scaffolds are missing super calls for beforeAll/afterAll
[] - Prevent two servers from getting the same name
[] - Basic auth doesn't set cgi.remote_user
[] - unregister method in interceptor service doesn't work
[] - Allow file globbing patterns in file/folder operations
[] - Create BaseTask
[] - Add "task" command to run tasks
[] - Create watchers
[] - Create the --system argument to all package commands for system wide packages
[] - Allow REST servlet to be configured
[] - Allow custom JRE version for server starts
[] - Support Basic Auth
[] - Allow placeholders in for env vars and system props
[] - Provide convenient command to do simple token replacements from the CLI
[] - Checksum Command
[] - Property files commands support
[] - Add MinHeapSize setting
[] - Support for viewing/installing private packages
[] - Finalize box.json testbox runner options
[] - Allow Command DSL to set working directory
[] - Implement "testbox watch" command
[] - Simple Jar endpoint
[] - Ability to disable tray icons
[] - Allow ad-hoc aliases to be created for commands
[] - Allow global defaults to be set for command parameters
[] - Automatic collection from parameter names containing a colon
[] - Implement the equiv of Tomcat's remoteIPValve
[] - Support missing Tuckey config settings
[] - Command to remove trailing whitespace from files
[] - Command to add final EOL to files
[] - Better error message for invalid JSON in a server.json file
[] - Update debian build signing to be higher than SHA-256
[] - If publishing but not logged into forgebox, prompt for login instead of just erroring
[] - Clean up SSL cert and key file parameters for server start
[] - Improve HTML to ANSI conversion on larger strings
[] - Refactor JSON formatter to separate lib for reuse
[] - Add trace flag for starting server
[] - Improve output of "testbox run" command
[] - Remove deprecated and unused properties from box.json with init
[] - Don't try to output binary data in REPL
[] - Show "last started" datetime for servers
[] - Customize URL that opens when starting server
[] - Allow commandbox-modules to register endpoints
[] - Enhance parser to allow quoted spaces in parameter names
[] - WireBox injection DSL allow to drill down into Config Settings
[] - Command to remove trailing spaces from code files
[] - Allow console flag to be stored in server.json like every other setting
[] - Allow publishing of private packages
When you install packages from , you can use fancy semver ranges to specify the versions of a package you're willing to install. CommandBox will automatically grab the latest version that satisfies your version range. This also applies to the "update" command which makes keeping your projects' dependencies up-to-date even easier.
Another feature of the new site is the ability to create a new ForgeBox user right from the CLI. After creation, you'll be logged in with your ForgeBox API Key which let's you update your packages.
We hope you enjoy playing with the new features. As always, jump on our , or the with any questions or feedback. And remember, we provide tools like CommandBox CLI free of charge to the community as . If you have specific needs in the form of features or training for your team, Ortus is here to help you. with any questions.
[] - CFML Function commands do not work on recipes
[] - box update pulling down dev dependencies
[] - Exception in packageservice determining testbox slug runner
[] - Git clone doesn't obey commit hash
[] - tail command doesn't handle CR and LF correclty
[] - Linux: CommandBox 3.1.0-1: Fails to start
[] - Linux distros: /usr/bin/box created with wrong permissions
[] - Progress bar errors if console is too small
[] - Slug auto-complete doesn't work with ForgeBox 2.0
[] - "forgebox search" doesn't work with ForgeBox 2.0
[] - bump command creates invalid version if it starts blank.
[] - CF servers create WEB-INFcfform directory in server root
[] - Start server on any engine
[] - ForgeBox 2 API Integration
[] - forgebox register command
[] - forgebox login command
[] - forgebox publish command
[] - Creation of API Docs for internal CommandBox Core
[] - Update S3 Sync for CommandBox to publish core API Docs
[] - Update the coldbox create command to make the skeleton be a 'name,git+url,http' endpoint
[] - Add command to output system log file
[] - Allow forgebox downloadURL to be any endpoint ID
[] - Allow a package to have listener scripts run by convention
[] - Add pre/postVersion, pre/postPublish interception points
[] - Allow interactive shell (scripts/recipes) to have more than one command per line
[] - bump command tags and commits Git repo if present
[] - Global default for server settings
[] - New Icons for Multi-Engine taskbars
[] - Ability to run ad-hoc scripts
[] - Track installs in ForgeBox 2.0 API
[] - Add onServerInstall interception point for addition engine config
[] - Allow server set/show/clear to target a custom JSON file
[] - Missing 'models' namespace on model test creation
[] - Update Adobe CFEngine wars to have latest updates
[] - Return with exit code 1 when things fail
[] - Add ability to use environment variables to supply java args for BOX itself
[] - install my-module installs unneeded devDependencies
[] - Add ability to specify a server.json by path
[] - Modify build to include sdk format of Unix binary
[] - Improve error message when using "box" from interactive shell
[] - Convert all existing ForgeBox calls to new API format.
[] - Improve messaging and logging when errors connecting to Forgebox
[] - Enhance semver logic for satisfying versions
[] - Allow param completion UDF to see typed text
[] - Capture full java exception stack from Jgit errors
[] - Convert CF Engine downloads to S3/ForgeBox
[] - Fix right click options on server tray icon to be non-Lucee
[] - Allow masking of user input
[] - Auto-correct rewritesEnabled to be rewritesEnable in the start command
[] - Update module scaffolding to create in modules_app folder.
[] - Make help for commands more intuitive
[] - Don't create init methods for models if included in the method list
[] - Switch create controller command to create handler command
[] - allow bump Git tag to have custom prefix
[] - testbox create bdd include describe and it block
[] - Allow server list to filter partial server names
[] - Sort tab completion options
[] - Also negate boolean options with "no" in front
[] - Stop model scaffolding with empty names
[] - Handle Control-C better in the shell
[] - Improve check for previously-installed package
[] - Don't update modified date of server.json unless actually modified.
[] - Starting named server inherits same server.json settings
There are already some cool custom commands popping up on ForgeBox. Check out for making http calls from the command line similar to curl.
[] - Starting a server by short name doesn't work
[] - Tag REPL seems to be unavailable
[] - REPL output cannot be piped
[] - url rewriterules in commandbox incorrect
[] - Brew fomulas SHA1 mismatch
[] - Starting server from OS shell doesn't always work
[] - Restarting server saves openBrowser as false in server.json
[] - Can't clear JSON properties with dash in the name
[] - Coldbox create view commands break if name includes package
[] - CommandBox TestBox array of runners does not run
[] - Provide a more programmatic way to run commands/tasks like a method
[] - Allow native binary execution with exclamation mark
[] - Add server.json to default server settings
[] - Global CommandBox setting file
[] - Disable sendfile in runwar server
[] - Refactor JSON handling out of package commands for reuse
[] - Allow # as a REPL shortcut to run CFML tags or functions
[] - Allow expressions in command parameters
[] - Add option to server start for enabling/disabling directory browsing module
[] - Allow commands to be piped in to box
[] - Override module settings with config settings on module load
[] - WireBox injection DSLs for module config and settings
[] - Handle struct of environment variables in server.json
[] - Add additional helper reference to the Executor
[] - Remove bleeding edge builds from production Debian repo.
[] - Standardize command packaging
[] - HTTP Calls don't work behind company proxy
[] - Use virtual inheritance for commands
[] - Allow ad-hoc JVM args when starting server
[] - Add modularity
[] - Add event-listener model to CommandBox
[] - Improve error handling in CFLib endpoint
[] - Alias Execute as exec
[] - Return better details from progressable downloader
[] - Run command uses same environment as box executable when it was first started
[] - Improve error handling in HTTP endpoint
[] - Update to latest version of WireBox
[] - bump command reset minor and patch
[] - bump runwar version to 3.3.0
[] - Enhance server rewrites for file/dir detection
[] - Refactor core commands to be modules
[] - Move application templates into the coldbox-commands module
[] - Move scaffolding templates into respective modules
[] - Improve error handling in commands
[] - Shortcut to cd into directory after mkdir command
[] - Run command doesn't run in the same CWD as CommandBox
[] - Allow run command to run any OS command from the shell
[] - Allow ConfigService to use nested setting keys
[] - Improve parsing of run and ! command
[] - Allow user to set custom shell with config setting
[] - warn user if package has invalid JSON file
[] - Bump JRE version to 1.8.0_72
[] - Embedded server doesn't sent proper headers for SVGZ files
[] - Support ContentBox installation paths