Development environment for developing the Lucee core/loader

I am curious how people have their development environments setup to contribute to the Lucee core/loader. This question is probably very similar to this one

https://lucee.daemonite.io/t/how-do-you-run-a-local-build/3860

My current process is very inefficient and I am hoping someone with more experience can shed some light on how to speed up development time for me. Basically what I have done is cloned the master branch and imported the two projects “core” and “loader” into eclipse. After editing a file to test my changes I will run “mvn clean install” which takes several minutes (with tests disabled) and eventually spits out a JAR. I then copy this JAR into the “tomcat/lib/ext” directory and restart it. After tomcat starts up I am able to see if my changes were successful or not.

As you can see this process is very slow and probably not the way it is intended to be done. If someone has a tutorial I can follow that would be great. What would be even better is if someone was kind enough to take some time and do a screen cast with me so that I can see their workflow and ask questions.

UPDATE
I found an old link that asks basically the same question as me but it doesn’t seem to have gone anywhere.

https://lucee.daemonite.io/t/getting-started-with-lucee-core-code-development-was-wait-do-we-want-community-involvement-or-not/662

I have found a couple websites that I think might be helpful or are leading me in the right direction. The first one is how to setup a debug environment for extension development. It is kind of dated and assumes you are using Jetty but it got me started.

I got stuck in the above tutorial once it got to the debug configuration setup, since I am using Tomcat. I found another website that was very helpful in helping me get this last step out of the way.

http://www.avajava.com/tutorials/lessons/how-do-i-debug-my-web-project-in-tomcat-from-eclipse.html?page=4

I have Tomcat successfully running inside of eclipse but now I have to work out how to actually start developing the Lucee core and deploying my changes quickly, since I am not doing extension development right now. I am going to keep playing around with this and maybe I will figure it out and report back my findings.

UPDATE
I found this project on Github that seems promising GitHub - dajester2013/lucee-debug: Debugging project for Lucee 5 after following all the steps I get class not found errors, I believe it has something to do with the bundles not being added to the class path. I feel like I am getting close but no cigar yet.

1 Like

I know @isapir is very keen to put out an easily installable development platform potentially based on Lucee Express for the Lucee core and extensions. I’ll let him expand on his thinking when he gets a chance.

From a LAS perspective we are keen to improve tooling around actual Lucee development (ie. in Java) as opposed to development on top of Lucee (ie in CFML). Hopefully we’ll have more news in this area shortly.

I have been riding the struggle bus for a couple days trying to figure out how to setup an environment for core development, anything to make it easier would be awesome. I feel like I am close but just missing one key step to figure all this out.

I finally was able to achieve what I wanted, little did I know it was in front of my face almost this entire time. However I think the struggle gave me a better understanding of what is happening and also helped me learn about cool features eclipse has. I will write up details on what I did when I get time but this project was the magic sauce I needed

1 Like

Yes, my idea is to replace the current “Express” edition with a smaller (~20mb) and easier to set up project, that will also replace the “Debug” project.

So we’ll end up with a download file that will include an embedded Jetty, startup scripts, and a JSON config file which will allow you to define the directory for the web application, host, IP address, etc.

Launch the startup script from the shell/CMD to run, or import into an IDE to debug/develop and contribute to Lucee.

1 Like

@isapir @micstriit Is there any chance one of you might have time to look at this issue on Github? Path issue causing certain admin pages to be broken · Issue #1 · lucee/debug · GitHub

It is a great project that has allowed me to contribute to Lucee until the new “express” version Igal mentioned comes out.

Brandon, Brad is right about the path there, but there is an easier way to debug the Admin. The Admin is simply a mapping in lucee-server.xml.

You can create a new mapping, for example at the URI /lucee/admin-debug, and point it to the local path of the Admin’s source code.

Then instead of going to /lucee/admin/server.cfm you would go to /lucee/admin-debug/server.cfm and see your changes live including debug output and whatever else you enable there.

2 Likes

@isapir thanks for that bit of information I was able to fix the issue I was having. Changing the mapping in lucee-server.xml to

<mapping archive="{lucee-config}/context/lucee-admin.lar" inspect-template="once" physical="C:\Users\MyUsername\Lucee\core\src\main\cfml\context\admin" primary="physical" readonly="true" toplevel="true" virtual="/lucee/admin-debug"/>

Is all I needed to do

2 Likes

anyone feeling like updating the build docs with this useful information?

4 Likes

sir can you please share complete procedure , how to use this project to run lucee in “debug mode”
thanks in advance

What are you wanting to debug?

Thanks for your reply.
sir basically i wants to contribute to lucee.
I have build it by following link Building Lucee 5 & 6 from source :: Lucee Documentation but Now i am looking for " how to edit it in intellij idea and how i can see changes that i have made in code.

Hi, I faced a problem in using GitHub - lucee/debug: This project is used to run Lucee in "debug mode", this means running the core source code directly and not as an OSGi Bundle. This project is only for Lucee 5 and above. when i run all tests from TestBox:
“In the OSGi Bundle with the name [esapi.extension] and the version [2.1.0.17-SNAPSHOT] was no class with name [org.lucee.extension.esapi.functions.EncodeForHTML] found. org.lucee.extension.esapi.functions.EncodeForHTML”
or
“No matching function [ENCODEFORHTML] found”

How can I resolve it?
Or lucee/debug can no longer be used with new versions of Lucee?