Development: SetupThis document describes how to set up a local development copy of the project directory. Starting OutDevelopment setup is a three step process: Repository Check OutFirst, check out the sources from the SVN repository.
Alternatively you may of course also use a graphical SVN client or use the SVN repository browser of your favourite IDE (the project repository already contains preconfigured settings for Eclipse). Build Environment ConfigurationThe OpenPERMIS build environment is Ant based. However, instead of relying on your installation of Ant (which may or may not be the correct version) the OpenPERMIS project comes with a bundled version of Ant that includes all the extensions necessary for the build. All that you need to install/provide in order to build OpenPERMIS is a JDK >= 5.0. In the following all files mentioned are listed relative to the toplevel directory of the project directory. Also, all build commands should be executed from the toplevel directory of the master module. Site and User Specific Configuration FilesTo keep site and user specific information out of the build process the build tools use the following configuration files:
The build script first imports the site specific configuration file and then launches ANT which in turn imports the following files:
build.xml >
env/user.xml >
env/site.xml
Thus, the user configuration overrides the site configuration which in turn overrides the default values. To create and/or configure the site and user specific configuration files refer to the sections Semi-automated Setup or Manual Setup below. Semi-automated SetupThere is a small setup script which will help you conduct the steps outlined in the manual setup section below. In the toplevel directory execute: On Unix / Mac OS X: sh build.sh setup ${USER} ${SITE} or on Windows: build setup %USER% %SITE% Where ${USER} or %USER% denotes your username and ${SITE} or %SITE% represents the name of the site or your computer. Once the configuration files are in place and the site specific path to the JDK >= 5.0 is set proceed to perform the Initial Build. Manual SetupIf you want to prepare the setup manually perform the following steps:
Commands to execute on Unix / Mac OS X: cd env ln -s configuration/site_${SITE}.sh site.sh ln -s configuration/site_${SITE}.xml site.xml ln -s configuration/user_${USER}.xml user.xml or on Windows: cd env copy configuration\site_%SITE%.cmd site.cmd copy configuration\site_%SITE%.xml site.xml copy configuration\user_%USER%.xml user.xml Windows Tip: Always modify the files in the configuration directory if you want to check-in the changes and the run the setup command again. Initial BuildSome portions of the documentation (API documentation and some other HTML pages) are generated automatically. So your initial setup process should build this documentation in the next step. But also after a later update it is good practice to proceed with the next step to ensure that everything is correctly (re-)built. To create all generated sources and documentations and to compile all parts of the project the build tool build.sh (Unix / Mac OS X) or build.cmd (Windows) has to be started with the target world. On Unix / Mac OS X: sh./build.sh world or on Windows: build world Unix / Mac OS X Tip: Make the build script executable if it isn't already (e.g. using chmod a+x ./build.sh) and create an alias for it using alias build 'sh ./build.sh'. Now you can execute build targets simply by issuing commands like build world. After all these steps all parts of the whole project is built and the documentation should be complete. The targets of the master build file are listed on the Build Environment page (this page is only avaible once build world has been run). |