Вы находитесь на странице: 1из 16

HanoverProjectSetup

Pleaseupdatethisdocumentasyouwalkthroughanyofthesestepsandhaveanyadditional
steps/advice/tips.Thisisalivingdocumentfortheproject.

SoftwareandVersions
EclipseKeplermakesureandtaketheEEforDevelopersversion:
https://www.eclipse.org/downloads/packages/eclipseidejavaeedevelopers/keplersr2
Tomcat7.0(Hanoverwillbeusing7.0.25):
http://archive.apache.org/dist/tomcat/tomcat7/v7.0.25/bin/
(apachetomcat7.0.25windowsx64.zip)
Oracle11g(developmentwillbeusingOracleExpress):O:\Oracle\oracle11.2_xe_x64
SQLDeveloper(Oracle):O:\Oracle\sql_developer_4.0.2_x64
OracleDrivers(ifneeded):O:\Oracle\drivers
APSubversionroot:http://subversion.agencyport.com/hanover
Subclipseplugin:http://subclipse.tigris.org/update_1.10.x(makesurethisisinEclipse
plugins,otherwiseinstall)
HanoverwillbeusingGit,detailstofollow
Java1.7(Identifyaversiontheywillrun?)usingjdk1.7.0_67:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7downloads1880260.htm
l(makesureandtakeanSEDevelopmentKit)
PuTTY(ifneeded):http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
MavenPluginforEclipse

Oracle11gInstallation

DatabaseInstallation
Oracle11gcanbefoundin:
O:\Oracle\oracle11.2_xe_x64\OracleXE112_Win64.zip

Findandrunthesetup.exeafterexpandingthezipfile
Setpasswordtopasswordsoweareallinalignment.Sotherootcredentialswillbe:
User:system
Pwd:password

SQLDeveloperInstallation
SQLDevelopercanbefoundin:

O:\Oracle\sql_developer_4.0.2_x64\sqldeveloper4.0.2.15.21x64.zip

Unzipthedownloadintoadirectory(notaninstallable).

EclipseProjectSetup

PreferredProjectlocation:C:/Projects/Hanover

Createanewworkspaceintheabovelocation

CreateanewJavaprojectinEclipsenamedportalusingthefollowingSVNURL:
http://subversion.agencyport.com/hanover/agencyportal/trunk

CreateanewJavaprojectinEclipsenamedconnect5usingthefollowingSVNURL:
http://subversion.agencyport.com/hanover/connect5/trunk

CreateanewgenericprojectinEclipsenamedresourcesusingthefollowingSVNURL:
http://subversion.agencyport.com/hanover/resources

YoumayalsowanttoaddadocumentsprojectaswellusingthisURL:
http://subversion.agencyport.com/hanover/documentation

Oncecreated,yourworkspaceshouldlookcloseto:

OncetheprojectshavebeencreatedinEclipseyoullwanttoupdatethePortalproject,via
Maven(NotethatonlythePortalprojectsupportsMavenatthistime).

RightmouseclickonthePortalprojectselectMavenandthenUpdateProject

YoushouldalsodownloadtheassociatedsourcefromMaven.RightmouseclickonthePortal
projectselectMavenandthenDownloadSources

Suggested:Updatevalidationtoignorejs/dtd/jsp/xml/xslerrors

SetupyourTomcatServerinEclipse:

1. IfyoudontalreadyhaveaServersview,addone.GotoWindow/ShowView/Other

ChooseServer/Servers&clickOK

2. Clickthelinktocreateanewserver,orrightclickintheopenareabelowandselectNew

3. SelectApache/Tomcat7.0andclickNext

4. SelectyourTomcatinstallationdirectoryandsetJREversiontoJava7

5. ClickAddAllandthenFinish

6. MergeContextfromcheckedinServers.xmlfiletoTomcat/conf/Servers.xmlfile:
(addthefollowingafter<Valve/>andbefore</Host>)

<ContextallowLinking="true"docBase="portal"path="/portal"
reloadable="false"source="org.eclipse.jst.jee.server:portal">

<!OracleServer>

<Resourceauth="Container"description="Oracledatabasefor
AgencyPortal"driverClassName="oracle.jdbc.driver.OracleDriver"maxActive="100"
maxIdle="30"maxWait="10000"name="agencyportal"password="agencyportal"
type="javax.sql.DataSource"url="jdbc:oracle:thin:@//localhost:1521/xe"
username="agencyportal"/>

</Context>

<ContextallowLinking="true"docBase="connect5"path="/connect5"
reloadable="false"source="org.eclipse.jst.j2ee.server:connect5">

<!OracleServer>

<Resourceauth="Container"description="Oracledatabasefor
Connect5"driverClassName="oracle.jdbc.driver.OracleDriver"maxActive="100"
maxIdle="30"maxWait="10000"name="connect5"password="connect5"
type="javax.sql.DataSource"url="jdbc:oracle:thin:@//localhost:1521/xe"
username="connect5"/>

<!OracleServer>

<Resourceauth="Container"description="Oracledatabasefor
AgencyPortal"driverClassName="oracle.jdbc.driver.OracleDriver"maxActive="100"
maxIdle="30"maxWait="10000"name="agencyportal"password="agencyportal"
type="javax.sql.DataSource"url="jdbc:oracle:thin:@//localhost:1521/xe"
username="agencyportal"/>

</Context>

7. Modifyserversettings.
DoubleclickonTomcatServerinServerstab

ChangeHTTP/1.1portnumberto8081toavoidconflictwithdatabase
IntheServerLocationssectionselecttheUseTomcatinstallationoption
ChangeDeployPathtowebappsfromwtpwebapps
Ctrlstosavechanges

SetJVMparameter:Dagencyport.env=local

CreateyourownlocalpropertiesfileintheWEBINFdirectory.Copyoneoftheexisting
<username>.propertiesfilesandrenameitto<yourdomainname>.properties.Therearea
coupleofpropertiesthatyoumayhavetoedit:

my_portal_app_port=8080ThisportnumbershouldcorrespondtotheportyouselectedfortheTomcat
server.
solr_home=C:/Users/ecole/workspace/resources/SOLR_HOMEThispathcorrespondstotheabsolute
pathofSOLRcomponentsinyourworkspace.

Youalsomayhavetoupdateyourlocal.intkit.propertiesfileifyousetyouTomcatporttoavalueotherthan
8081.Makesurethetheportnumberlistedinthec5_domainpropertymatchesyourTomcatport.

PortalDatabaseCreation

ReadthefollowingfileforPortaldatabasecreationinformation

/portal/WebRoot/sql/install/000_readme.txt

IfforanyreasonyouchangedthedirectoryoftheOracleExpressinstallationyouwillhaveto
makeanupdateinthe/portal/WebRoot/sql/install/001_apwebapp_createTablespace.sqlto
reflectthealternatedirectory.

1) UsingSQLDevelopercreateaconnectiontothedatabaseandloginassystem

2) Run/portal/WebRoot/sql/install/001_apwebapp_createTablespace.sql
3) Run/portal/WebRoot/sql/install/002_apwebapp_createUser.sql
4) logoutandthenlogininusingthenewagencyportaluserid(user:agencyportalpwd:
agencyportal)
5) RunthecreateconsolidatedscriptANTtargetinthesql.xmlANTscript
6) Runtheoutputfilefromthe$distfolder(mayneedtorefreshthesqlfoldertoseethefile).
MakesureandrunitasaScriptandnotaStatement

C5DatabaseCreation

ReadthefollowingfileforPortaldatabasecreationinformation

/connect5/sql/oracle/install/000_connect5_readme.txt

IfforanyreasonyouchangedthedirectoryoftheOracleExpressinstallationyouwillhaveto
makeanupdateinthe
/connect5/sql/oracle/install/100_connect5_createTablespace_and_createUser.sqltoreflectthe
alternatedirectory.

1) UsingSQLDevelopercreateaconnectiontothedatabaseandloginassystem
2) Run/connect5/sql/oracle/install/100_connect5_createTablespace_and_createUser.sql
3) logoutandthenlogininusingthenewconnect5userid(user:connect5pwd:connect5)
4) Run/connect5/sql/oracle/install/200_connect5_createtables.sql.Makesureandrunitas
aScriptandnotaStatement

Testing&Running
YoucanstarttheTomcatserverasfollows(inEclipse):

a.RightclickonTomcatServerinServerstab
b.SelecteitherRunorDebug
c.StatusshouldchangetoStarting
d.Bringupconsoleviewtoseelogmessages

Thefollowingstepsareonlyneededforafromscratch
installation.

(Note:Ifyouvecheckedouttheprojectfromsourcecodecontrol,thescriptsshouldbeinyour
portalprojectin:C:\projects\Hanover\portal\WebRoot\sql\apwebapp).

Findsqlscripts:
http://10.21.39.108:8081/nexus/#viewrepositoriessnapshots~browsestorage

ChangethedatafilelocationincreateTablespace.sqltobe:

'c:/oraclexe/app/oracle/oradata/XE/agencyportal.dbf'
AndthenruncreateTablespace.sql


RunSQLDeveloperinC:\sqldeveloper\sqldeveloper.exe

Createaconnectionforsystem/passwordandConnecttoit.

RunthefollowingSQLcommandsbypastingthemintotheWorksheettabareaandclickingthe
Playbutton:
createuseragencyportalidentifiedbyagencyportaldefaulttablespaceagencyportal
grantcreatesessiontoagencyportal
grantallprivilegetoagencyportal

CreateandopenanewconnectioninSQLDeveloperasagencyportal/agencyportal,andrunthe
followingSQLbypastingthefilecontentsintotheWorksheettabareaandclickingPlay.
create_tables.sqlscript
GetNextKeyValue.sql

ForACSISecurityrunthefollowingscripts(asabove)
acsisecurity/create_fine_grained_permissions_model.sql
acsisecurity/load_fine_grained_permissions_model.sql

+Maven
ThissectionisnotneedediftheHanoverSVNrepositoryisavailable.

FollowsetupasdefinedinDeveloperSetupGuide
Notesforeachstep:
a.1:key1
a.2:pickaversion,thelatest
b:com.hanover
c:portal
d:forversion,keepdefault
e:forpackage,keepdefault
f:enterytoconfirm

MavenUpdate
Inpom.xml,updatethereferencetolatestversion:

(Note:Thismay/shouldalreadybeupdatedinthecheckedinpom)

<properties>

<agencyport.sdk.version>5.0.0X</agencyport.sdk.version>
</properties>

RightclickonprojectMavenUpdateProject

*Note:IfyoudonotseeMaveninthepopupmenu,makesureitisinstalled/includedinyour
Eclipseinstallation.YoucandothisbygoingtoHelp/Aboutandlookingattheiconsform2e.If
itsnotthere,youcaneithergetithere,orinstallaversionofEclipsethatcomesbundledwithit
(JEEorStandardshouldwork).

Also,itispossiblethatyouhaveMaveninstalled,buttheprojectisntcurrentlyrecognizedifyou
arestillnotseeingitinthecontextmenu.Tofixthis,rightclickontheprojectandselect
Configure.ThenchooseConverttoMavenProject.Afterthis,youshouldnowhaveaMaven
menuitemintherightclickcontextmenu.

Mergeaptemplates_core.jartopickupbaseobjectchanges(thewebdirectory)
Note:Thisstepisonlynecessaryinafromscratchsetup.Therightfilesshouldbecheckedin
tosvn.

Clearingoflogs/workitemsinAgencyPortal

Cleardatabaseofworkitems
work_item
xmlstore
account
auto_save_store
audit_tables(core,misc,rule,status,workitem,xmlstore)
Clearsolrdataforbothaccountsandworkitems
*(seesolr_homepropertyinusername.properties/framework.properties)
**(thishasntyetbeenconfirmedasappropriatestepstocomplete)
C:\Projects\Hanover\SOLR_HOME\worklist\data
C:\Projects\Hanover\SOLR_HOME\account\data

Connect5Setup

Database:Runthefollowingsqlscriptsassystemuser
create_user.sql
reload.sql?(Billiscreatingafreshdatabasenow.Oneofthesescriptshaslots
oferrors,wewillreportbackwhatneedstorun)
update.sql?

Clearingoflogs/datainConnect5

Cleardatabasetables/logs
YoucantruncatealltablesintheConnect5schemanoneofthemhave
transactionaldata
logsstoredinoutput_dirinframework.properties

Вам также может понравиться