Adobe ColdFusion includes archive and deployment options that let you package applications and create archive files.
Archive and deployment options
ColdFusion includes the following archive and deployment options.
- ColdFusion archive files You can package your ColdFusion application's pages, data sources, and settings in a ColdFusion Archive (CAR) file. For more information, see Packaging applications in CAR files.
- J2EE archives You can package your ColdFusion application as an Enterprise Application Archive (EAR) or Web Application Archive (WAR) file for easy deployment to a J2EE application server. For more information, see Packaging applications in J2EE archive files.
- Cfcompile utility The cfcompile utility lets you precompile the ColdFusion pages of your application, into Java class files. In addition, you can compile ColdFusion pages to bytecode and save this bytecode in files with the CFM, CFC, or CFR extension. For more information, see Using the cfcompile utility.
Packaging applications in CAR files
CAR files let you archive and deploy website configuration information, files, and applications. Use this feature to deploy your website applications to another location or to back up your files quickly and easily. You can manage CAR files using the Packaging & Deployment > ColdFusion Archives area of the ColdFusion Administrator.
You can migrate code from ColdFusion 8 and ColdFusion 9 to ColdFusion 10
Note: CAR file archiving and deployment is different from J2EE archiving and packaging through EAR and WAR files. |
Perform the following steps when you archive and deploy site information:
- Create the archive definition. Identify the type of information to archive about a site. You can archive almost anything about the site, including directories, files, CFX tags, ColdFusion mappings, Solr collections, automated tasks, and server settings. Each archive definition that you create is assigned a name. You use this name each time you build or deploy its content.
- Build the archive.Select the name of the archive definition and specify a location to which you store the CAR file.
Deploy the archive.Specify the location of the CAR file and the location to which you restore the contents.
Note: ColdFusion_ does not deploy Administrator and RDS passwords, nor does it unpack archives created in earlier versions of ColdFusion._ |
For more information on creating, building, and deploying CAR files, see ColdFusion Administrator online Help.
Note:
While packaging your datasource setting in a CAR file keep the following in your mind, if there are data sources with the following drivers:
- MS Access,
- MS Access with Unicode, and
- Derby
or any other data sources referring to a directory path, CAR deployment does not show directory translation for these.
To fix this, do the following:
Go to Administrator and edit the data sources or use AdminAPI to edit those data sources.
OR
Back up the CAR file, un-archive it and then open file server_setting.xml.
In server_setting.xml, change the directory path for the required data sources.
Packaging applications in J2EE archive files
When running ColdFusion in the J2EE configuration, you deploy the ColdFusion application, in enterprise application archive (EAR) or web application archive (WAR) format, on a J2EE application server. You then create your ColdFusion application, configuring resources (such as data sources), and storing CFM, CFC, and CFR files in the web application root or in the web server root. In earlier ColdFusion versions, your J2EE administrator had to redo each of these steps when deploying your ColdFusion application onto a production J2EE server.
The ColdFusion Administrator lets you create an EAR or WAR file that contains the entire application. This archive file contains the ColdFusion web application, settings for ColdFusion (such as data source definitions), and the CFM, CFC, and CFR files that your application uses.
Application packaging
The J2EE Archive feature lets you quickly create an archive file that a J2EE administrator can use to deploy your ColdFusion application.
Add a new archive definition and create an archive file
- Open the ColdFusion Administrator.
- Specify a unique name for the archive file (no extension) in the Archive Name field.
- Click Add. The Add New Archive screen appears.
- Specify archive settings on the Add New Archive screen.
- Click Create. ColdFusion creates an EAR or WAR file in the specified application distribution directory.
The following table describes the settings you make when creating or modifying an archive: