wiki:Source code

Source code

This page contains information about the source code and compilation steps.

Knowledge of Java is not necessary, some portions of the code are explained in comments. You can inspect single files over the web frontend at svn (or browser).

Get the source

  • From the official Subversion repository (recommended if you're interested in JOSM core only):
    svn co https://josm.openstreetmap.de/svn/trunk josm
    
  • From the former OSM Subversion repository (recommended if you're also interested in plugins):
    svn co https://josm.openstreetmap.de/osmsvn/applications/editors/josm
    
  • JMapViewer from the former OSM Subversion repository
    svn co https://josm.openstreetmap.de/osmsvn/applications/viewer/jmapviewer/
    
  • 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.
  • From the unofficial GitHub mirror:
    git clone https://github.com/JOSM/josm.git
    
  • From the unofficial josm-plugins GitHub mirror:
    # We are effectively replicating the directory hierarchy of the JOSM svn repository so that the plugins can be built.
    mkdir josm && cd josm
    git clone git://github.com/JOSM/josm-plugins.git plugins
    # This is needed for building most plugins.
    git clone https://github.com/JOSM/josm.git core
    ln -s core/tools plugins/00_core_tools
    ln -s core/test/lib plugins/00_core_test_lib
    ln -s core/test/config plugins/00_core_test_config
    

Compile source code

Compiling using Ant

The easiest way to compile JOSM, provided OpenJDK and Ant on your machine are properly set up, is to go to the josm directory and type:

ant clean dist

That will create a dist/josm-custom.jar file if successful.

Compiling using IDE & running tests

DevelopersGuide/Compiling

Last modified 16 months ago Last modified on 2023-09-05T15:28:58+02:00
Note: See TracWiki for help on using the wiki.