[josm-dev] compile plugin

Henrik Niehaus henrik.niehaus at gmx.de
Sat Jan 10 13:21:45 GMT 2009


Jorge Luis Chamorro schrieb:
> 1 - sorry for my newbie question
> 2 - sorry for my English , I speak Spanish
> 
> I live in a country (Argentina) with many cities with very regular
> design mostly of them not in openstreet (no mapping at all) . And we
> have a lot of work to do. 
> 
> I learn Java and inspect JOSM sources . Then I wrote a code
> createGrid.java , put in actions directory and make an entry in menu .
> It work sucesfully  and its very usefull for our mapping proyect . This
> code create a grid of many streets from only two . 
> 
> I need to transform it into a plugin but I don't known how to compile a
> plugin . I read http://josm.openstreetmap.de/wiki/DevelopingPlugins and
> follow  their instructions but i'm a newbie , I dont work with ANT.
> I get the complete osm - trunk  with 
> svn co http://svn.openstreetmap.org osm 
> then I try
> cd osm/applications/editors/josm/plugins/
> I Try with 
> cd waypoints
> for example and put
> export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.16 ; ant
> 
> then I obtain a lot of errors like : 
> 
> [javac] /home/chamorro/josm-plugin-develop/osm/applications/editors/josm/plugins/waypoints/src/WaypointOpenAction.java:21: package org.openstreetmap.josm.gui.layer does not exist
>     [javac] import org.openstreetmap.josm.gui.layer.OsmDataLayer;
> 
> I don't have a clue for what can I do next ....
> 
> How can I tell to ant where I put the sources of JOSM ?.
> 
> Can any of you tell me how can I compile a plugin for a dumb like me ?
> 
> Saludos , Jorge

Hi Jorge,

I have a made two screencasts of how to set up eclipse to compile josm
and a josm plugin for another user some time ago. Maybe it's useful for
you, too. In the video the openstreetbugs plugin is used, but you could
use this as a starting point and change the whole plugin code to fit
your needs.

http://hampelratte.org/zeugs/checkout_josm.avi
http://hampelratte.org/zeugs/checkout_openstreetbugs.avi





More information about the josm-dev mailing list