Changes between Version 66 and Version 67 of DeveloperInstructions
- Timestamp:
- 12/09/11 21:10:30 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperInstructions
v66 v67 21 21 ==== Ubuntu 10.04 installation of Java 22 22 23 1.Enable the Partner repository in order to install Sun Java.23 Enable the Partner repository in order to install Sun Java. 24 24 {{{ 25 25 sudo add-apt-repository "deb http://archive.canonical.com/ubuntu lucid partner" … … 73 73 74 74 Change the Eclipse IDE perspective to SVN Repository and create a new project with the option Checkout as maven project, from the address http://develop.ii.edu.mk/svn/isii 75 Maven is supposed to download all necessary files needed to run the application that are listed in the pom.xml (this might actually take very very long depending on the internet connection speed ).[[BR]] 75 Maven is supposed to download all necessary files needed to run the application that are listed in the pom.xml (this might actually take very very long depending on the internet connection speed ). 76 76 77 '''Note:'''If you use Ubuntu, when you choose a plugin, by marking it at the relevant check box, the Next button of the wizard might stay disabled. If this happens, just press ENTER (with the plugin installation window in focus). 77 78 … … 89 90 With these two steps Eclipse will start and won't show a maven related warning. For a linux installation everything is the same just a different path. 90 91 91 The parameters for the database connection and authentication server are configured throught a profile in the user settings.xml file in the .m2 Maven user directory. 92 Before running or building the project, several local parameters should be set. 93 This is done via a standard way of maven profiles, so you should open/create a file named '''settings.xml''' in the '''.m2''' directory in your main OS user profile directory. 92 94 93 95 Sample maven settings.xml file: … … 115 117 </activation> 116 118 <properties> 117 <jdbc.url>jdbc:postgresql://localhost:9999/именабазата</jdbc.url> 118 <jdbc.default_schema>databaseSchema</jdbc.default_schema> 119 <jdbc.username>username</jdbc.username> 120 <jdbc.password>password</jdbc.password> 121 <hib.hbm2ddlauto>validate</hib.hbm2ddlauto> 122 <cas.server>http://localhost:8081</cas.server> 123 <app.server>http://localhost:8081</app.server> 119 <jdbc.url>???????</jdbc.url> 120 <jdbc.default_schema>????????</jdbc.default_schema> 121 <jdbc.username>??????????</jdbc.username> 122 <jdbc.password>??????????</jdbc.password> 123 <hib.hbm2ddlauto>??????????</hib.hbm2ddlauto> 124 <cas.server>??????????</cas.server> 125 <app.server>??????????</app.server> 126 <ldap.addomain>??????????</ldap.addomain> 127 <ldap.baseUserDN>??????????</ldap.baseUserDN> 128 <ldap.bindPassword>??????????</ldap.bindPassword> 129 <ldap.bindUserDN>??????????</ldap.bindUserDN> 130 <ldap.protocol>??????????</ldap.protocol> 131 <ldap.url>??????????</ldap.url> 124 132 </properties> 125 133 </profile> … … 129 137 }}} 130 138 131 Contact the developer team for connection details of the test development server and how to connect to it. Otherwise install PostgreSQL, setup a username, password and create a UTF-8 database, and set the hbm2ddl.auto parameter to update, and the database schema structure will be automatically created.139 You can create several profiles in this file, with different id and activation parameters, so that you can use choose the one you want on running the application, or packaging for deployment. 132 140 133 hbm2ddl.auto=update is used to enable updates in to the database schema structure when the Java source code of the Entities changes, the default value of this parameter is validate. 141 Contact the developer team for parameter values for the development test servers. Otherwise install PostgreSQL, setup a username, password and create a UTF-8 database, and set the '''hbm2ddlauto''' parameter to '''update''', and the database schema structure will be automatically created. 142 143 With hbm2ddlauto=update used, enables updates to the database schema structure when the Java source code of the Entities changes, otherwise the default value of this parameter is '''validate'''. 134 144 135 145 More precisely this parameter designates that the database will be scanned and if the source code has structural changes, such changes will be automatically implemented in the database schema. This should be only used by intenet and it should not be left as default as unwanted changes could be commited to the database by mistake without a warning. So set this to update only when you are about to make database structure changes and then change it back to validate, which only checks that the source and the schema correspond. 136 146 137 If you use another database system then hibernate.dialect should be changed, *but this is not tested*.147 If you use another database system then hibernate.dialect should be changed, '''but this is not tested'''. 138 148 139 149 '''CAS''' … … 149 159 '''Start the application from Eclipse'''[[BR]] 150 160 151 Run -> Run Configurations , then in the maven section right click then New, use any Name you like (for example “start app”), Base Directory -> ${workspace_loc:/projectname} , Goals -> clean jetty:run152 In the parameter add one with the name of *env*, and value of *develop*.161 Run -> Run Configurations , then in the maven section right click then New, use any Name you like (for example '''start dossier'''), Base Directory -> ${workspace_loc:/projectname} , Goals -> '''clean jetty:run''' 162 In the parameter add one with the name of '''env''', and value of '''develop'''. 153 163 154 Repeat this again all the same but with a Name "stop app" and Goals "jetty:stop"164 Repeat this again all the same but with a Name '''stop app''' and Goals '''jetty:stop''' 155 165 156 It should look like this: 157 [[Image(10.jpg ]]166 It should look like this:[[BR]] 167 [[Image(10.jpg)]] 158 168 159 Click on Run and the application will start (some packages will be downloaded from the Internet for the first run).169 Click on Run and the application will begin to build. 160 170 161 On subsequent runs, you can speed up the process if you check the parameter *Offline* in the Maven setting for that run goal. 171 Note that on the first run, Maven will try to download all required libraries for development from the Internet and setup the library paths for all dependencies. This can take a very long time if your connection is not fast. 172 On subsequent runs, this will not happed, but Maven tries to check for changes. If you want to speed up the process, after everything has been run without problems at least once, you should check the parameter '''Offline''' in the Maven parameters for that run configuration. 162 173 163 174 The system listens on port 8081 (Jetty on 8081) 175 http://localhost:8081/ 164 176 165 177 '''Note:''' 166 178 - in log4j.properties in the application folder src/main/resources one should change the line 167 log4j.appender.R.File=/upisi.log во log4j.appender.R.File=/home/username/upisi.log 168 to a location where the user running eclipse has write permission and where the logs should reside. 179 log4j.appender.R.File=/upisi.log or 180 log4j.appender.R.File=/home/username/upisi.log 181 or a location where the user running eclipse has write permission and where the logs should reside. 169 182 170 183 [[wiki:WikiStart Back]]