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

Adobe Employee ,
Dec 21, 2020 Dec 21, 2020

Copy link to clipboard

Copied

MODULARIZATION.png

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.

TOPICS
Getting started

Views

386

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 08, 2021 Apr 08, 2021

Copy link to clipboard

Copied

If you could point me to some documentation that explains package dependencies for certain tags/functions and CF administrator sections, that would be great.  Some dependencies are obvious, but some not so much and I haven't found anything like this.  I believe there should be an additional heading "PACKAGE DEPENDENCY" added to the reference in addition to DESCRIPTION, CATEGORY, SYNTAX (e.g., https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-r-s/cfsearch.html ) that explains any package(s) that need to be installed for that tag to function.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 09, 2021 May 09, 2021

Copy link to clipboard

Copied

Good point, @Hemi345 .

"Install only what you need" assumes you know beforehand which package to install. However, even seasoned ColdFusion professionals may not know offhand which package is required for which tag or function. So, you're right.

 

The times, they are a-changin'. With the arrival of modularisation in ColdFusion 2021, some changes are mandatory. Universally in the ColdFusion space. For example, the documentation on each tag or function has to be revised to include the package(s) required.

 

You should submit a feature-request. Include in it a link to this discussion.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 09, 2021 May 09, 2021

Copy link to clipboard

Copied

Folks, regarding your discussion, it's worth drawing out for consideration something that is NOT drawn out in the article above--though it IS in the table above.

 

Note that there IS in fact a "scan" option for the cfpm tool, which will tell one what packages are needed for a given code base.

 

I'm not at all denying how it could be helpful ALSO for the docs to clarify what package is needed for what tags/functions/script, but it's not quite as urgently a need/bug, given the availability of that scan feature, which may suffice for most such needs. It just wasn't clear from your comments if you were aware, and then if it might suffice for your needs. If you were and it does not, again I understand. 


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 09, 2021 May 09, 2021

Copy link to clipboard

Copied

quote

I'm not at all denying how it could be helpful ALSO for the docs to clarify what package is needed for what tags/functions/script, but it's not quite as urgently a need/bug, given the availability of that scan feature, which may suffice for most such needs. It just wasn't clear from your comments if you were aware, and then if it might suffice for your needs. If you were and it does not, again I understand. 


By @Charlie Arehart

 

I disagree. The documentation to clarify what package is needed for what tag, function or script is an urgent need. It is in fact a must. I would go as far as to argue that such documentation is even more indispensable than the scan tool.

 

Consider a new ColdFusion project. What's the point of a scan tool if you discover afterwards that the packages you had implemented were not optimal? As far as this subject is concerned, scanning already-existing software is shutting the stable door after the horse has bolted. 

 

What @Hemi345 and I suggest is to look to the future. To look to the new ColdFusion projects to come. They will need product documentation. With ColdFusion 2021, Adobe is essentially selling packages. Those are the product.

 

The client has a use-case or project in mind. The documentation is the usage instruction informing the client - beforehand - which package he or she will need. 

 

Afterall the greatest optimizations in any software project are achieved in the design phase. Before a single line of code is written.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

We do disagree.

 

No one needs urgently to know what features require what packages before development begins. The package mgr feature (and the offer of the zip deployment have the core server without any packages, to which one adds them) are NOT the primary way people will install cf. It's an optimization POSSIBILITY. No one MUST use it.

 

To be clear, the normal cf installer installs ALL packages by default (and sure, they could be removed if someone wanted to winnow down the package implementation.)

 

Again, sure, over time it could become more valuable to able to know from the docs what features require what packages. (Then again, the package naming is pretty clear about what major features would go with what packages.) For now, the scan feature should suffice for most situations.

 

But at this point, we're down to our opinions on the matter. The primary point of my first reply was simply to point out the scan feature, in case anyone reading the post here didn't know it existed. 


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

LATEST

The What's new in CF 2021 page states: 

"Note: The GUI installer for the 2021 release is only temporary. We shall have only zip installers soon."

 

Unless the zip installer behavior changes to include all packages by default, I believe it's important to know what tags utilize which packages.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines