I'm sure that this is a noob question but how would I go about
running both ColdBox 3.0.0 and 2.6.4 on the same development server
without having to rename folders every time to switch version.
sorry if this has already been posted, but google in this case was not
You can setup per application mappings to either folder.
In your application cfc
<cfset this.mappings["/coldbox"] = "c:\somepath\coldbox2.6.4" >
<cfset this.mappings["/coldbox"] = "c:\somepath\coldbox3.0.0" >
Yeah, that's what I do and it's my preferred approach as I have some
sites using 2.6, 3 M1 and bleeding edge.
You will need to use the "bootstrapper" approach, instead of making
Application.cfc extend coldbox.system.ColdBox as ColdFusion will do
the inheritance bit before it creates the mappings. Sorry to
self-promote but I did blog about this a while back if it helps:
Question regarding this.
I have two apps in the same server which both utilize shared models and services and currently the same version of coldbox. One app will be updated more often than the other, and so we will need to reinit more often. Is it advised to run two instances of coldbox and use app mappings so re-initing one app does not cause any issues to the other app that is refreshed less often? Thanks all.
I like to keep mine separate, has the added advantage that it's in the
repo so anyone can check out/update and get the correct ColdBox build
for the app. This was really useful in the early days of ColdBox 3 as
quite a lot changed. Not such an issue now.
Follow up on this:
John I was able to revise my app to use your approach. Nice work.
Second question. I have other apps on my development machine which need access to coldbox. Can I have a catch-all CB folder in my webroot that these dev apps reference and this won't interfere with the apps which are using app mappings? I think the answer is yes, but just wanted to confirm.
I *think* that ColdFusion will use the per-application mapping first
before it looks on the filesystem or for server wide mappings, but I'd
have to test it to be sure.
Can anyone on the list confirm the order or reference?
if app has app mapping for coldbox, use app mapping, else use cfadmin mapping or folder relative to webroot?
Perhaps it would be easier to test than to ask the list. :o)
Thanks Jason. I'll take that into consideration
At present, both my application and common version of coldbox are the same version, and actually I'm not quite sure how you could actually determine which version of coldbox is proccessing. Hence the reason I asked on the list.
Couldnt it be tested with a static asset?