Customizing the Build Process

WebLogic Workshop provides you with full control over the way you build JAR and EAR files from WebLogic applications and their projects. WebLogic Workshop 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 WebLogic Workshop carries out build tasks, introduce new logic in between build steps, or integrate multiple build processes. WebLogic Workshop 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 WebLogic Workshop build process.

Customizing Project-Level Builds

If you want to customize the way WebLogic Workshop builds an individual project, you can use the WebLogic Workshop IDE to export the ANT build file that WebLogic Workshop uses to build that project. WebLogic Workshop 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 WebLogic Workshop IDE. When you build the project, WebLogic Workshop will use that custom build file to create the project JAR. For details on customizing a WebLogic Workshop 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 WebLogic Workshop builds an entire application, you can also use the WebLogic Workshop IDE to export the ANT XML build file that WebLogic Workshop uses to build the application. Like the project-level ANT file, WebLogic Workshop 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 WebLogic Workshop 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 Build

When 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.

Related Topics

How Do I: Use a Custom Ant Build for a Project?

How Do I: Call wlwBuild.cmd from an ANT build.XML file?

wlwBuild Command

Apache Ant 1.5.4 Manual