Eclipse IDE setup
Project can be set up in Eclipse.
Environment
Eclipse 4.4.2 (Luna) with plugins:
- m2e (a.k.a. Maven Integration for Eclipse (Juno and newer)) - comes bundled with
Eclipse IDE for Java Developers
- m2e-wtp (a.k.a. Maven Integration for Eclipse WTP (Juno))
- google plugin for eclipse
- git - comes bundled with
Eclipse IDE for Java Developers
Plugin installation
1) Open ‘Help » Eclipse Marketplace…’
2) Since m2e
is already bundled we start from installing m2e-wtp
. Type ‘m2e-wtp’ in ‘Find’ field and click ‘Go’ button to search for a plugin. Once it’s found click on ‘Install’ to bring it to your eclipse.
Wait until it checks dependencies and once it finishes click ‘Confirm’ to confirm installation.
Then some time is needed to initialize installation. After that accept licenses and click ‘Finish’.
Wait until eclipse downloads and installs necessary packages and confirm restarting.
3) Install ‘Google plugin for eclipse’. Follow official instructions for eclipse luna. Check ‘Google plugin for eclipse’ and ‘GWT Designer for GPE’.
Instructions
0) Go to File » Import project… Select ‘Git » Projects from git’ and click ‘Next’.
Select ‘Clone URI’ and click ‘Next’.
Type ‘https://github.com/vitalidze/traccar-web.git’ into ‘URI’ and click ‘Next’.
Main branch is ‘dev’, so select it at least and click ‘Next’.
Confirm git repository location and click ‘Next’
Wait until cloning completes. Then select ‘Use the new project wizard’ and click ‘Finish’
Just close this wizard.
1) Go to File » Import project… Select Maven » Existing Maven Projects and click ‘Next’.
Then browse for a folder containing maven project. It should automatically find pom.xml file. Then click ‘Finish’.
2) Set up GWT for project. In project’s context menu select ‘Properties’. Select ‘Google » Web Toolkit’. Then check ‘Use Google Web Toolkit’ and click ‘OK’ to save changes.
Wait until GWT project initialization completes.
3) Run/Debug project. In project’s context menu select Run as » Web application (GWT Super Dev Mode).
Select src/main/webapp
folder when prompted for WAR
file.
Troubleshooting
-
During ‘Google plugin for eclipse’ installation getting error about ‘Egit’ dependency - try to add ‘Egit’ repository as said here.
-
If you are getting “Main type not specified” then go to Run/Debug configuration settings (for example via Run » Run Configurations… menu), select Web Application » traccar.html and put
com.google.gwt.dev.DevMode
to theMain class
field. -
If it complains about missing
src/test/java
folder then go to Project prefrences » Java Build Path » Source(tab) and removesrc/test/java
entry from source entries.