3.2.1.2  Creating the Source Tree in CVS and Configuring the Build Scripts 
This Section describes how to set up the source tree shown in Figure 5 within the CVS 
repository created under Section 3.2.1.1. 
   Step 1: Before you create the directory tree in CVS, you need to create a local copy of the 
directory structure in your home directory. 
$ cd ~
(The ~ symbol is a variable containing the current
$ mkdir myApp
user's home directory)
$ cd myApp
$ mkdir etc
$ mkdir lib
$ mkdir src
$ mkdir web
   Step 2: Create the initial project in CVS using the cvs import command. Replace {username} 
with your Linux user name.  
$ cvs import  m "Initial project creation" myApp {username} start
You can verify that the project was created correctly in CVS by renaming the original 
directory to keep it as backup, and performing a checkout: 
$ cd ..
$ mv myApp myApp.bu
$ cvs checkout myApp
   Step 3: Create and customize the build scripts for your application. As mentioned earlier, the 
Apache Software Foundation already provides build files as a basis. These files require the 
Apache  Ant  make utility to run, which is usually included in the Tomcat distribution and 
does not need to be installed separately. However, if Ant is not yet installed on your system, 
you may download it from 
http://jakarta.apache.org/ant/
 (Documentation is available at this 
Web address, too). 
Download the files build.xml and build.sh, and place them in your local myApp/ directory. 
Links to the files can be found within the document 
http://jakarta.apache.org/tomcat/jakarta 
tomcat/src/doc/appdev/
. 
34 




Java Web Hosting Application Development Using Java Technologies Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.