Lucee 5 - Extension via Maven (or similar)

124 views
Skip to first unread message

Chris Blackwell

unread,
Apr 20, 2015, 4:48:53 AM4/20/15
to lu...@googlegroups.com
If functionality like ORM is to be moved from the core to extensions then there needs to be a way to declaratively build a Lucee app, as a WAR for example, and include the extensions that you're cfml code is going to require.

It would be ideal (for me anyway :) to see extensions published to a maven repo, which can simply be added to a pom as a dependency.  

Are there any plans to do something like this?

denstar

unread,
Apr 20, 2015, 5:15:51 AM4/20/15
to lu...@googlegroups.com
On 4/20/15 2:48 AM, Chris Blackwell wrote:
> If functionality like ORM is to be moved from the core to extensions
> then there needs to be a way to declaratively build a Lucee app, as a
> WAR for example, and include the extensions that you're cfml code is
> going to require.

Agreed!

> It would be ideal (for me anyway :) to see extensions published to a
> maven repo, which can simply be added to a pom as a dependency.

It's ideal for me too-- I loves my dependencies. =)

> Are there any plans to do something like this?

I'm happy to say that there are more than just plans. Micha is building
some stuff in, I'm building some stuff out (maven, and a few other repo
formats), and Ortus is working on ForgeBox, which is kind of an NPMish
deal. Color me stoked, and CFML being so hip it will have trouble
seeing over its pelvis.

-Den

Chris Blackwell

unread,
Apr 20, 2015, 5:19:26 AM4/20/15
to lu...@googlegroups.com
Den, are there any plans to get cfmlprojects updated more frequently, its currently @ 4.5.1.008 which is a few updates behind. And what about getting some 5.x snapshot builds ?

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/5534C3C4.5050109%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Michael Offner

unread,
Apr 20, 2015, 5:45:29 AM4/20/15
to lucee
No there are no plans to do this, because this is how it already works ;-)
Not with Maven but with Ant.

Steps to build the hibernate extension
2. got to the directory created and do "ant"

As result of this you get a .lex file (Lucee EXtension) that can be copied to the extension provider or simply copied to <server-context>/deploy and Lucee then installs automatically.

All extension we do have a ant build script that allows to build them without any environment relation necessary.
Some build script even build the classic (for Lucee 4.5) and the modern (for Lucee 5.0) extension like this one

in that case you simply call "ant" to get a new and a old extension and you call for example "ant classic" to only get a old one.

Micha




--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Chris Blackwell

unread,
Apr 20, 2015, 6:50:33 AM4/20/15
to lucee
unfortunately the build for the hibernate extension isn't portable, as it has dependencies on other code you have locally.

BUILD FAILED
/Users/chris/repos/lucee-hibernate-extension/build.xml:78: /Users/mic/Projects/Railo/Source2/railo/railo-java/libs does not exist.

Isn't this what maven solves... ?



Chris Blackwell

unread,
Apr 20, 2015, 6:57:47 AM4/20/15
to lucee
And i'm not sure how that helps me once i have built the extension.  I don't want to copy it to a location in my source code, or have to deploy it seperately

i just want it as a dependency.
something like 

    <dependency>
      <groupId>org.lucee</groupId>
      <artifactId>lucee-core</artifactId>
      <version>4.5.1.008</version>
  </dependency>

    <dependency>
      <groupId>org.lucee</groupId>
      <artifactId>hibernate-orm</artifactId>
      <version>1.0.0</version>
  </dependency>

Can that be done ?


Michael Offner

unread,
Apr 20, 2015, 7:11:18 AM4/20/15
to lucee

Michael Offner

unread,
Apr 20, 2015, 7:20:30 AM4/20/15
to lucee
sorry a push was missing, do a pull and try again ...

Micha

On Mon, Apr 20, 2015 at 12:50 PM, Chris Blackwell <ch...@team193.com> wrote:

Michael Offner

unread,
Apr 20, 2015, 7:22:43 AM4/20/15
to lucee

Chris Blackwell

unread,
Apr 20, 2015, 7:38:37 AM4/20/15
to lu...@googlegroups.com
Well not quite.
https://bitbucket.org/lucee/lucee/wiki/Lucee5_Extensions lists three options for extension installation; Admin & Deploy Folder which require post-startup actions, and a JVM Argument option, which i'm assuming prompts lucee to go to the extension provider and download the required extension, which doesn't work if your lucee server is firewalled.

None of those options allow me to create a war that bundles the extension without including the extension statically in WEB-INF/lucee/deploy

Michael Offner

unread,
Apr 20, 2015, 8:07:52 AM4/20/15
to lucee
Lucee extension are not compatible with war files, this is also something completely different.
maybe an ear file would be more what you are looking for.
Anyway, that is what we support for Lucee 5, of course we are open to discuss other possibilities for the future.

Micha 


Chris Blackwell

unread,
Apr 20, 2015, 8:54:11 AM4/20/15
to lucee

so by moving features out of the core into extensions, WAR packaging essentially gets broken?  I'm sure this wasn't your intention.

I don't think an EAR file helps matters, Lucee should package perfectly well as a WAR, and extensions should be able to be included in that war for automatic deployment.

If .lex files in WEB-INF/lucee/deploy get automatically deployed when the lucee starts, that's half the battle right there.  What about extending that to find any .lex files on the classpath.  That way they could just be dropped in WEB-INF/lib by maven and they'll get found.

The alternative is to use maven-dependency-plugin to copy the .lex files to /WEB-INF/lucee/deploy in the package phase, but that requires a lot more configuration than just declaring the dependency



Michael Offner

unread,
Apr 20, 2015, 10:46:34 AM4/20/15
to lucee
please see between the lines

Micha

On Mon, Apr 20, 2015 at 2:54 PM, Chris Blackwell <ch...@team193.com> wrote:

so by moving features out of the core into extensions, WAR packaging essentially gets broken?  I'm sure this wasn't your intention.

I don't think an EAR file helps matters, Lucee should package perfectly well as a WAR, and extensions should be able to be included in that war for automatic deployment.

as you still can simply add the .lex file to WEB-INF/luceecontext/deploy/ 

If .lex files in WEB-INF/lucee/deploy get automatically deployed when the lucee starts, that's half the battle right there.  What about extending that to find any .lex files on the classpath.  That way they could just be dropped in WEB-INF/lib by maven and they'll get found.

a .lex file is not a jar or a bundle, it is a lucee extension that maybe contain one or more jar files 

The alternative is to use maven-dependency-plugin to copy the .lex files to /WEB-INF/lucee/deploy in the package phase, but that requires a lot more configuration than just declaring the dependency

please raise a ticket to support this, so we can look into it

 

denstar

unread,
Apr 21, 2015, 2:56:42 AM4/21/15
to lu...@googlegroups.com
On 4/20/15 3:19 AM, Chris Blackwell wrote:
> Den, are there any plans to get cfmlprojects updated more frequently,
> its currently @ 4.5.1.008 which is a few updates behind. And what about
> getting some 5.x snapshot builds ?

Yup, aiming for having it updating before the conferences next month.

We need to think about the snapshots-- I've got them squared away in the
build, but it doesn't quite jive with bumping versions for preview/dev,
which are themselves snapshot-ish.

-Den

denstar

unread,
Apr 21, 2015, 3:04:12 AM4/21/15
to lu...@googlegroups.com
On 4/20/15 6:54 AM, Chris Blackwell wrote:
...
> If .lex files in WEB-INF/lucee/deploy get automatically deployed when
> the lucee starts, that's half the battle right there. What about
> extending that to find any .lex files on the classpath. That way they
> could just be dropped in WEB-INF/lib by maven and they'll get found.

Not a bad idea. I think the .lex would prevent unintentional loading.
Some deployers are kind of aggressive about zips though.

> The alternative is to use maven-dependency-plugin to copy the .lex files
> to /WEB-INF/lucee/deploy in the package phase, but that requires a lot
> more configuration than just declaring the dependency

We could have the archtype/parent do it, to mitigate the configuration
aspect -- we've already got a few doing similar stuff -- but that's not
as flexible as the straight dependency.

-Den

Michael Offner

unread,
Apr 21, 2015, 7:29:08 AM4/21/15
to lu...@googlegroups.com
The current implementation is a big improvement about the old extension type
First of all, you can install them without user interaction. On one side this is a limitation on the other side it opens a lot of possibilities.

One idea is also that you can add dependencies in your application.cfc/server.cfc so that Lucee install this dependency if necessary on the fly.
So if you have a orm app you have something like this in your application.cfc.

this.extensions=[{id:"tgj575;fhhb",version:"1.2.3.4"}];

There are a lot of ideas floating around atm, so I would prefer not to rush to fast into it.
This will for sure be a topic we raise on the "Lucee tech board". So best raise a ticket about it with as many details as possible, so it get not forget...

Before I forget, Lucee extension are late binding, so you cannot add them as part of the build process of Lucee, so whatever we do, the extension will always be physically separated.
That is important also for the license, if we had a early binding with the core, the extension get infected with lgpl.

Micha
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Chris Blackwell

unread,
Apr 21, 2015, 8:31:52 AM4/21/15
to lu...@googlegroups.com
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages