Lucee 5 Extension creation

已查看 166 次
跳至第一个未读帖子

ADK

未读,
2016年2月27日 20:51:532016/2/27
收件人 Lucee
I am trying to update a 4.x extension to work in Lucee 5. The good news is that if I manually move the requisite files into the correct folders, everything works as it's supposed to in Lucee 5.x... well, so far anyways.

I am having trouble getting the auto-deploy, convention-based method to work. The documentation is virtually non-existent other than a blurb Micha wrote here:

http://docs.lucee.org/guides/lucee-5/extensions.html

this snippet is about the only clue as to what to do:
"/applications - for cfm & cfc files that need to be installed in the webroot /functions - for build-in functions to install /jars - for libraries used by your extension"

So from here I gather that a "functions" (plural) folder in a .lex will map to the "function" (singular) folder in the web context. Likewise for tags to the tags folder. And indeed that does seem to work. However the rest is a mystery.

I gather from the snippet above - and from the samples Micha has done himself (e.g. MySQL, PDF, etc.) that any jars that I want to include go into a "jars" folder. In 4.x these jars would get moved into the "lib" folder in the web context... I don't "see" that happening in 5.x but perhaps they are being loaded nonetheless? I'll need to check that...

The ones I am having trouble with are the files that need to go into folders pther than function or tag, the components.org folder (I am dealing with a web context, not the server context here, by the way). What is the convention in the .lex file for that? I've trial and errored (with emphasis on the "error" part!) several things but cannot seem to get it to work?

Anyways, would love to get this to work automatically so I could move the cfspreadsheet extension that I mover from Railo to Lucee 4 to now go from 4.x to 5.x - as I said, the good news is that it does seem to work in 5.x when manually copied over, just can't get the new "easier and simplified" install process to work.

Cheers,
Andrew

Jesse Shaffer

未读,
2016年2月28日 11:30:012016/2/28
收件人 Lucee
I believe those should go into context/components/org (for web extensions).

ADK

未读,
2016年2月28日 12:01:092016/2/28
收件人 Lucee
Thanks Jesse. However, I have tried that too. In that scenario, the files are copied to:
C:\lucee-express-5.0.0.178-BETA\webapps\ROOT\WEB-INF\lucee\context\components\org\...

We need them in:
C:\lucee-express-5.0.0.178-BETA\webapps\ROOT\WEB-INF\lucee\components\org\...

I'll keep trying different scenarios but it would be nice to have some sort of guide for people who want to create extensions for Lucee.
Andrew

Sean Daniels

未读,
2016年2月29日 10:38:092016/2/29
收件人 lu...@googlegroups.com
I wonder if the jars need to also be referenced in the MANIFEST.MF file. I noticed this in the MongoDB extension I'm working on. The MANIFEST.MF has the Require-Bundle property. Something to try maybe.

Manifest-Version: 1.0
Export-Package: org.lucee.mongodb
Bundle-ManifestVersion: 2
Require-Bundle: org.mongodb.mongo-java-driver;bundle-version=3.2.2
> --
> Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
> ---
> 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/c0e6266a-2039-4ae8-a54a-25ae2cf1660a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jesse Shaffer

未读,
2016年2月29日 12:20:022016/2/29
收件人 Lucee
I wonder if the jars need to also be referenced in the MANIFEST.MF file. I noticed this in the MongoDB extension I'm working on. The MANIFEST.MF has the Require-Bundle property. Something to try maybe.

I don't believe so... just put any needed jars in the "jars" sub directory.  If they are bundles they will be installed, if they are not OSGi bundles, I don't know if they are automatically converted to be bundles or if they are just put in the lib directory.  Micha would have to answer that part.

One thing you might do is create a component mapping to a folder with your org/whatever code (omit the components directory), then create a LAR from that mapping.  Then put that lar into the /archives subdirectory of the extension, and it will automatically install.

As a side note, I'm working on a Maven plugin to build Lucee 5 archives/extensions.  It is mostly working, still needs some improvement and cleanup, and it's not documented...yet (this is my first crack at writing a maven plugin, so go easy on me if you see glaring problems).  https://github.com/dajester2013/lucee-maven-plugin/ (switch to the develop branch for the lucee extension portion).

ADK

未读,
2016年3月1日 19:45:592016/3/1
收件人 Lucee
Thank you both. I believe Jesse is correct on the jars directory. It is mainly the "components" directory (with sub dir "org", etc.) that I am having an issue with. It would be nice if someone from LAS could weigh in on the proper way to do this. Perhaps there isn't one at the moment?

I will give Jesse's suggestion a try, I am just a bit reluctant to spin my wheels, hacking my way toward a workable solution if there's a better defined, best practice way of creating extensions.

Cheers for the help guys!

Paul Klinkenberg

未读,
2016年3月2日 02:48:542016/3/2
收件人 lu...@googlegroups.com
Hi,

For my extensions, I am using ant build code created by Micha, which creates both the classic and modern extension.

The build-modern.xml file shows you the structure of the modern .lex extensions.

Kind regards,

Paul Klinkenberg

------------


--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
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.

Mark Drew

未读,
2016年3月2日 04:12:232016/3/2
收件人 lu...@googlegroups.com
I think back porting the ant script into documentation might help. 

Mark Drew
- Sent by typing with my thumbs. 

Gert Franz

未读,
2016年3月2日 10:22:342016/3/2
收件人 lu...@googlegroups.com

Just a FYI. Your modern extension is empty L when I build it with ant. It builds it but it only contains the manifest file and the logo…

 

Sincerely
Gert Franz

 

RASIA GmbH

Spittelgasse 7

5103 Moeriken-Wildegg

Switzerland

Email: ge...@rasia.ch
Skype: gert.franz

Phone Switzerland: +41 76 5680 231

image001.png

Paul Klinkenberg

未读,
2016年3月2日 10:55:262016/3/2
收件人 lu...@googlegroups.com
Well, now that sucks :-/ Thanks for the info, will check it.

Paul

Op 2 mrt. 2016, om 16:22 heeft Gert Franz <ge...@rasia.ch> het volgende geschreven:

Just a FYI. Your modern extension is empty L when I build it with ant. It builds it but it only contains the manifest file and the logo…
 
Sincerely
Gert Franz 
<image001.png>

Paul Klinkenberg

未读,
2016年3月2日 14:39:142016/3/2
收件人 lu...@googlegroups.com
I fixed this bug now, again thanks for letting me know!

Kind regards,

Paul Klinkenberg


回复全部
回复作者
转发
0 个新帖子