User's Manual

40 Chapter 7. Developing with WAF
CMS and Other Projects
To add CMS or other projects to Eclipse, follow the same steps as for adding WAF, with the
following exceptions:
For CMS and other projects that depend on WAF, you do not need to add external JARs.
Eclipse will pick up these libraries from WAF.
When you reach the Java Settings dialog box, select the Projects tab. For CMS, add a de-
pendency upon WAF. For projects that use both WAF and CMS, add a dependency upon both
WAF and CMS.
Create build folders for the respective projects.
7.4.3.2. Configuring Eclipse for Perforce
For each project that you have added, go to the Package Explorer and right-click on it. Then, select
Team =
Share Project. Select the options for Perforce. Now, you should see a Perforce menu and
Perforce options for your source files.
7.4.3.3. Building and Deploying with Eclipse
Eclipse uses its own build directories for compiling your source files. However, you will probably still
want to use the WAF build system for building and deploying your application. Therefore, you should
create a shell script that will do this for you. Then, you may call this shell script to build and deploy
WAF from within Eclipse when you are ready to run your application.
Here is an example shell-script, which should be modified appropriately to fit the target environment.
#!/bin/bash
#setup environment
. /etc/profile.d/ccm-config.sh
. /etc/profile.d/ccm-devel.sh
. /etc/profile.d/ccm-scripts.sh
CCM_HOME=/var/ccm-devel/dev/user/cms_dev
ORACLE_HOME="/opt/oracle/product/9.2.0"
JAVA_HOME=/opt/IBMJava2-131
CLASSPATH=$CCM_HOME/core-platform/lib/jaas.jar
CLASSPATH=$CLASSPATH:$CCM_HOME/core-platform/lib/jce.jar
CLASSPATH=$CLASSPATH:$CCM_HOME/core-platform/lib/sunjce_provider.jar
CLASSPATH=$CLASSPATH:$CLASSPATH:$ORACLE_HOME/jdbc/lib/classes12.zip
CLASSPATH=$CLASSPATH:$CCM_HOME/core-platform/etc/lib/iDoclet.jar
export CLASSPATH
export ANT_OPTS="-Xms128m -Xmx128m"
##########
#build
##########
#uncomment to make enterprise.init
#cd $CCM_HOME
#ant make-config
#ant make-init