Deploying from a Split Development Directory Split Development Directory Ant Tasks

Creating a Split Development Directory Environment 3-3 The build and source directory contents can be place in any directory of your choice. However, for ease of use, the directories are commonly placed in directories named source and build, within a single project directory for example, \myproject\build and \myproject\source.

3.1.2 Deploying from a Split Development Directory

All WebLogic Server deployment tools weblogic.Deployer, wldeploy, and the Administration Console support direct deployment from a split development directory. You specify only the build directory when deploying the application to WebLogic Server. WebLogic Server attempts to use all classes and resources available in the source directory for deploying the application. If a required resource is not available in the source directory, WebLogic Server then looks in the applications build directory for that resource. For example, if a deployment descriptor is generated during the build process, rather than stored with source code as an editable file, WebLogic Server obtains the generated file from the build directory. WebLogic Server discovers the location of the source directory by examining the .beabuild.txt file that resides in the top level of the applications build directory. If you ever move or modify the source directory location, edit the .beabuild.txt file to identify the new source directory name. Section 5.1, Deploying Applications Using wldeploy describes the wldeploy Ant task that you can use to automate deployment from the split directory environment. Figure 3–2 shows a typical deployment process. The process is initiated by specifying the build directory with a WebLogic Server tool. In the figure, all compiled classes and generated deployment descriptors are discovered in the build directory, but other application resources such as static files and editable deployment descriptors are missing. WebLogic Server uses the hidden .beabuild.txt file to locate the applications source directory, where it finds the required resources. 3-4 Developing Applications for Oracle WebLogic Server Figure 3–2 Split Directory Deployment

3.1.3 Split Development Directory Ant Tasks

Oracle provides a collection of Ant tasks designed to help you develop applications using the split development directory environment. Each Ant task uses the source, build, or both directories to perform common development tasks: ■ wlcompile—This Ant task compiles the contents of the source directory into subdirectories of the build directory. wlcompile compiles Java classes and also processes annotated .ejb files into deployment descriptors, as described in Section 4.1, Compiling Applications Using wlcompile . ■ wlappc—This Ant task invokes the appc compiler, which generates JSPs and container-specific EJB classes for deployment. See Section 4.2, Building Modules and Applications Using wlappc . ■ wldeploy—This Ant task deploys any format of Java EE applications exploded or archived to WebLogic Server. To deploy directly from the split development directory environment, you specify the build directory of your application. See Section B, wldeploy Ant Task Reference . ■ wlpackage—This Ant task uses the contents of both the source and build directories to generate an EAR file or exploded EAR directory that you can give to others for deployment.

3.2 Using the Split Development Directory Structure: Main Steps