Opened 18 years ago
Closed 18 years ago
#111 closed defect (fixed)
josm shoud support system-wide plugin dir
Reported by: | Owned by: | imi | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | unspecified | Version: | latest |
Keywords: | Cc: |
Description
As far as I can see, josm looks only in ~/.josm/plugins for plugins, there's no way to have systemwide plugins.
I'm preparing a josm-package for gentoo and this would be a requirement. I'd suggest josm should look in some location in /usr/lib, e.g.
/usr/lib/josm/plugins
Attachments (0)
Change History (2)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
fixed. Ressources and plugins are now searched at various locations, including some typical hardcoded paths and reading environment variables.
Also, it is now possible to include plugins directly into the main josm jar file. (JOSM-Bundles? ;)
Extract from the JavaDoc to source:src/org/openstreetmap/josm/plugins/PluginInformation.java
*<li>first look after an MANIFEST.MF in the package org.openstreetmap.josm.plugins.<plugin name> * (After removing all fancy characters from the plugin name). * If found, the plugin is loaded using the bootstrap classloader. *<li>If not found, look for a jar file in the user specific plugin directory * (~/.josm/plugins/<plugin name>.jar) *<li>If not found and the environment variable JOSM_RESSOURCES + "/plugins/" exist, look there. *<li>Try for the java property josm.ressources + "/plugins/" (set via java -Djosm.plugins.path=...) *<li>If the environment variable ALLUSERSPROFILE and APPDATA exist, look in * ALLUSERSPROFILE/<the last stuff from APPDATA>/JOSM/plugins. * (*sic* There is no easy way under Windows to get the All User's application * directory) *<li>Finally, look in some typical unix paths:<ul> * <li>/usr/local/share/josm/plugins/ * <li>/usr/local/lib/josm/plugins/ * <li>/usr/share/josm/plugins/ * <li>/usr/lib/josm/plugins/
there should also be a system wide directory for image files or other resources, all plugins can use.