Sei sulla pagina 1di 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.

Potrebbero piacerti anche