0% found this document useful (0 votes)
90 views

Setup Eclipse

This document provides instructions for setting up an Eclipse development environment for DSpace, including installing plugins for Tomcat, SVN, Maven, and configuring Eclipse to work with the DSpace source code checked out from SVN, build DSpace with Maven, and deploy the compiled code to a Tomcat server for testing. The 8 steps describe downloading Eclipse, installing relevant plugins, checking out and configuring the DSpace source code as a project in Eclipse, setting up a Maven build configuration, and configuring Tomcat integration in Eclipse to deploy the compiled code.

Uploaded by

Felipe Costa
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

Setup Eclipse

This document provides instructions for setting up an Eclipse development environment for DSpace, including installing plugins for Tomcat, SVN, Maven, and configuring Eclipse to work with the DSpace source code checked out from SVN, build DSpace with Maven, and deploy the compiled code to a Tomcat server for testing. The 8 steps describe downloading Eclipse, installing relevant plugins, checking out and configuring the DSpace source code as a project in Eclipse, setting up a Maven build configuration, and configuring Tomcat integration in Eclipse to deploy the compiled code.

Uploaded by

Felipe Costa
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

HowtosetupEclipse,Tomcat,andDSpace

TDLsDSpaceCustomizationTraining May13th2009@Baylor
ThisguidedescribeshowtoinstallandconfigureEclipsewithseveralpluginsto workinadevelopmentenvironmentforDSpacewithTomcat. Versions: Eclipse3.4.x Tomcat5.xor6.x DSpace1.5.x

1) DownloadEclipse
ObtainafreshversionofEclipsefromtheofficialsite.SelecttheEclipseIDEfor JavaDeveloperstypeofdistribution.Oncedownloaded,unpackthesoftware whereyouwouldlikeittobeinstalled.Itisbestifyoudonotstarteclipseyet untilafterstep#2. http://www.eclipse.org/downloads/

2) InstalltheSysdeoTomcatplugin
FirstdownloadtheSysdeoTomcatplugin,thelatestversion,thenuncompress softwareintoEclipsesplugindirectory.NextstartEclipseforthefirsttime.If youhavepreviouslystartedeclipseitmaynotrecognizethenewplugin,inthis caseyouneedtostartEclipsewiththecleanoption. http://www.eclipsetotale.com/tomcatPlugin.html

3) InstalltheSVNplugins
Forthesepluginsyouwillbeabletousethestandardplugininstallprocedure. BeginbyselectingHelp>SoftwareUpdatesfromthemainmenu.Whenthe softwareupdatedialogboxopensselecttheAvailableSoftwaretab.Thenfor eachofthefollowingURLsclicktheAddSitebutton. (Subversiveplugin) http://download.eclipse.org/technology/subversive/0.7/updatesite/ (SubversiveSVNConnectors) http://www.polarion.org/projects/subversive/download/eclipse/2.0/

Nowyoushouldhavethesenewsitesavailable,underneatheachselectthe followingcomponents: SubversiveSVNTeamProviderSources SubversiveSVNJDTIgnoreExtensions SubversiveSVNTeamProvider SubversiveSVNTeamProviderLocalization SubversiveSVNJDTIgnoreExtensions NativeJavaHL1.5Implementation NativeJavaHL1.6Implementation SubversiveSVNConnectors SVNKit1.2.2Implementation SVNKit1.3.0Implementation

ThenclicktheInstallbutton.Followingthistherewillbeseveralscreens aboutlicensesanddependencies,justselecttheappropriateanswerstoinstall theplugins.Whentheprocessiscompleteyouwillbepromptedtorestart Eclipse.

4) InstalltheMavenplugins
Asbefore,forthemavenpluginsyouwillbeabletousethestandardinstall procedure.Again,startbyselectingHelp>SoftwareUpdatesfromthemain

menu.SelecttheAvailableSoftwaretab,andagainaddanewsiteasshow below: http://m2eclipse.sonatype.org/update/ Oncethesitehasbeeninstalled,selecteverycomponentundertheheading MavenIntegrationasshowhere:

ThenclicktheInstallbuttonasbefore.

5) CheckouttheDSpacesourcecode
IftheWelcometabisup,clickthatawaytoreturntotheworkbench.Intheleft handpanelselectNew>Projectfromthecontextmenu.

ThiswillbringupaSelectawizarddialogbox,selecttheProjectfromSVN wizzardandclickthenextbutton.IntheCheckoutfromSVNdialogboxenter thefollowingURLintheappropratefield.Leaveallotherfieldsonthisdialogbox astheirdefaults,thenclicknext. https://dspace.svn.sourceforge.net/svnroot/dspace Youmaybeaskedtoacceptthecertificateoftherepository,acceptit. ThenextdialogscreenthatwillappearisSelectaresource.Inthisdialogbox, clicktheBrowsebuttontoselecttheversionofDSpace.Navigateto dspace/tags/dspace1_5_1andclicktheOKbutton.FinalyclicktheFinished buttonontheselectaresourcedialogbox. ThenextsteppresentstheCheckOutAsdialogbox,selectthelastoption Checkoutasaprojectwiththenamespecified:usinganynameyouchoose.

6) ConfigureMaven
ThenextstepistotellthemavenpluginhowtobuildDSpace.Firstbeginby enablingMaven.Fromtheworkbench,rightclickontheprojecttobringupthe contextmenu,thenselectMaven>EnableDependencyManagement

Thismaytakesometime,waitfortheworkspacetocompleterebuilding.Afterit iscompletetherewillstillbeerrors,youwillneedtoenablenestedmodulesby seletingMaven>EnableNestedModules.Thenagainyoushouldwaitforthe workspacetorebuild.

Finally,DSpaceshouldreportnocompileerrors.Youshouldalsoseeanewsetof foldersinsidetheprojectthatlooksimilartothepicturebelow.

Thenextstepistosetuparuntimebuildcommand.Fromthetoptoolbar,select thegreenarrow>RunConfigurationsasshownbelow:

ThiswillbringuptheRunConfigurationdialogbox.SelecttoaddanewMaven Buildcommand.RightclickonMavenandselecttheNewoptionfromthe contextmenu.

Withanewdefaultmavencommanddetailscreen,filloutthefollowing parametersasshownbelowinthepicture. Name:Package BaseDirectory:ClickBrowseandselectyourproject. Goals:package ParameterName:addaparameterdspace.configwithavalueofthefullpathto yourdspace.cfg

ThenclicktheRunbutton.ThiswillbegintocompileDSpacewhichmaytake sometime.WhenyouneedtorecompileDSpacesimplyselectyourPackage commandfromthedropdownboxbelowthegreenarrow.

7) ConfigureTomcat
FirstsomeglobalparametersneedtobesetupforTomcattoworkinanyproject, thenyourprojectmustbeconfiguredtouseTomcat.Beginbyselectingthemain Eclipsepreferences,Eclipse>Preferencesfromthemainmenu(under windowsthismaybelocatedintheFilemenu)

InsidethePreferencesdialogboxselecttheTomcatoptionfromthelefthand hierarchy.HereselectthecorrectTomcatversion,andenterthefullpathtothe Tomcatdirectory.

NextselecttheTomcatManagerAppfromthelefthandhierarchy.andenter yourTomcatusernameandpassword.ThenclickOK.

Next,theprojectneedstobeconfiguredtouseTomcat.Inthemainmenuselect Project>Properties.SelectTomcatfromthelefthandhierarchy.Enterthe followingfields. CheckisaTomcatprojectcheckbox ContextName:xmlui Subdirectory: dspacexmlui/dspacexmluiwebapp/dspacexmluiwebapp1.5.1

ThenclickOK.

8) Deploywebapplication

Toensurethisworks,startyourTomcat.ThenuseUpdateandReload commandstopublishDSpacesxmluiwebapplicationintoTomcatforeasy testing.

You might also like