Changes between Version 24 and Version 25 of DevelopersGuide/Compiling


Ignore:
Timestamp:
2018-06-01T21:47:13+02:00 (8 years ago)
Author:
michael2402
Comment:

Note about requirement to build with ant once before using eclipse + gradle build instructions

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/Compiling

    v24 v25  
    1616=== Compiling using Eclipse ===
    1717
     18You need to have `ant` installed on your system.
     19
    1820Download and install Eclipse: https://www.eclipse.org/
    1921
     
    2224You will have problems compiling, due to problems compiling Mappaint MapCSS with a fresh install of Eclipse. First you will need the [http://www.engr.mun.ca/~theo/JavaCC-FAQ/javacc-faq-moz.htm JavaCC] [http://eclipse-javacc.sourceforge.net/ plugin for Eclipse]. To install it in Eclipse, go to Help->New Software... then add the site [http://eclipse-javacc.sourceforge.net/] as a source, and install the JavaCC Eclipse Plug-in. Then in the Package Explorer, expand org.openstreetmap.josm.gui.mappaint.mapcss, right-click on MapCSSParser.jj, and "Compile with JavaCC". This should put new java files in a package called org.openstreetmap.josm.gui.mappaint.mapcss.parsergen, but if it doesn't, you will have to create the package manually (right-click and create package), then drag the new files into the package you just created (they should be easy to identify based on the light gray text that denotes it was compiled from MapCSSParser.jj). This should resolve any import issues in MapCSSStyleSource.java, and you should now be able to compile JOSM.
    2325
     26Before being able to run JOSM from eclipse, you need to compile the project using `ant epsg-compile` one time. Otherwise, you will get a resource not found error on startup.
     27
    2428If you try to compile the JOSM sources in Eclipse and get errors like "The method marktr(String) is undefined for the type SomeType" look at [https://lists.openstreetmap.org/pipermail/josm-dev/2008-August/001585.html solution suggested at mailing list].
    2529
    2630There are also two Videos available at youtube, which show [https://www.youtube.com/watch?v=-LoWGf-hqiQ how to checkout JOSM into Eclipse] and [https://www.youtube.com/watch?v=Z3OjG3nDvzA how to checkout a JOSM plugin into Eclipse].
     31
     32=== Compiling using Gradle + Eclipse ===
     33
     34Not officially supported.
     35
     361. Delete `.settings`, `.project`, `.classpath` files/dirs
     372. Download the zip file with the gradle build files form #8269 and extract it into your JOSM directory.
     383. Then in eclipse, go to `File` -> `Import` -> `Existing Gradle project` and select the JOSM directory.
     39
     40You can start JOSM using the `run` target of gradle (found in the `Gradle Tasks` view).
    2741
    2842=== Compiling using Netbeans ===