-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathBioJava3_eclipse.html
More file actions
223 lines (191 loc) · 8.66 KB
/
BioJava3_eclipse.html
File metadata and controls
223 lines (191 loc) · 8.66 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<p>Eclipse is a common IDE for using BioJava.</p>
<h2 id="prerequisites">Prerequisites</h2>
<ol>
<li>Download Eclipse from
<a href="http://www.eclipse.org/"><a href="http://www.eclipse.org/">http://www.eclipse.org/</a></a>. Several
flavors are available, which come with different pre-installed
plugins. We recommend starting with ‘Eclipse IDE for Java
Developers’.</li>
<li>Install the following plugins. See <a href="#Plugin_Installation" title="wikilink">Plugin
Installation</a> below for detailed
instructions.
<ul>
<li>m2e - Maven Integration for Eclipse</li>
<li>Eclipse EGit</li>
<li>m2e-egit SCM Handler</li>
</ul>
</li>
</ol>
<h2 id="cloning-the-repository">Cloning the repository</h2>
<p>We recommend <a href="https://help.github.com/articles/fork-a-repo">creating a
fork</a> on github for
day-to-day development. In the following instructions you should
substitute something like ‘<a href="https://github.com/">https://github.com/</a><username>/biojava.git'
for the repository URL. If you don't want to make a fork (for instance,
if you don't plan to make any changes), you can follow the instructions
below exactly.</username></p>
<p>Option 1: <em>Try these instructions first. If they don’t work, try option
2.</em></p>
<ol>
<li>Go to</li>
<li>In the Maven category, select ‘Check out Maven Projects from SCM’
and click Next.</li>
<li>Select ‘git’ in the dropdown box. If ‘git’ is not an option, make
sure you have the m2e-egit connector installed as descripted below.</li>
<li>
<p>Add the URL for your biojava repository on github. For instance, to
checkout the main repository, use
https://github.com/biojava/biojava.git</p>
<p>Make sure that ‘Checkout All Projects’ is selected and click Finish.
Eclipse will download the source code in the background, indicated
by the progress bar in the lower right corner. After a few minutes
the Package Explorer pane should populate with the BioJava
submodules.</p>
</li>
<li>Initiate git tracking for the projects
<ol>
<li>Select all biojava modules in the Project Explorer</li>
<li>Right click and select</li>
<li>Select ‘Git’ and click Next</li>
<li>Select ‘Use or create repository in parent folder of project’.
This will make <em>{Eclipse Workspace}/biojava</em> into the local git
repository.</li>
</ol>
</li>
</ol>
<p>Finished!</p>
<p>Option 2: <em>These instructions are more difficult, but may work if Option
1 fails.</em></p>
<ol>
<li>Open the Git Repository View
<ol>
<li>Go to</li>
<li>Under ‘Git’, select ‘Git Repositories’</li>
</ol>
</li>
<li>Clone your git repository. The following is the easiest way to do
this from within Eclipse, but you could also get a local clone via
the command line and then add it as a local repository.
<ol>
<li>Click the ‘Clone Git Repository’ icon in the Git Repository View</li>
<li>
<p>Add the URL of your biojava repository on github. For instance,
to checkout the main repository, use
https://github.com/biojava/biojava.git</p>
</li>
<li>Optionally add your Github username and password, then click
Next.</li>
<li>Select which branches to include. If you plan to commit any
changes, we recommend only tracking the ‘master’ branch, so you
don’t accidentally initiate a release. If you want the last
stable version, you can select ‘release’ instead. Click Next.</li>
<li>Choose a destination directory (outside your Eclipse workspace),
double-check your selection of Initial branch, and click Finish</li>
</ol>
</li>
<li>Import Maven projects from the git repository.
<ol>
<li>Right click on the biojava git repository in the Git
Repositories viewer. Select ‘Import Maven Projects…’</li>
<li>Select all modules and click Finish. Eclipse will download the
source code in the background, indicated by the progress bar in
the lower right corner. After a few minutes the Package Explorer
pane should populate with the BioJava submodules.</li>
</ol>
</li>
<li>Initiate git tracking for the projects
<ol>
<li>Select all biojava modules in the Project Explorer</li>
<li>Right click and select</li>
<li>Select ‘Git’ and click Next</li>
<li>Select ‘Use or create repository in parent folder of project’.
This will use the local repository you cloned previously for
your source code</li>
<li>Finished!</li>
</ol>
</li>
</ol>
<p>Option 3: <em>Cloning from command line and importing into eclipse, doesn’t
require SCM handler.</em></p>
<ol>
<li>
<p>Clone biojava from command line
git clone https://github.com/biojava/biojava.git</p>
</li>
<li>Go to
<ol>
<li>Browse to the root directory of your cloned biojava project</li>
<li>Click OK and then Finish</li>
</ol>
</li>
<li>You are done! now eclipse will automatically detect all the pom.xml
files (the maven config files) and will understand that it is a
maven and a git-tracked project.</li>
</ol>
<p>You should now have source to all the biojava modules (biojava3-core,
biojava3-structure, etc). Viewing the history for any file should show
you all commits since 2009 which have contributed to that file.</p>
<h2 id="plugin-installation">Plugin Installation</h2>
<p><em>This section needs to be expanded with specific instructions for
installing plugins using either Marketplace or directly from the Install
software menu.</em></p>
<p>Recent versions of Eclipse come with the Marketplace plugin, which can
be used to find and install additional plugins. Feel free to install the
prerequisites from Marketplace. This tutorial uses the older method of
installing plugins directly from their repositories, which is compatible
with more versions of Eclipse.</p>
<h3 id="install-maven-m2e">1. Install Maven m2e</h3>
<p><img src="Install_m2e.png" alt="Screenshot of Install New Software dialog after selecting m2e for
install." title="Screenshot of Install New Software dialog after selecting m2e for install." /></p>
<ol>
<li>In eclipse, go to</li>
<li>Choose ‘–All Available Sites–’ from the ‘Work with’ dropdown</li>
<li>Search for ‘m2e’ and check the box next to ‘m2e - Maven Integration
for Eclipse’ under Collaboration</li>
<li>Click ‘Next’, accept the license, and finish the installation</li>
<li>Restart Eclipse at the prompt</li>
</ol>
<p>If everything went smoothly, after reboot the ‘Welcome’ screen should
mention ‘Maven Integration for Eclipse’.</p>
<h3 id="install-egit">2. Install EGit</h3>
<p>Installing egit is very similar to installing m2e.</p>
<ol>
<li>In eclipse, go to</li>
<li>Choose ‘–All Available Sites–’ from the ‘Work with’ dropdown</li>
<li>Search for ‘egit’ and check the box next to ‘Eclipse EGit’ under
Collaboration</li>
<li>Click ‘Next’, accept the license, and finish the installation</li>
<li>Restart Eclipse at the prompt</li>
</ol>
<p>After rebooting, the Welcome screen should have a section about Git.</p>
<h3 id="install-the-scm-handler">3. Install the SCM Handler</h3>
<p><img src="EGit SCM install 1.png" alt="The dialog. [Step
1](#3._Install_the_SCM_Handler "wikilink")" title="fig:The dialog. Step 1" />
<img src="EGit SCM install 2.png" alt="Link to the m2e Marketplace, without any SCM connectors installed.
[Step
3](#3._Install_the_SCM_Handler "wikilink")" title="fig:Link to the m2e Marketplace, without any SCM connectors installed. Step 3" />
<img src="EGit SCM install 3.png" alt="Installing m2e-egit from the m2e Marketplace [Step
4](#3._Install_the_SCM_Handler "wikilink")" title="fig:Installing m2e-egit from the m2e Marketplace Step 4" /></p>
<ol>
<li>Go to</li>
<li>In the Maven category, select ‘Check out Maven Projects from SCM’
and click Next</li>
<li>At this point, the Git connector is not installed, so the ‘SCM URL’
dropdown will either be blank or will only contain other SCM
connectors like SVN. Click ‘Find more SCM connectors in the m2e
Marketplace’</li>
<li>Search for ‘egit’ in the ‘Install m2e connectors’ dialog. Check the
‘m2e-egit’ connector and click Finish.</li>
<li>Click through the installer dialog and license. The security warning
about unsigned content is safe to ignore.</li>
<li>Restart eclipse (last time!)</li>
</ol>
<p>Eclipse should now be ready to get the latest checkout of BioJava. See
<a href="#Cloning_the_repository" title="wikilink">Cloning the repository</a> above.</p>
<h2 id="configuring-egit">Configuring EGit</h2>
<p>You should set your git name and email in Eclipse.</p>
<ol>
<li>Go to Eclipse Preferences</li>
<li>View</li>
<li>In the ‘User Settings’ tab, update your name and email.</li>
</ol>