Bean dependencies?

Is there a way to add depencies to a bean located in the /beans folder?

I’m thinking of a bean that would need some external jars.
I tried to add a jnlp file into the /beans folder like I would have for a plugin but it doesn’t seem to be used at all.
The jars specified in the jnlp is not downloaded in the client’s java cache, nor is it packed in the work/Catalina/localhost/beans cache folder although I’m pretty sure that I specified the right path for the dependencies.

Does it mean that jnlp files are ignored in the beans folder?

Thanks for your precisions,

OK, I think I’ve just got my answer: by examining the “unsigned.jnlp” (name “LAFS_and_BEANS” which is build by Servoy and contains a ref of all the beans and lafs in the /beans and /lafs folders doesn’t contain any node, thus the client is not loading the jnlp that could be associated to a bean jar file :cry:

That’s a feature request for me: #219604

a jnlp is not loaded from the beans folder. instead the manifest file is used (standard java behaviour).
you can put one in the plugins folder though.

Hum, thanks Marcel for the precision.

I was wondering how one would specify dependency by os/arch for a bean.
For example, having a different version of a jar loaded depending on the OS (win/mac/linux)?

The manifest will not allow that, would it?

Not that I know of but in such case a jnlp in the plugins folder would do the job just fine I guess…

IT2Be:
Not that I know of but in such case a jnlp in the plugins folder would do the job just fine I guess…

OK but will the jnlp be used if there is no corresponding jar in the /plugins folder?
From my experience till now, I gathered that to be used a jnlp must have the same name as a plugin.
For example:

myplugin.jar + myplugin.jar.jnlp
will work, but:

myplugin.jar + mycoolplugin.jnlp
will not.

So in my case, that would mean having a placeholder plugin in the /plugins folder just to make sure that Servoy uses the jnlp with the related name, and of course the bean in the /beans folder. That’s a lot to install, a lot to explain to the users of your bean, and not very natural IMHO.
Unless you use an installer, which is what you do with your plugins and beans, of course.

So, I would think that this simple little feature could help having a coherent installation of plugins and beans.

what you also could do is make a empty plugin implementation that just serves as jars for your bean.

what you also could do is make a empty plugin implementation that just serves as jars for your bean.

That is what I do…

Thanks, that’s what I meant by:

ptalbot:
having a placeholder plugin in the /plugins folder just to make sure that Servoy uses the jnlp

So that’s:

1 jar in the /beans folder

  • 1 empty jar in the plugins folder
  • 1 jnlp in the plugins folder to be able to load the dependencies

That’s fine as a workaround, but I still think that being able to put a jnlp into the /beans folder would be a much more elegant solution.