Allow CFML code to require Lucee extensions on the fly

Description

This ticket goes along with https://luceeserver.atlassian.net/browse/LDEV-1583

With the idea of having a version of Lucee with no extensions installed, we need to account for the possibility of ad-hoc code being run that requires an extension. This code might be loaded in from a 3rd party module, or run ad hoc after the server has started. An example of this would be CommandBox task runners. The idea that someone can take an build script written in CFML and run it on the base CLI, but the script may require a MySQL JDBC driver installed because it accesses DB. It would be nice to have some method at the top of that code to declare or require extensions that needed to be present, and have them installed on the fly if they were not present.

Adding JVM args would not be a solution in this case since it may be a run time requirement and we're in a CLI context and not a server context. The ability to require an extension would need to be self contained inside the CFM file and handled on-the-fly so the extension was immediately available.

The user would need to be able to specify:

  • The UUID of the extension (we need to have some human readable names for these!)

  • The version of the extension (optional, defaulting to latest)

  • The update provider to get the extension from, in case it's not in the default Lucee provider

It’s currently possible to check if an extension is installed using https://docs.lucee.org/reference/functions/extensionexists.html

Activity

Show:

Zac Spitzer 2 March 2022 at 19:06

let’s just follow industry best practise and add support for php.ini ? 🤪

Brad Wood 2 March 2022 at 17:18

you can configure Lucee to install extensions using a env var / property

Not if Lucee’s already running, you can’t That may be a general work around for some users in some situations, but not for the specific situation this ticket is about.

Zac Spitzer 2 March 2022 at 17:12

in the mean time, you can configure Lucee to install extensions using a env var / property

https://docs.lucee.org/guides/Various/system-properties.html#lucee_extensionsluceeextensions

Patrick Roy 2 March 2022 at 15:42

This would be very useful, since I just ran into issues regarding the need to load special extensions from a task-runner script. Much thanks for your efforts with this!

Travis Peters 20 June 2019 at 19:57

It would be great to see some effort put into this - very important as new technologies are adopted that are outside of the standard Lucee Extensions.

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Priority

Created 14 November 2017 at 18:36
Updated 2 March 2022 at 19:06