Changes between Version 66 and Version 67 of DeveloperInstructions


Ignore:
Timestamp:
12/09/11 21:10:30 (13 years ago)
Author:
Vangel Ajanovski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperInstructions

    v66 v67  
    2121==== Ubuntu 10.04 installation of Java
    2222
    23 1. Enable the  Partner repository in order to install Sun Java.
     23Enable the  Partner repository in order to install Sun Java.
    2424{{{
    2525sudo add-apt-repository "deb http://archive.canonical.com/ubuntu lucid partner"
     
    7373
    7474Change 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]]
     75Maven 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
    7677'''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).
    7778
     
    8990With 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.
    9091
    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.
     92Before running or building the project, several local parameters should be set.
     93This 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.
    9294
    9395Sample maven settings.xml file:
     
    115117            </activation>
    116118            <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>
    124132            </properties>
    125133        </profile>
     
    129137}}}
    130138
    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.
     139You 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.
    132140
    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.
     141Contact 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
     143With 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'''.
    134144
    135145More 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.
    136146
    137 If you use another database system then hibernate.dialect should be changed, *but this is not tested*.
     147If you use another database system then hibernate.dialect should be changed, '''but this is not tested'''.
    138148
    139149'''CAS'''
     
    149159'''Start the application from Eclipse'''[[BR]]
    150160
    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:run
    152 In the parameter add one with the name of *env*, and value of *develop*.
     161Run -> 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'''
     162In the parameter add one with the name of '''env''', and value of '''develop'''.
    153163
    154 Repeat this again all the same but with a Name "stop app" and Goals "jetty:stop"
     164Repeat this again all the same but with a Name '''stop app''' and Goals '''jetty:stop'''
    155165
    156 It should look like this:
    157 [[Image(10.jpg]]
     166It should look like this:[[BR]]
     167[[Image(10.jpg)]]
    158168
    159 Click on Run and the application will start (some packages will be downloaded from the Internet for the first run).
     169Click on Run and the application will begin to build.
    160170
    161 On subsequent runs, you can speed up the process if you check the parameter *Offline* in the Maven setting for that run goal.
     171Note 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.
     172On 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.
    162173
    163174The system listens on port 8081 (Jetty on 8081)
     175http://localhost:8081/
    164176
    165177'''Note:'''
    166178- 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.
     179log4j.appender.R.File=/upisi.log or
     180log4j.appender.R.File=/home/username/upisi.log
     181or a location where the user running eclipse has write permission and where the logs should reside.
    169182
    170183[[wiki:WikiStart Back]]