Setting up Eclipse for CN Development¶
Install Eclipse¶
Goto Eclipse downloads: http://www.eclipse.org/downloads/
Download latest version of Eclipse IDE for Java EE Developers
I maintain all my downloaded and active open source software in a folder in my home directory named share.So i unpack the tarred gzipped file into ~/share/eclipse
open up eclipse.ini and change some java startup configuration parameters:
-Xms40m
-Xmx512m
to:
-Xms128m
-Xmx1024m
I added eclipse to my Programming folder in my Applications dropdown, but that is solely for my convenience.
At this time, you may start up eclipse.
Install Subversion Support¶
Under help menu item, choose check for updates
(but make certain a separate svn client is installed on your machine)
Add Svn connector from main repo. when configuring to check out stuff choose the highest available connector available.
Then choose ‘Install New Software’
In the Dropdown beside ‘Work with’ choose ‘Helios - http://download.eclipse.org/releases/helios‘
While in the filter text area, type ‘Subversive’
Choose the Subversive SVN Team Provider then click Next > then Next >
Accept the software conditions and then click Finish.
After downloading, restart eclipse
Install Maven Support¶
Go back to Help > Install new software
Click on the Add button beside ‘Work with’
type “m2eclipse” for the name and http://m2eclipse.sonatype.org/sites/m2e for the url
while in the filter text area type ‘Maven’
Install Mvn plugin from the maven eclipse plugin site.:
Click on the 'Maven Integration for Eclipse'
'Maven POM Editor',
'Maven POM XML Editor',
'Maven: The Definitive Guide book' and
'Maven Integration for WTP'
Click Next > then Next >
Accept the software conditions and then click Finish.
Click OK on any security warning and after downloading, restart eclipse.
Download SVN project into new workspace¶
Close Eclipse
I first downloaded the cn_prototype directory via subversion on command line into the eclipse workspace directoy of choice. My personal choice is ~/Projects/Eclipse/CNPrototype
so I executed from my home directory:
svn co https://repository.dataone.org/software/cicore/trunk/cn_service/ Projects/Eclipse/DataONE-CnService
Import Mvn Project¶
I then opened up eclipse, pointed to the CNPrototype directory as a new workspace. Under ‘Window’ on the Menu bar, goto ‘Show View’ and select Project Explorer.
Then go to ‘File’ on Menu bar and choose ‘Import’ Select ‘Maven’, ‘Exising Maven Projects’ and then ‘Next >’
In Root Directory, click the Browse button and choose ‘..Projects/Eclipse/DataONE-CnService/cn-prototype’, then click ‘Finish’.
It will take a while to import the Maven Projects, but at this time you should have:
DataONE-CnPrototype
DataONE-CnRestService
and many others
You should see the J and M next to the projects representing the Java and Maven decorators for the Projects. The Top level parent projects will not have ‘J’
Integrate SVN checkout with Team Eclipse
Right click on DataONE-CnDomain project.
Choose Team > Share Project ...
Under Select Repository type click SVN.
Immediately, Subversive Connector Discovery window should popup. click on SVN Kit 1.3.0 (unless a higher version is listed). Then click ‘Finish’.
And ‘Install’ window should then popup. Accept the defaults and click ‘Next >’ and then ‘Next >’ Accept the software conditions and then click Finish.
A software error may popup, just ignore it. After updates are complete, Eclipse will ask if you want to restart, click ‘Restart’.
So, Now you will have to Start over...
Right click on DataONE-CnDomain project.
Choose Team > Share Project ...
Under Select Repository type click SVN.
Hopefully, the project URL is already filled in and you just have to click ‘Next >’ Type in your Username and Password and click ‘Finish’
repeat for DataONE-CnPrototype and DataONE-CnRestService (except you will not have to provide username/passwd again)
You are now done.
But to use, you may wish to highlight each project, Goto Menu and select Project > Update All Maven Dependencies