Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 121 lines (82 sloc) 3.44 kB
0af0491 @cbeams Update STS version used to test Eclipse setup script
cbeams authored
1 STS_TEST_VERSION='2.9.2.RELEASE'
f880055 @cbeams Update README and add IDE import helper scripts
cbeams authored
2
3 cd `dirname $0`
4 clear
5 cat <<EOM
6
7 -----------------------------------------------------------------------
8 Spring Framework Eclipse/STS project import guide
9
10 This script will guide you through the process of importing the
11 Spring Framework sources into Eclipse/STS. It is recommended that you
12 have a recent version of the SpringSource Tool Suite (this script has
13 been tested against STS $STS_TEST_VERSION), but at the minimum you will
14 need Eclipse + AJDT.
15
16 If you need to download and install STS, please do that now by
17 visiting http://springsource.org/downloads/sts
18
19 Otherwise, press enter and we'll begin.
20 EOM
21
22 read
23
24 # this command:
25 # - wipes out any existing Eclipse metadata
26 # - generates OXM test classes to avoid errors on import into Eclipse
27 # - generates metadata for all subprojects
28 # - skips metadata gen for the root project (-x :eclipse) to work
29 # around Eclipse's inability to import hierarchical project structures
aad2183 @cbeams Remove global 'clean' from import-into-eclipse.sh
cbeams authored
30 COMMAND="./gradlew cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse"
f880055 @cbeams Update README and add IDE import helper scripts
cbeams authored
31
32 cat <<EOM
33
34 -----------------------------------------------------------------------
35 STEP 1: Generate subproject Eclipse metadata
36
37 The first step will be to generate Eclipse project metadata for each
38 of the spring-* subprojects. This happens via the built-in
39 "Gradle wrapper" script (./gradlew in this directory). If this is your
40 first time using the Gradle wrapper, this step may take a few minutes
41 while a Gradle distribution is downloaded for you.
42
43 The command run will be:
44
45 $COMMAND
46
47 Press enter when ready.
48 EOM
49
50 read
51
52 $COMMAND || exit
53
54 cat <<EOM
55
56 -----------------------------------------------------------------------
57 STEP 2: Import subprojects into Eclipse/STS
58
59 Within Eclipse/STS, do the following:
60
61 File > Import... > Existing Projects into Workspace
62 > When prompted for the 'root directory', provide $PWD
63 > Press enter. You will see the modules show up under "Projects"
64 > All projects should be selected/checked. Click Finish.
65 > When the project import is complete, you should have no errors.
66
67 When the above is complete, return here and press the enter key.
68 EOM
69
70 read
71
72 COMMAND="./gradlew :eclipse"
73
74 cat <<EOM
75
76 -----------------------------------------------------------------------
77 STEP 3: generate root project Eclipse metadata
78
79 Unfortunately, Eclipse does not allow for importing project
80 hierarchies, so we had to skip root project metadata generation in the
81 during step 1. In this step we simply generate root project metadata
82 so you can import it in the next step.
83
84 The command run will be:
85
86 $COMMAND
87
88 Press the enter key when ready.
89 EOM
90
91 read
92
93 $COMMAND || exit
94
95 cat <<EOM
96 -----------------------------------------------------------------------
97 STEP 4: Import root project into Eclipse/STS
98
99 Follow the project import steps listed in step 2 above to import the
100 root project.
101
102 Press enter when complete, and move on to the final step.
103 EOM
104
105 read
106
107 cat <<EOM
108 -----------------------------------------------------------------------
109 STEP 5: Enable Git support for all projects
110
111 - In the Eclipse/STS Package Explorer, select all spring* projects.
112 - Right-click to open the context menu and select Team > Share Project...
113 - In the Share Project dialog that appears, select Git and press Next
114 - Check "Use or create repository in parent folder of project"
115 - Click Finish
116
35bf5dc @mjkrumlauf Fix typo in Eclipse import instructions
mjkrumlauf authored
117 When complete, you'll have Git support enabled for all projects.
f880055 @cbeams Update README and add IDE import helper scripts
cbeams authored
118
119 You're ready to code! Goodbye!
120 EOM
Something went wrong with that request. Please try again.