Changes between Version 103 and Version 104 of DevelopersGuide/DevelopingPlugins
- Timestamp:
- 2021-08-19T16:04:36+02:00 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/DevelopingPlugins
v103 v104 6 6 Any Questions left? Ask at the [https://lists.openstreetmap.org/listinfo/josm-dev developers mailinglist]. 7 7 8 The following instructions show the most widely used setup for Plugins (Ant build, versioned in [ osm:source:/applications/editors/josm/plugins/ SVN]). An alternative option is using Gradle, see [https://gitlab.com/floscher/gradle-josm-plugin#getting-started the code repository of gradle-josm-plugin] for documentation about that option and a [https://gitlab.com/floscher/gradle-josm-plugin/tree/demo demo project].8 The following instructions show the most widely used setup for Plugins (Ant build, versioned in [source:osm/applications/editors/josm/plugins/ SVN]). An alternative option is using Gradle, see [https://gitlab.com/floscher/gradle-josm-plugin#getting-started the code repository of gradle-josm-plugin] for documentation about that option and a [https://gitlab.com/floscher/gradle-josm-plugin/tree/demo demo project]. 9 9 You can choose either method to build, depending on what you prefer, even setting up both build systems on one project is possible. However if you want to put your plugin into the SVN repo for JOSM plugins, it's generally preferred to use the Ant build described below. 10 10 … … 16 16 }}} 17 17 * If the old URL https://svn.openstreetmap.org/applications/editors/josm is used, then go to the working copy and call {{{svn relocate}}} with the new URL. 18 * Create a new plugin directory {{{josm/plugins/yourpluginname}}}. You may create a copy of the template directory [ osm:source:/applications/editors/josm/plugins/00_plugin_dir_template/ 00_plugin_dir_template]. It includes a directory layout, a [osm:source:/applications/editors/josm/plugins/00_plugin_dir_template/LICENSE license file] and a template for the [osm:source:/applications/editors/josm/plugins/00_plugin_dir_template/build.xml build.xml].18 * Create a new plugin directory {{{josm/plugins/yourpluginname}}}. You may create a copy of the template directory [source:osm/applications/editors/josm/plugins/00_plugin_dir_template/ 00_plugin_dir_template]. It includes a directory layout, a [source:osm/applications/editors/josm/plugins/00_plugin_dir_template/LICENSE license file] and a template for the [source:osm/applications/editors/josm/plugins/00_plugin_dir_template/build.xml build.xml]. 19 19 * Open the ant script ({{{build.xml}}}) in your plugin directory and configure the properties in the configuration section. The important thing of your build script is, that it places some attributes into the {{{MANIFEST.MF}}} of the jar file. See below. {{{build.xml}}} in the template directory takes care of this. 20 * [ osm:source:/applications/editors/josm/plugins/00_plugin_dir_template/README.template This readme] explains how your plugin is built and made available to other JOSM users.20 * [source:osm/applications/editors/josm/plugins/00_plugin_dir_template/README.template This readme] explains how your plugin is built and made available to other JOSM users. 21 21 22 22 == Building JOSM core == … … 78 78 79 79 Then add your plugin to the list of tests being run in the common build file: 80 [ osm:source:/applications/editors/josm/plugins/build.xml Plugins build.xml]80 [source:osm/applications/editors/josm/plugins/build.xml Plugins build.xml] 81 81 82 82 It will then be run automatically in the Jenkins build, see: … … 245 245 246 246 == Publishing a plugin == 247 The plugin list a user sees ([/plugin here]) is automatically generated at regular intervals (currently about 10 minutes) from plugin JAR files (**built with Java 8**) that are located in [ osm:source:/applications/editors/josm/dist/ josm/dist] on the OSM.org SVN repository (referred to as "internal" plugins) and from links that are embedded in the [[wiki:Plugins]] page (referred to as "external" plugins). Each method has advantages and disadvantages.247 The plugin list a user sees ([/plugin here]) is automatically generated at regular intervals (currently about 10 minutes) from plugin JAR files (**built with Java 8**) that are located in [source:osm/applications/editors/josm/dist/ josm/dist] on the OSM.org SVN repository (referred to as "internal" plugins) and from links that are embedded in the [[wiki:Plugins]] page (referred to as "external" plugins). Each method has advantages and disadvantages. 248 248 249 249 Advantages of hosting code externally: … … 294 294 Ready. The new plugin version is now available. If necessary, JOSM asks users to upgrade to the new version, when JOSM is started up. 295 295 296 The steps described above can be automated, see [ osm:source:/applications/editors/josm/plugins/tageditor/build.xml build.xml of the tageditor plugin]. It includes an ant target {{{publish}}}.296 The steps described above can be automated, see [source:osm/applications/editors/josm/plugins/tageditor/build.xml build.xml of the tageditor plugin]. It includes an ant target {{{publish}}}. 297 297 298 298 == Legal stuff (Imis opinion) ==