JOSM plugin Development question

Hey,

Is there a new mailing list or forum for JOSM?
This one is closed https://lists.openstreetmap.org/listinfo/josm-dev

Are there people here who have experience developing plugins for JOSM?

When I look at the JOSM site, I think it is possible to create a plugin yourself, see the following link https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins

Where can you see example code of plugin to get inspiration?

Thx

1 Like

Hi,

This is explained in the DevelopersGuide you linked. You can find the source code of the plugins here: osmsvn - Revision 36353: /applications/editors/josm/plugins

Some of the latest maintainers are around: @vorpalblade @stoecker @Klumbumbus @GerdP

1 Like

The only I am aware of is on Discord: OpenStreetMap World

There is an IRC/Matrix room https://matrix.to/#/#_oftc_#josm:matrix.org (see also IRC - OpenStreetMap Wiki).

Step 1: Decide how you are going to build it. I would not recommend gradle. ant and maven will both work, and I’ve got examples for both. If you go the ant route, you’ll need a specific folder hierarchy (unless you want to do a lot of work). If you go the maven route, JOSM releases and plugins can be found on Nexus Repository Manager .

The JOSM mapwithai plugin has a standalone pom.xml file that you can use as an example. I would recommend ignoring all the stuff to manually set directories though – that was done for compatibility the the ant build system.

Of specific note, the JOSM main jar and any plugins should be marked as provided in maven, not compile. This will keep default settings for fat jar creation from adding those dependencies to your jar file.

Step 2: Write the plugin entry point. See MapWithAIPlugin.java for an example. Of specific note, you just need a constructor method that takes a PluginInformation object, but I would strongly recommend extending Plugin instead.

Step 3: Figure out what your plugin will do. This is where things get complicated.

3 Likes

Thx for the info will look into it.