Creating a New Project This section addresses using the APLAWS build tools to create a new project, or instance of your project. This may be for development or for use as a staging server. Note: This section assumes that you have all the necessary tools installed for a working development area. The steps for setting up a development environment is beyond the scope of this document. Please consult the installation guide for details. Quick Guide for the Impatient As the root user, create a system login for the development user (). As the root user, set up the new development user as for the development environment with the command ccm-devel-user.sh username () As the development user, start a new APLAWS project with the command ccm-devel-create.pl xxx () Familiarize yourself with the web directory, the dev directory, and CVS (, , , and ). Setting up Users This section should be carried out by the system administrator. The first step is to create accounts for all users who will be developing with APLAWS. This has two steps: Create a system login Create a &CCM; development area Note A user only has to be setup once. Once their system account and &CCM; development environment have been created, they can create any number of projects without having to go through this process again. Creating a system login The following commands will create a new user, set the password for that user and add the user to the ccm-devel group. useradd username passwd username gpasswd username Note These commands are for &RHELAS;. These will be slightly different on other systems, but the effect must be the same. Set Up the Development User with the Development Environment Once a user is created, you need to configure the &CCM; development area for them. This is done with the ccm-devel-user.sh command, which must be executed as root. ccm-devel-user.sh username Starting a new APLAWS project Login as the development user that was just created for you. To start a new project, based on APLAWS we use the . For the project name a good naming scheme would be to concatenate the word aplaws_ with your organization name, e.g. aplaws_herefordshire. Putting those two bits together, we get: bash-2.05b$ ccm-devel-create.pl xxx Installation complete; your server will run on port 9005. You should make a note of this port number. When you have your instance running, you will access it at the URL http://your-server:port/. Note: The port number of your development server can also be found in the configuration file for your servlet container. This is located in /var/ccm-devel/web/username/projectname/conf. Troubleshooting If you make a mistake running this command, you can undo the effects by removing the web and dev directories it created. You will need to rm -rf the following directories: /var/ccm-devel/dev/username /projectname /var/ccm-devel/web/username/projectname The ccm-devel-create.pl command creates two directories for your use. The project web directory and the project dev directory. From this point on, the project dev directory will be refered to as the dev directory. It is important that you do not confuse the two directories,the web directory is for your web server and should not be modified directly. The project on the other hand is your dedicated working area. Since your project will be based on APLAWS also important to note the function of the shared source directory where the APLAWS code lives. Dev Directory The dev directory is located at /var/ccm-devel/dev/username/projectname. This is the directory that will contain all your custom code. When you use ant to deploy your code, the Java, jsp, and XSL in this directory will be compiled and placed in the appropriate locations in the web directory. The contents of this directory is discussed in more detail in the section. Web Directory The web directory is located at /var/ccm-devel/web/username/projectname. This area is dedicated to your application server. All content in this directory except for the conf subdirectory, should be reproducible from the contents of the dev directory and the shared source directories. You should never make changes directly in this directory. Shared Source Directory The shared source directory is at /usr/share/ccm-devel/projects/aplaws-xxx. This is where the APLAWS code base lives, the files here should not be modified, and only used as a reference. The code in this directory and the code in the project directory is complied and placed in the web directory for use by the web server. CVS If you installed the ccm-devel-cvs package, the system will automatically perform some CVS tasks for you. Namely: Create a new CVS module Check out an existing CVS module When you create a new project the system will check to see if there is already a CVS module by the same name. For example, of you created a project called aplaws_camden, it will look for a CVS module called aplaws_camden. Depending on whether or not the CVS module already exists, it will create or use it as appropriate. Note This is the only way in which CVS is directly used by the build tools. If have a good understanding of CVS and have more complicated requirements, it is quite safe to change the default setup after it has been created. For further reference on CVS please refer to the CVS manual.