ColdFusion Package Manager (CFPM)- Install only what you need

In ColdFusion (2021 release), you can now install only the services your application needs and nothing more. Modularisation lets you continuously integrate small pieces of code and deliver applications quickly and seamlessly.
Modularization reduces the complexity of a system. More formally, we can define modularization as dividing any system into independent functional units to allow replacement and/or removal of these units.
In Adobe ColdFusion (2021 release), you can install ColdFusion features as packages for a specific purpose. For example, you want to execute oracle database operations, you can install the oracle package.
In this blog, I shall write about installing ColdFusion packages via command line:
- Interactively
- Non-interactively
There is also a third way to instal packages, via the ColdFusion Administrator, which I shall discuss in a future blog.
Start CFPM from command line
Using the ColdFusion Package Manager (cfpm), you can install, uninstall, list all the packages that are currently installed and get the list of available ColdFusion packages, and much more.
Navigate to CFHOME/cfusion/bin and enter cfpm.bat
You are now in the cfpm prompt.
List of commands
|
Command |
Description |
|
install PACKAGENAME[:VERSION] |
Installs a new package. If VERSION is not specified, then the latest version of the package will be installed. You can also specify comma-separated packages to install multiple packages. |
|
install ALL |
Installs all the packages available in the repo. |
| update ALL | Updates the server hotfix and all the installed packages to the latest version. |
|
update packages |
Updates all installed packages to the latest versions. |
|
uninstall ALL |
Uninstalls all packages that were installed. |
|
uninstall PACKAGENAME |
Uninstalls a package from the system. You can specify comma-separated packages to uninstall the packages. |
|
list |
Lists all installed packages. |
|
listall |
Lists all available packages in the repo. |
|
info PACKAGENAME |
Prints the package-related information on the console. |
|
help |
Prints the usage of all commands on the console. |
|
scan CODEBASEPATH CFSERVERURL |
Scans code at the given PATH and finds all packages to be installed. |
|
scanandinstall CODEBASEPATH CFSERVERURL |
Scans code at the given PATH and installs all required packages. |
|
downloadrepo DOWNLOAD_PATH |
Clones the repository of the packages to the specified path. |
|
q or quit |
Exits the cfpm console. |
|
cls or clear |
Clears the cfpm console. |
| purgecache |
Purges the Felix cache. Felix stores all installed bundles into a bundle cache directory. By default, Felix creates a cache directory, called felix-cache, in your current working directory. For more information, see Apache Felix framework. Run this command to clear the bundle cache. You must stop ColdFusion server, run purgecache, and then restart ColdFusion. |
| export EXPORT_FILEPATH | Exports all the installed packages to a file. |
| import IMPORT_FILEPATH | Imports all the specified packages in the file into the server. |
For ore information, see Adobe help on ColdFusion Package Manager.
Install a package
Installing a package is easy. Simply enter the name of the package or packages (comma-separated) after install.
cfpm>install azureblob
cfpm>install awss3,awssqs,awssns
Uninstall a package
To uninstall a package, enter the name of the package after uninstall, for example,
cfpm>uninstall awss3
Uninstalling a package does not uninstall its dependent packages. You must uninstall the dependent packages manually.
Non-interactive mode
It is easier to automate the process of package installation or uninstallation using the CFPM non-interactive mode.
Open the command prompt, navigate to the coldFusion/cfusion/bin folder, and enter:
cfpm COMMAND ARGUMENTS
For example: C:\ColdFusion\cfusion\bin>cfpm install <package_name>
Try out CFPM today and see how it greatly reduces all complexities. Give us our feedback and how we can improve CFPM in future iterations.

