[josm-dev] JOSM plugin development - How to avoid duplicate additional library

Paul Hartmann phaaurlt at gmail.com
Mon Jun 23 08:47:52 UTC 2014


On 23.06.2014 08:25, jBeata wrote:
> I'm referring to the "gson" JSON parsing library, that is used by the mapdust
> plugin. This plugin uses gson version 1.5, the other plugin (not jet public)
> uses gson version 2.2.4.
> I could move to a new plugin the gson parsin library, and then update both
> plugins.                                             Another idea would be
> to use another JSON parsing library, create a plugin for this and use this
> for the other plugin. This solution would not affect the mapdust plugin.

Both is okay, but a shared library is preferred in general.

Anyway, we already have a JSON library in JOSM core [1], so it shouldn't 
be necessary to include another library at all.

Please note that in order to reduce the file size of the binary, JOSM 
drops all class files, that are not referenced from the Main class. This 
means you have to test your plugin also with the official JOSM build. If 
you get missing class exceptions, then we have to manually include those 
classes needed by your plugin.

[1] https://java.net/projects/jsonp/ - Oracle RI for JSR 353: Java API 
for JSON Processing

Best, Paul



More information about the josm-dev mailing list