Source and Build Directories

3-2 Developing Applications for Oracle WebLogic Server

3.1.1 Source and Build Directories

The source and build directories form the basis of the split development directory environment. The source directory contains all editable files for your project—Java source files, editable descriptor files, JSPs, static content, and so forth. You create the source directory for an application by following the directory structure guidelines described in Section 3.3, Organizing Java EE Components in a Split Development Directory . The top level of the source directory always represents an Enterprise application .ear file, even if you are developing only a single Java EE module. Subdirectories beneath the top level source directory contain: ■ Enterprise Application Modules EJBs and Web applications ■ Descriptor files for the Enterprise application application.xml and weblogic-application.xml ■ Utility classes shared by modules of the application for example, exceptions, constants ■ Libraries compiled.jar files, including third-party libraries used by modules of the application The build directory contents are generated automatically when you run the wlcompile ant task against a valid source directory. The wlcompile task recognizes EJB, Web application, and shared library and class directories in the source directory, and builds those components in an order that supports common class path requirements. Additional Ant tasks can be used to build Web Services or generate deployment descriptor files from annotated EJB code. Figure 3–1 Source and Build Directories The build directory contains only those files generated during the build process. The combination of files in the source and build directories form a deployable Java EE application. Note: The split development directory structure does not provide support for developing new Resource Adapter components. 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