New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automatic java lib mappings #731
Comments
Not familiar with this, can you give me a real world example? |
i.e, lets say you wanted to make a bCrypt plugin. The easiest way is via
in Chuck your So what I'm saying is it would be great if |
The more I think about this the more I like it: it means you could very easily add plugins which just expose java libs and add a few convenience functions. Bycrypt, iCal4J, MarkdownJ would be some easy wins for new plugins (I've actually already written these too). I'll implement unless there are any strong objections. |
I thought you could use a path on CreateObject() but I've just checked and it's a Lucee only feature, so I agree this would be useful. I got this to work but recursing over plugin directories and adding them all to JavaSettings.LoadPaths. Then all a plugin author has to do is place the java file directly in a plugin directory or subdirectory. |
Cool, that was pretty much my thinking. Have you done this got the code already? If so that would be fab, otherwise I'm happy to do it |
No problem
It needs to go in /wheels/events/onapplicationstart.cfm somewhere so as not to override any paths the user may have set themselves |
hmm. I can get the folder path into the loadpaths array, but for the life of my can't work out why the .class etc files refuse to load. @andybellenie you're using this in lucee 4.5.x? |
Lucee 4.5.3.020 |
Not 100% convinced by the implementation here; it would mean the developer has to use `arrayAppend()` when adding their own javaSettings.LoadPaths, as the danger is they override what we've set unintentionally.
Added in 3c4a231 |
Would make plugins more powerful if there was a way to have
/plugins/pluginName/lib/
automatically added to the this.javamappings: that way you could easily deploy javalib based plugins without additional configuration.yay? nay?
The text was updated successfully, but these errors were encountered: