tracker issue : CF-4108132

select a category, or use search below
(searches all categories and all time range)
Title:

Support mappings to archive files, similar to to Lucee Archives (.lar files)

| View in Tracker

Status/Resolution/Reason: Needs Review//

Reporter/Name(from Bugbase): J S / J S (J S)

Created: 01/18/2016

Components: Core Runtime

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win All

Vote Count: 1

Lucee's ability to package CFML source into Lucee Archives (.lar files) has become foundational to our approach for deployments targeting that engine.  It would be a great benefit for our projects that use ACF to have something similar.

Must haves:
* Named mappings can be pointed to an archive file (ex. /mapping -> /path/to/archive.[jar | zip | <clever adobe extension... cfar?>] )
* Archive files can be added to the "Custom Tags Paths"
* These mappings should work whether set in the admin, or from within the application.cfc
* The CFML files within the archives can be either raw source, or encoded using cfcompile

Nice to haves:
* It should be configurable whether the files within these archives are web accessible.
* A utility like cfcompile that would take a directory of source CFML and turn it into a compatible archive file
* Auto deployment of archive files, or support for archives on the class path (etc. WEB-INF/lib)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4108132

External Customer Info:
External Company:  
External Customer Name: J S
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Apparently, the basic support is already there, it just needs to be fixed. I can achieve most of what I want by using the following: <pre> // Application.cfc component { this.customTagsPath = ArrayToList([ "zip://c:/path/to/component/archive.zip" // theoretically, this should be all that is needed, as zip files can be added to mappings. however, there's a bug in the custom tags file registry where the paths do not have a '/' prefixed. ]); function onApplicationStart() { var att = application.getApplicationTagTable(); var tfField = att.getClass().getDeclaredField("tagFiles"); tfField.setAccessible(true); var tagFiles = tfField.get(att); var keys = tagFiles.keySet().toArray(); // for each entry in the tagfiles, make sure an additional key exists that is prefixed with a forward slash. for (var key in keys) { var slashKey = "/" & key; if (!key.startsWith("/") && !tagFiles.containsKey(slashKey)) { tagFiles.put(slashKey, tagFiles.get(key)); } } } } </pre> Now, I can load a "classpath" of coldfusion archives. The only other problem is that ColdFusion opens a file lock on the archive files that I cannot release unless the server is shut down. However, this is an 85% solution.
Comment by J S.
4883 | February 14, 2017 04:33:11 PM GMT