Closed dnav closed 7 years ago
Here is the DDF I'm trying to add: (added the .txt extension to be able to include it in the issue)
How do you contribute this file (DDF/json) ? Does it concern leshan-demo (server/client) or the library itself ? If this is about demo since commit e017ef40759342dcbaad5667406fc532db30906d you can use command line option to do that.
Hi, This concern leshan-demo server. Using the command line option worked, thanks.
Previously, I was contributing the DDF or json file by patching the jar file from https://hudson.eclipse.org (jar -uf leshan-server-demo.jar oma-objects-spec.json)
Regards,
So we can close this issue ?
I guess so. There is a workaround.
I find it strange that adding a new ddf file to the models folder inside the leshan-server-demo jarfile has no effect. Is there a list of files to parse somewhere ?
It's not so easy to list files in folder in a generic way (I mean using the same code when code is packaged in jar or not) and we think that making this dynamic is not really useful as a packaged jar should not be modified.
So, files to load are listed in the code. When you are using Leshan as a library, you need to define which models you want (using ObjectLoader). By default only models from lwm2m core spec is loaded. (like this)
In case of Leshan demo, we load all models registered at OMA and so package additional ddf files in the leshan-demo-* jar. (see here and here )
If you want a custom jar of leshan-demo with your own ddf files, the best way seems to me to :
Thank you for the pointers.
Regards,
Hi,
Before #299, I was adding custom Objects definition at runtime by providing a modified oma-objects-spec.json file. Now, this does not seems to work anymore. I provided the DDF file for my custom Object in the models folder but with no success.
What am I doing wrong ?
Regards