Modify

Opened 4 months ago

Last modified 4 months ago

#17218 new task

Revise IntelliJ related compiling guide

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Wiki content Version:
Keywords: Cc:

Description

I tried IntelliJ get it to work following the steps on the wiki page, but some dependencies were missing and couldn't set up the IDE correctly. Ant helped me to build and run, but that's all. Using built-in running/testing/debugging config would be better.

https://josm.openstreetmap.de/wiki/DevelopersGuide/CompilingUsingIntelliJ

Attachments (1)

2019-01-20-214623_1478x992_scrot.png (93.3 KB) - added by simon04 4 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 4 months ago by Don-vip

Owner: changed from team to anonymous
Status: newneedinfo

The wiki is maintained by the community, can you please update it? I have no idea what's missing, I'm using Eclipse.

comment:2 Changed 4 months ago by anonymous

Now I only get 6 errors instead of 100. Currently the only file that fails is scripts\I18nSimilarStrings.java, because can't import
org.openstreetmap.josm.gui.MainApplicationTest and
org.openstreetmap.josm.plugins.PluginHandlerTestIT

Any idea? If I could set up the IDE, I can make the wiki update, probably next month.

comment:3 Changed 4 months ago by anonymous

Oh, and I used the github mirror for getting the source.

Changed 4 months ago by simon04

comment:4 Changed 4 months ago by simon04

Owner: changed from anonymous to team
Status: needinfonew

NB: Another good reason to move to Gradle eventually (#8269), IDE auto config, https://www.jetbrains.com/help/idea/gradle.html

I originally wrote this guide. I marked scripts/ as test root:

comment:5 Changed 4 months ago by anonymous

Thanks, simon04. Although I already tried Gradle, somehow it didn't work. I'll have a second look.

comment:6 Changed 4 months ago by anonymous

Finally, I can build the source with IntelliJ built-in tools. Now I have another problem. If I want to run JOSM, it fails because can't load the config files:

Unable to set SPI locale provider: null
Unable to set SPI locale provider: null
2019-01-27 19:06:33.255 INFO: Log level is at INFO (INFO, 800)
2019-01-27 19:06:33.282 SEVERE: java.io.IOException: Failed to open input stream for resource 'resource://data/preferences.xsd'
java.io.IOException: Failed to open input stream for resource 'resource://data/preferences.xsd'
	at org.openstreetmap.josm.io.CachedFile.getInputStream(CachedFile.java:230)
	at org.openstreetmap.josm.data.preferences.PreferencesReader.validateXML(PreferencesReader.java:96)
	at org.openstreetmap.josm.data.preferences.PreferencesReader.validateXML(PreferencesReader.java:85)
	at org.openstreetmap.josm.data.Preferences.load(Preferences.java:398)
	at org.openstreetmap.josm.data.Preferences.init(Preferences.java:509)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:789)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:284)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:711)

2019-01-27 19:06:36.187 WARNING: The revision file '/REVISION' is missing.
2019-01-27 19:06:36.448 SEVERE: Unable to register font DroidSans.ttf
2019-01-27 19:06:36.449 SEVERE: java.io.IOException: Failed to open input stream for resource 'resource://data/fonts/DroidSans.ttf'
java.io.IOException: Failed to open input stream for resource 'resource://data/fonts/DroidSans.ttf'
	at org.openstreetmap.josm.io.CachedFile.getInputStream(CachedFile.java:230)
	at org.openstreetmap.josm.tools.FontsManager.initialize(FontsManager.java:40)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:810)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:284)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:711)

2019-01-27 19:06:36.450 SEVERE: Unable to register font DroidSans-Bold.ttf
...

The working directory is the root folder, I don't know why doesn't recognise the files :/

Ant run config works fine. Gradle doesn't yet.

comment:7 Changed 4 months ago by anonymous

Gradle cannot import org.openstreetmap.josm.RevisionTask.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to anonymous
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.