Version 16 (modified by 4 years ago) ( diff ) | ,
---|
Compiling using IntelliJ IDEA
This describes how to develop and compile JOSM using IntelliJ IDEA.
Note that some information might be outdated due to a reorganization of the josm file tree (see #18845).
Getting the source code
- Follow the steps in Source code#Getthesource to get the source code from Subversion. For this guide, assume it is located in a folder
josm-svn
.
Configure IntelliJ (as of 2020)
→ setup JetBrains IntelliJ IDEA for JOSM development
Import the project into IntelliJ
- Import the project into IntelliJ using the menu:
File
→New
→Project from Existing Sources
. Follow the wizard:- Navigate to the folder containing the project, and select it.
- Select
Create Project from existing sources
.
- Give the project a name, and click
Next
.
- IntelliJ auto-detects the folders which contain source code. Click
Next
.
- IntelliJ auto-detects the project libraries. Click
Next
.
- IntelliJ auto-detects a number of project modules. Deselect all the modules, except the first one. Click
Next
.
- Select a Java SDK, at least version 8. Click
Next
.
- Deselect OSGI automatic configuration. Click
Next
.
Building the project
- When you are prompted to add IntelliJ project configuration to Subversion, check the box
Don't ask again
, and clickCancel
.
- IntelliJ will index the project.
- Open the
Ant
tool window. It contains no configuration yet.
- Click the
+
button to add an Ant configuration file. Select the filebuild.xml
- The Ant tool window should now list Ant tasks.
- Double click the
dist
task. It will build the project. TheMessages
tool window will show the progress and logging output.
- There should now be a built file:
dist/josm-custom.jar
.
Running the project
- There are no run configurations configured. Click
Add configuration
.
- Click the
+
button to add a newJAR Application
configuration.
- Give the new configuration a name.
- In the field
Path to JAR
, choose the built Jar file.
- Add a
Before launch
configuration item,Run Ant target
.
- A window will popup with all the available Ant tasks. Choose
dist
.
- The configuration should now be ready and selected in the project.
- Click the
Run
(play) button. The project should build again, and then run.
Running the tests
Additional settings
This section describes helpful additional settings for IntelliJ IDEA.
Link ticket references in commit messages
Make ticket references in the code of the form ticket 1234
or #1234
clickable as a link to the Trac ticket.
Search open issues
Attachments (44)
- intellij-from-sources-01.png (26.9 KB ) - added by 8 years ago.
- intellij-from-sources-02.png (12.5 KB ) - added by 8 years ago.
- intellij-from-sources-03.png (25.8 KB ) - added by 8 years ago.
- intellij-from-sources-04.png (31.9 KB ) - added by 8 years ago.
- intellij-from-sources-05.png (26.5 KB ) - added by 8 years ago.
- intellij-run-configuration.png (39.7 KB ) - added by 8 years ago.
- intellij-exclude-apache.png (74.1 KB ) - added by 8 years ago.
- intellij-add-groovy.png (63.6 KB ) - added by 8 years ago.
- intellij-issue-navigation.png (73.3 KB ) - added by 7 years ago.
- intellij-task-search.png (73.7 KB ) - added by 7 years ago.
- intellij-start-from-sources (2).png (15.7 KB ) - added by 4 years ago.
- intellij-start-from-sources (3).png (14.1 KB ) - added by 4 years ago.
- intellij-start-from-sources (4).png (31.0 KB ) - added by 4 years ago.
- intellij-start-from-sources (5).png (34.7 KB ) - added by 4 years ago.
- intellij-start-from-sources (6).2.png (26.5 KB ) - added by 4 years ago.
- intellij-start-from-sources (7).png (59.0 KB ) - added by 4 years ago.
- intellij-start-from-sources (8).png (17.8 KB ) - added by 4 years ago.
- intellij-start-from-sources (9).png (9.3 KB ) - added by 4 years ago.
- intellij-start-from-sources (10).png (2.5 KB ) - added by 4 years ago.
- intellij-start-from-sources (11).png (7.4 KB ) - added by 4 years ago.
- intellij-start-from-sources (12).png (25.4 KB ) - added by 4 years ago.
- intellij-start-from-sources (13).png (43.2 KB ) - added by 4 years ago.
- intellij-start-from-sources (14).png (70.7 KB ) - added by 4 years ago.
- intellij-start-from-sources (15).png (16.1 KB ) - added by 4 years ago.
- intellij-start-from-sources (16).png (5.2 KB ) - added by 4 years ago.
- intellij-start-from-sources (17).png (25.5 KB ) - added by 4 years ago.
- intellij-start-from-sources (18).png (42.8 KB ) - added by 4 years ago.
- intellij-start-from-sources (19).png (54.2 KB ) - added by 4 years ago.
- intellij-start-from-sources (20).png (43.4 KB ) - added by 4 years ago.
- intellij-start-from-sources (21).png (49.8 KB ) - added by 4 years ago.
- intellij-start-from-sources (22).png (5.8 KB ) - added by 4 years ago.
- intellij-start-from-sources (23).png (159.2 KB ) - added by 4 years ago.
- ticket-integration (1).png (38.5 KB ) - added by 4 years ago.
- ticket-integration (2).png (54.4 KB ) - added by 4 years ago.
- intellij-test.png (28.6 KB ) - added by 4 years ago.
- intellij-start-from-sources (6).png (26.5 KB ) - added by 4 years ago.
- 79651115-9491d080-81b1-11ea-9a48-99de65830f53.png (49.0 KB ) - added by 4 years ago.
- 79651289-a1aebf80-81b1-11ea-99ba-36bce549824a.png (63.3 KB ) - added by 4 years ago.
- 79651643-bc813400-81b1-11ea-9f8e-c2eeb68b160c.png (79.7 KB ) - added by 4 years ago.
- 79651825-ca36b980-81b1-11ea-9a8d-77f98fcdce8f.png (57.9 KB ) - added by 4 years ago.
- 79652490-fb16ee80-81b1-11ea-844a-97628baa5075.png (29.1 KB ) - added by 4 years ago.
- 79653168-2f8aaa80-81b2-11ea-9aee-26bfdc6fbd02.png (37.7 KB ) - added by 4 years ago.
- 79653367-3d403000-81b2-11ea-968a-5760289826c8.png (25.7 KB ) - added by 4 years ago.
- 79653664-534df080-81b2-11ea-84bf-0bf5dbc54319.png (25.7 KB ) - added by 4 years ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.