Closed fabioformosa closed 3 years ago
I've created a project to study the feasibility of adopting sbp:
https://github.com/fabioformosa/sbp-pluggable-project
I proved the feasibility of pluggability in development mode
(plugin source in the subfolder) but I failed in deployment mode
, to provide a spring executable jar.
The library doesn't support the spring executable jar built by spring boot.
I've opened an issue to maintainer: https://github.com/hank-cp/sbp/issues/10
So why you insist with the spring executable jar? I suppose a normal jar would also be good in this case, since the plugin doesn't need to be run standalone.
I would give the chance to load standard jar and spring boot jar as well.
Spring boot is, by now, standard de facto in development of java project. Spring boot projects have a spring maven plugin that produces 2 jars:
For developers who will develop plugins for quartz-manager
, it would be natural to upload jars built with spring boot builder, because in other case I should give instruction to how-to assembly libs in a standard jar. @hank-cp Do you agree?
I agree, plugin should be restraining. In our production case, I flat all classes in jars and re-pack them into a new jar.
gradle code
task buildPlugin(type: Jar) {
group 'build'
dependsOn build
manifest.attributes(
"Plugin-Id": pluginProp.get("plugin.id"),
"Plugin-Class": pluginProp.get("plugin.class"),
"Plugin-Version": pluginProp.get("plugin.version"),
"Plugin-Provider": pluginProp.get("plugin.provider"),
"Plugin-Dependencies": pluginProp.get("plugin.dependencies"))
from configurations.localLibs.asFileTree.files.collect { zipTree(it) }
with jar
}
from configurations.localLibs.asFileTree.files.collect { zipTree(it) }
do the magic. You could run ./gradlew buildPlugin
of sbp to see the result.
Not familiar with maven, not sure if it could do the same.
Hello Fabio, Good work ongoing! Recently I tried to look at several libraries to provide a UI for Quartz. When I was looking at your project to use in my application, it felt promising but it appeared to be an application itself and not an library.
I totally agree with you @kaushikvijay. I'd like to address 2 needs:
Currently I'm evaluating the feasibility to achieve both. For the first one, I've planned to extract all controllers and services in a core module (without any authentication) to be imported in whatever big project. The concern is related to how to handle custom tables for quartz-manager, how to migrate them, using the datasource of the hosting project. For the second, I'm trying some plugin framework.
Stay tuned... and if you want to contribute, you are welcome!
According my opinion, the first step of growth is to improve the mechanics to customize/submit the job to be scheduled. Currently, a developer must fork the project, add his job and build a deliverable. Too tricky! The idea is to adopt a framework that supports pluggability. Quartz-Manager could be deployed once and the user should upload a jar with his job, likely developed with spring-boot. I'm testing two libraries:
I've developed a PoC: https://github.com/fabioformosa/sbp-pluggable-project I'm stuck plugging a jar in the form of executable spring boot jar. I've reported some feedbacks at this issue: hank-cp/sbp#10