-
Notifications
You must be signed in to change notification settings - Fork 10
/
eclipse.indigo.build.and.debug.txt
55 lines (37 loc) · 2.56 KB
/
eclipse.indigo.build.and.debug.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
These instructions have been tested on Eclipse 3.7.1 "Indigo"
Eclipse Indigo now has maven m2eclipse plug-ins baked-in!
The default settings assume a postgresql database url and hibernate dialect. To switch to MySQL change
src/main/WEB-INF/classes/default.datasource-context.xml to refer to the other properties file. If you
get the code working with other databases let me know the settings which worked and I will commit them
for other folks.
ENSURE YOU HAVE THE eGit PLUGIN AND m2e->eGit CONNECTOR
1) [The first step may not be required in later Inidgo versions]
Confirm that Egit is 'on'. "Help > Eclipse Marketplace..." and search for
"EGit" and install the "EGit Team Provider".
2) Enable the Maven/EGit connector with these instructions
http://stackoverflow.com/questions/4542104/how-do-you-get-git-integration-working-with-m2eclipse
CLONE THE REMOTE REPO AND IMPORT AS MAVEN
3) Switch to the "Window > Open Prespective > Git Repository" perspective.
Copy the url following URL to the clipboard:
https://[email protected]/simbo1905/ZkToDo2.git
In the left panel right click and "Paste Repository Path". This brings up a wizard
which results in making a local repo clone; the defaults should work.
4) Expand the local repository and right click on the "Working directory" and choose
"Import Maven Projects...".
5) Switch to the Java perspective. Right click on the project and choose "Team > Share Project".
Select Git and on the next step tick the box "Use or create repository in parent folder of project"
then hit finish.
You now have a local repo; when you commit you are committing locally not to the main server you cloned.
Drop me a line to get permissions to "git push origin master" or get setup on github and send me a pull
request to merge your feature into my repo.
COMPILE / RUN / DEBUG
6) "Debug As... > Maven Build..." In the goals textbox enter "package jetty:run".
Swith to the JRE tab and set a VM argument "-Djetty.port=8888" or whatever port
you wish to run on. Switch to the Environment tab and set a variable "DATABASE_URL"
to be your JDBC URL e.g.
"postgres://foodToGoUser:foodToGoPassword@localhost/testdb"
7) Open a browser at "http://localhost:8080/
8) Set a break point ReminderService.findAll method. Refresh the browser. It should stop and show you
the "Source not found. Edit Source Lookup Path...". Click on that. Select "Add > Java Project" and
select the zktodo2 project. It should now find the source line the next time you hit a breakpoint.
End.