Setup Eclipse

8
HowtosetupEclipse,Tomcat,andDSpace TDL’sDSpaceCustomizationTraining May13 th 2009@Baylor ThisguidedescribeshowtoinstallandconfigureEclipsewithseveralpluginsto workinadevelopmentenvironmentforDSpacewithTomcat. Versions: Eclipse3.4.x Tomcat5.xor6.x DSpace1.5.x 1) DownloadEclipse ObtainafreshversionofEclipsefromtheofficialsite.Selectthe“EclipseIDEfor JavaDevelopers”typeofdistribution.Oncedownloaded,unpackthesoftware whereyouwouldlikeittobeinstalled.Itisbestifyoudonotstarteclipseyet untilafterstep#2. http://www.eclipse.org/downloads/ 2) InstalltheSysdeoTomcatplugin FirstdownloadtheSysdeoTomcatplugin,thelatestversion,thenuncompress softwareintoEclipse’splugindirectory.NextstartEclipseforthefirsttime.If youhavepreviouslystartedeclipseitmaynotrecognizethenewplugin,inthis caseyouneedtostartEclipsewiththeclean”option. http://www.eclipsetotale.com/tomcatPlugin.html 3) InstalltheSVNplugins Forthesepluginsyouwillbeabletousethestandardplugininstallprocedure. Beginbyselecting“Help>SoftwareUpdates…”fromthemainmenu.Whenthe softwareupdatedialogboxopensselectthe“AvailableSoftware”tab.Thenfor eachofthefollowingURLsclickthe“AddSite…”button. (Subversiveplugin) http://download.eclipse.org/technology/subversive/0.7/updatesite/ (SubversiveSVNConnectors) http://www.polarion.org/projects/subversive/download/eclipse/2.0/

Transcript of Setup Eclipse

Page 1: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 1/8

HowtosetupEclipse,Tomcat,andDSpace

TDL’sDSpaceCustomizationTraining

May13th2009@Baylor

ThisguidedescribeshowtoinstallandconfigureEclipsewithseveralpluginstoworkinadevelopmentenvironmentforDSpacewithTomcat.

Versions:Eclipse3.4.x

Tomcat5.xor6.x

DSpace1.5.x

1) DownloadEclipseObtainafreshversionofEclipsefromtheofficialsite.Selectthe“EclipseIDEfor

JavaDevelopers”typeofdistribution.Oncedownloaded,unpackthesoftware

whereyouwouldlikeittobeinstalled.Itisbestifyoudonotstarteclipseyetuntilafterstep#2.

http://www.eclipse.org/downloads/

2) InstalltheSysdeoTomcatplugin

FirstdownloadtheSysdeoTomcatplugin,thelatestversion,thenuncompresssoftwareintoEclipse’splugindirectory.NextstartEclipseforthefirsttime.Ifyouhavepreviouslystartedeclipseitmaynotrecognizethenewplugin,inthis

caseyouneedtostartEclipsewiththe“‐clean”option.

http://www.eclipsetotale.com/tomcatPlugin.html

3) InstalltheSVNpluginsForthesepluginsyouwillbeabletousethestandardplugininstallprocedure.

Beginbyselecting“Help‐>SoftwareUpdates…”fromthemainmenu.Whenthe

softwareupdatedialogboxopensselectthe“AvailableSoftware”tab.Thenfor

eachofthefollowingURLsclickthe“AddSite…”button.

(Subversiveplugin)http://download.eclipse.org/technology/subversive/0.7/update‐site/

(SubversiveSVNConnectors)

http://www.polarion.org/projects/subversive/download/eclipse/2.0/

Page 2: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 2/8

Nowyoushouldhavethesenewsitesavailable,underneatheachselectthe

followingcomponents:

•  SubversiveSVNTeamProviderSources

•  SubversiveSVNJDTIgnoreExtensions

•  SubversiveSVNTeamProvider

•  SubversiveSVNTeamProviderLocalization

•  SubversiveSVNJDTIgnoreExtensions

•  NativeJavaHL1.5Implementation

•  NativeJavaHL1.6Implementation

•  SubversiveSVNConnectors

•  SVNKit1.2.2Implementation

•  SVNKit1.3.0Implementation

Thenclickthe“Install…”button.Followingthistherewillbeseveralscreensaboutlicensesanddependencies,justselecttheappropriateanswerstoinstall

theplugins.WhentheprocessiscompleteyouwillbepromptedtorestartEclipse.

4) InstalltheMavenplugins

Asbefore,forthemavenpluginsyouwillbeabletousethestandardinstall

procedure.Again,startbyselecting“Help‐>SoftwareUpdates…”fromthemain

Page 3: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 3/8

menu.Selectthe“AvailableSoftware”tab,andagainaddanewsiteasshow

below:

http://m2eclipse.sonatype.org/update/

Oncethesitehasbeeninstalled,selecteverycomponentundertheheading

“MavenIntegration”asshowhere:

Thenclickthe“Install…”buttonasbefore.

5) CheckouttheDSpacesourcecodeIfthe“Welcome”tabisup,clickthatawaytoreturntotheworkbench.Intheleft

handpanelselect“New‐>Project…”fromthecontextmenu.

Thiswillbringupa“Selectawizard”dialogbox,selectthe“ProjectfromSVN”

wizzardandclickthenextbutton.Inthe“CheckoutfromSVN”dialogboxenter

thefollowingURLintheappropratefield.Leaveallotherfieldsonthisdialogboxastheirdefaults,thenclicknext.

https://dspace.svn.sourceforge.net/svnroot/dspace

Youmaybeaskedtoacceptthecertificateoftherepository,acceptit.

Thenextdialogscreenthatwillappearis“Selectaresource”.Inthisdialogbox,clickthe“Browse…”buttontoselecttheversionofDSpace.Navigateto

“dspace/tags/dspace‐1_5_1”andclicktheOKbutton.Finalyclickthe“Finished”

buttonontheselectaresourcedialogbox.

Thenextsteppresentsthe“CheckOutAs”dialogbox,selectthelastoption

“Checkoutasaprojectwiththenamespecified:”usinganynameyouchoose.

Page 4: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 4/8

6) ConfigureMaven

ThenextstepistotellthemavenpluginhowtobuildDSpace.Firstbeginby

enablingMaven.Fromtheworkbench,rightclickontheprojecttobringupthe

contextmenu,thenselect“Maven‐>EnableDependencyManagement”

Thismaytakesometime,waitfortheworkspacetocompleterebuilding.Afterit

iscompletetherewillstillbeerrors,youwillneedtoenablenestedmodulesby

seleting“Maven‐>EnableNestedModules”.Thenagainyoushouldwaitforthe

workspacetorebuild.

Finally,DSpaceshouldreportnocompileerrors.Youshouldalsoseeanewsetof

foldersinsidetheprojectthatlooksimilartothepicturebelow.

Page 5: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 5/8

Thenextstepistosetuparuntimebuildcommand.Fromthetoptoolbar,select“thegreenarrow‐>RunConfigurations…”asshownbelow:

Thiswillbringupthe“RunConfiguration”dialogbox.SelecttoaddanewMaven

Buildcommand.Rightclickon“Maven”andselectthe“New”optionfromthe

contextmenu.

Page 6: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 6/8

Withanewdefaultmavencommanddetailscreen,filloutthefollowing

parametersasshownbelowinthepicture.

Name:Package

BaseDirectory:ClickBrowseandselectyourproject.

Goals:package

ParameterName:addaparameter“dspace.config”withavalueofthefullpathto

yourdspace.cfg

Thenclickthe“Run”button.ThiswillbegintocompileDSpacewhichmaytake

sometime.WhenyouneedtorecompileDSpacesimplyselectyourPackage

commandfromthedropdownboxbelowthegreenarrow.

Page 7: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 7/8

7) ConfigureTomcat

FirstsomeglobalparametersneedtobesetupforTomcattoworkinanyproject,

thenyourprojectmustbeconfiguredtouseTomcat.Beginbyselectingthemain

Eclipsepreferences,“Eclipse‐>Preferences”fromthemainmenu(under

windowsthismaybelocatedintheFilemenu)

Insidethe“Preferences”dialogboxselectthe“Tomcat”optionfromthelefthandhierarchy.HereselectthecorrectTomcatversion,andenterthefullpathtothe

Tomcatdirectory.

Nextselectthe“TomcatManagerApp”fromthelefthandhierarchy.andenter

yourTomcatusernameandpassword.ThenclickOK.

Page 8: Setup Eclipse

8/3/2019 Setup Eclipse

http://slidepdf.com/reader/full/setup-eclipse 8/8

Next,theprojectneedstobeconfiguredtouseTomcat.Inthemainmenuselect

“Project‐>Properties”.Select“Tomcat”fromthelefthandhierarchy.Enterthe

followingfields.

CheckisaTomcatprojectcheckbox

ContextName:xmlui

Subdirectory:

dspace‐xmlui/dspace‐xmlui‐webapp/dspace‐xmlui‐webapp‐1.5.1

ThenclickOK.

8) Deploywebapplication

Toensurethisworks,startyourTomcat.ThenuseUpdateandReloadcommandstopublishDSpace’sxmluiwebapplicationintoTomcatforeasy

testing.