Web Logic Workshop (WLW) provides you with full control over the way you build JAR and EAR files from Web Logic applications and their projects. WLW accomplishes this by giving you complete access to the Another Neat Tool (ANT) XML build files that it uses to create these archives. You can customize the contents of these build files to specify the order in which WLW carries out build tasks, introduce new logic in between build steps, or integrate multiple build processes. WLW gives you access to both application-level or project-level ANT build files. The following sections discuss how to edit and use both files to customize your WLW build process.
Customizing Project-Level Builds
If you want to customize the way WLW builds an individual project, you can use the WLW IDE to export the ANT build file that WLW uses to build that project. WLW exports an ANT XML build file entitled exported_build to the home directory of that project. Change this file using syntax that conforms to the Apache ANT Specification. When you are through making your changes, simply reference that file in the project settings of the WLW IDE. When you build the project, WLW will use that custom build file to create the project JAR. For details on customizing a WLW project build, see How Do I: Use a Custom Ant Build for a Project?
If you want to automate the build process, simply use the BEA_HOME/weblogic81/workshop/wlwBuild.cmd and use the appropriate command line switch to specify that you only want to build that individual project. For more information on this command, see wlwBuild command.
Application-Level Builds
If you want to customize the way WLW builds an entire application, you can also use the WLW IDE to export the ANT XML build file that WLW uses to build the application. Like the project-level ANT file, WLW exports an XML file entitled exported_build to the home directory of the application. Use syntax that conforms to the Apache ANT Specification to execute logic from other archives, alter the order of project builds based on some condition, or make any other custom adjustment. Unlike project builds, you cannot execute this build file from within the WLW IDE. Instead you must execute the file using an ANT script. For more information on customizing an application build, see How Do I: Call wlwBuild.cmd from an ANT build.XML file?
Excluding Files From an Application-Level BuildWhen you build a WebLogic Workshop application, the Workshop compiler creates an Enterprise Archive (EAR) file. You can control what files WebLogic Workshop includes in that EAR by editing the excludefilesFromEar attribute in the applications .work file. The excludefilesFromEar attribute is shown below in red:
<option name="excludefilesFromEar" value="[default]" />
Note that WebLogic Workshop automatically sets the value of this attribute
to [default]. This excludes file types with the extensions app, ctrl, dtf, ejbbean,
java, jcs, jcx, jpd, jpf, jsx, jwf, jws, and wlbean by default.