Sun N1 Service Provisioning System User's Guide for BEA WebLogic 8 Plug-In 3.0

ProcedureHow to Compile the Sample Application

Before you install the Avitek Medical Records sample application, you must compile the application. Follow these steps.

Steps
  1. If you created a domain for the sample application, source the environment script in the sample application domain directory.


    # BEA-InstallDirectory/user_projects/domains/medrec/setMedRecEnv.sh
    

    In the previous example, BEA-InstallDirectory specifies the BEA WebLogic home directory, for example, /export/home/bea.

  2. Change directories to the src directory of the sample application.


    # BEA-InstallDirectory/weblogic81/samples/server/medrec/src
    
  3. Use the ant build utility to build the sample application source.


    # ant
    
  4. Create an XML file named package.xml with content that is similar to the following example.

    <project name="tutorial" default="package">
             <target name="package">
                <wlpackage srcdir="/export/home/bea/weblogic81/samples/server/medrec/src/medrecEar"
                           destdir="/export/home/bea/weblogic81/samples/server/medrec/build/medrecEar"
                           toFile="/export/home/bea/weblogic81/samples/server/medrec/dist/medrecEar.ear" />
             </target>
         </project>

    In the wlpackage element, change the paths for srcdir, destdir, and toFile to point to the appropriate directories on your system.

  5. Save this file to the BEA-InstallDirectory/weblogic81/samples/server/medrec/src/medrecEar directory.

  6. Repeat Step 4 and Step 5 to create package.xml files for the physicianEar and startupEar directories.

    Change the paths for srcdir, destdir, and toFile to point to the appropriate physicianEar and startupEar directories. Save each package.xml file to the appropriate subdirectory of the BEA-InstallDirectory/weblogic81/samples/server/medrec/src directory.

  7. Use the ant build utility in each EAR directory to update the build with the contents of the package.xml file.


    # cd BEA-InstallDirectory/weblogic81/samples/server/medrec/src/EAR-dir
    # ant -f package.xml
    

    In the previous example, EAR-dir specifies either the medrecEar, the physicianEar or the startupEar directory.

    The medrecEar.ear, the physicianEar.ear, and the startupEar.ear files are created in the BEA-InstallDirectory/weblogic81/samples/server/medrec/dist directory.