| 65 | |
| 66 | |
| 67 | = The MANIFEST.MF = |
| 68 | |
| 69 | You have to put some information into the manifest file of your jar. If you use ant, you can set these values within the build.xml file. |
| 70 | |
| 71 | '''Plugin-Class''':: |
| 72 | Points to the main plugin file ('''required''') |
| 73 | '''Plugin-Description''':: |
| 74 | Gives the description of the plugin visible in the preferences page. For line breaks, you have to use <br>, ''not'' <br/> (blame Swing ;). ('''required''') |
| 75 | '''Plugin-Author''':: |
| 76 | An Email-Adress of the author of this plugin. This is used in the error report window, if an error is detected within the plugin code (there is a strange heuristic to guess whether an exception comes from a plugin). |
| 77 | '''Plugin-Early''':: |
| 78 | Can be set to {{{true}}}, in which case the plugin is loaded as early as possible, more specific before the GUI classes are loaded. This is usefull if your plugin alters the GUI or the JOSM-startup process in any way. |
| 79 | '''Plugin-Stage''':: |
| 80 | An number of the order relative to other plugins, when the plugin is loaded. Smaller numbers gets loaded first, so if you have conflicts with other plugins, you can increase or decrease this number to get some control on the loading order. Defaults to 50. |
| 81 | '''Class-Path''':: |
| 82 | An space-seperated list of additional classpaths your plugin wants to use when looking for ressources and classes. The plugin itself is added automatically. Don't forget to provide the additional jar's as well, if you add dependencies here. |
| 83 | |
| 84 | |
| 85 | = Legal stuff (Imis opinion) = |
| 86 | |
| 87 | Just because I have been asked: JOSM is licensed under GPL and if any code is a "derived work" of JOSM, then it has to be under GPL too. It is my believe, that any JOSM-Plugin is a derived work of JOSM, so GPL is the only possible license for a JOSM-Plugin. If you want to include non-GPL code into a plugin, it has to be seperated from the classes that use JOSM. "Use" as in "import org.openstreetmap.josm...". See the 'Class-Path' - MANIFEST.MF attribute for a way to include other jar files. |