1 | README
|
---|
2 | ======
|
---|
3 |
|
---|
4 | This is a template project structure for a JOSM plugin.
|
---|
5 |
|
---|
6 | Layout
|
---|
7 | ======
|
---|
8 | +--- src source of your plugin
|
---|
9 | |- images images your plugin needs
|
---|
10 | |- resources resources your plugin needs
|
---|
11 |
|
---|
12 | README README for your plugin
|
---|
13 |
|
---|
14 | GPL-v2.0.txt GPL version 2 license text
|
---|
15 | GPL-v3.0.txt GPL version 3 license text
|
---|
16 |
|
---|
17 | README.template this file
|
---|
18 |
|
---|
19 |
|
---|
20 | Build
|
---|
21 | =====
|
---|
22 | A JOSM plugin is built as a single jar. We use ant to build.
|
---|
23 |
|
---|
24 | See build.xml in this directory and update the plugin specific properties in the
|
---|
25 | configuration section.
|
---|
26 |
|
---|
27 | To get an command overview run
|
---|
28 | > ant help
|
---|
29 |
|
---|
30 | To build the plugin run
|
---|
31 | > ant dist
|
---|
32 |
|
---|
33 | To install the generated plugin locally (in you default plugin directory) run
|
---|
34 | > ant install
|
---|
35 |
|
---|
36 | The generated plugin jar is not automatically available in JOSMs plugin configuration
|
---|
37 | dialog. You have to check it in first.
|
---|
38 |
|
---|
39 | Use the ant target 'publish' to check in the plugin and make it available to other
|
---|
40 | JOSM users:
|
---|
41 | set the properties commit.message and plugin.main.version
|
---|
42 | and run
|
---|
43 | > ant publish
|
---|
44 |
|
---|
45 | Maintaining versions
|
---|
46 | ====================
|
---|
47 | There are two versions maintained with each plugin:
|
---|
48 | 1) the main version
|
---|
49 | This is the lowest JOSM version required by this plugin.
|
---|
50 | You have to manually set the plugins main version in the build script.
|
---|
51 | Set the property plugin.main.version in build.xml accordingly.
|
---|
52 |
|
---|
53 | 2) the build version
|
---|
54 | The build version is unique for every build of the plugin. It is equal
|
---|
55 | to the SVN revision of your plugin directory.
|
---|
56 |
|
---|
57 | Both the main version and the build version are included in properties of the plugins
|
---|
58 | manifest:
|
---|
59 | Plugin-Version the build version
|
---|
60 | Plugin-Mainversion the main version
|
---|
61 |
|
---|
62 | JOSM automatically detects whether a plugin needs to be upgraded. It compares the build
|
---|
63 | version of the currently installed plugin jar with the build version of the plugin jar in
|
---|
64 | the SVN. The main version is irrelevant for this process.
|
---|
65 |
|
---|
66 | Making your plugin available to JOSM users
|
---|
67 | ===========================================
|
---|
68 | When a plugin jar is checked into SVN a script updates the plugins list on the JOSM wiki:
|
---|
69 | http://josm.openstreetmap.de/wiki/Plugins
|
---|
70 | JOSM retrieves the list of available plugins and their build versions from this list.
|
---|
71 |
|
---|
72 | commit publish read
|
---|
73 | meta data meta data
|
---|
74 | Build ==> SVN =======> JOSM Wiki <======= JOSM
|
---|
75 | ^
|
---|
76 | ==================================
|
---|
77 | fetch current plugin jar
|
---|
78 |
|
---|
79 | Note that you have to manually publish (commit) your plugin jar. There is no nightly build
|
---|
80 | in place. Everything else (pulishing meta data, updating plugins in the client) is then handled
|
---|
81 | by automatic processes.
|
---|
82 |
|
---|
83 | See also
|
---|
84 | ========
|
---|
85 | * Developing Plugins
|
---|
86 | http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
|
---|
87 |
|
---|
88 | * List of JOSM Plugins
|
---|
89 | http://josm.openstreetmap.de/wiki/Plugins
|
---|
90 |
|
---|
91 |
|
---|
92 |
|
---|
93 |
|
---|
94 |
|
---|
95 |
|
---|