Using includes and excludes Properties wlcompile Ant Task Attributes Nested javac Options Setting the Classpath for Compiling Code
4.1.1 Using includes and excludes Properties
More complex Enterprise applications may have compilation dependencies that are not automatically handled by the wlcompile task. However, you can use the include and exclude options to wlcompile to enforce your own dependencies. The includes and excludes properties accept the names of Enterprise application modules—the names of subdirectories in the Enterprise application source directory—to include or exclude them from the compile stage. The following line from the helloWorldEar sample shows the appStartup module being excluded from compilation: wlcompile srcdir={src.dir} destdir={dest.dir} excludes=appStartup4.1.2 wlcompile Ant Task Attributes
Table 4–1 contains Ant task attributes specific to wlcompile.4.1.3 Nested javac Options
The wlcompile Ant task can accept nested javac options to change the compile-time behavior. For example, the following wlcompile command ignores deprecation warnings and enables debugging: wlcompile srcdir={mysrcdir} destdir={mybuilddir} javac deprecation=false debug=true debuglevel=lines,vars,source wlcompile4.1.4 Setting the Classpath for Compiling Code
Most WebLogic services are based on Java EE standards and are accessed through standard Java EE packages. The Sun, WebLogic, and other Java classes required to compile programs that use WebLogic services are packaged in the weblogic.jar file in the lib directory of your WebLogic Server installation. In addition to weblogic.jar, include the following in your compilers CLASSPATH: ■ The lib\tools.jar file in the JDK directory, or other standard Java classes required by the Java Development Kit you use. ■ The examples.property file for Apache Ant for examples environment. This file is discussed in the WebLogic Server documentation on building examples using Ant located at: samples\server\examples\src\examples\examples.html ■ Classes for third-party Java tools or services your programs import. Table 4–1 wlcompile Ant Task Attributes Attribute Description srcdir The source directory. destdir The buildoutput directory. classpath Allows you to change the classpath used by wlcompile. includes Allows you to include specific directories from the build. excludes Allows you to exclude specific directories from the build. librarydir Specifies a directory of shared Java EE libraries to add to the classpath. See Chapter 9, Creating Shared Java EE Libraries and Optional Packages. Building Applications in a Split Development Directory 4-3 ■ Other application classes referenced by the programs you are compiling.4.1.5 Library Element for wlcompile and wlappc
Parts
» Oracle Fusion Middleware Online Documentation Library
» Document Scope and Audience WebLogic Server and the Java EE Platform
» Servlets JavaServer Pages Web Application Modules
» EJB Overview EJBs and WebLogic Server
» Java EE Programming Model Packaging and Deployment Overview
» Overview of Java EE Applications and Modules Connector Modules WebLogic Web Services
» Automatically Generating Deployment Descriptors EJBGen Java-based Command-line Utilities
» JMS and JDBC Modules Deployment Plans
» Source Code Editor or IDE Database System and JDBC Driver Web Browser
» Third-Party Software Development Software
» Basic Steps for Using wlserver Sample build.xml Files for wlserver
» What the wlconfig Ant Task Does
» Basic Steps for Using wlconfig wlconfig Ant Task Reference
» query invoke Nested Elements
» Source and Build Directories
» Deploying from a Split Development Directory Split Development Directory Ant Tasks
» Source Directory Overview Enterprise Application Configuration Web Applications
» EJBs Important Notes Regarding EJB Descriptors
» weblogic.BuildXMLGen Syntax Generating a Basic build.xml File Using weblogic.BuildXMLGen
» Organizing Libraries and Classes Shared by Multiple EARs
» Annotation Parsing Deployment View of Annotation Configuration Compiling Annotated Classes
» javax.annotation.PostConstruct javax.annotation.PreDestroy
» Java Classloader Hierarchy Loading a Class
» prefer-web-inf-classes Element Changing Classes in a Running Program
» Configuring Class Caching Java Classloading
» Overview of WebLogic Server Application Classloading Application Classloader Hierarchy
» Custom Module Classloader Hierarchies Declaring the Classloader Hierarchy
» Individual EJB Classloader for Implementation Classes
» Application Classloading and Pass-by-Value or Reference Using a Filtering Classloader
» What is a Filtering ClassLoader Configuring a FilteringClassLoader
» Resource Loading Order WebLogic Server Application Classloading
» About Resource Adapter Classes Packaging Shared Utility Classes Manifest Class-Path
» Using the Classloader Analysis Tool CAT
» Optional Packages Overview of Shared Java EE Libraries and Optional Packages
» Library Directories Versioning Support for Libraries
» Shared Java EE Libraries and Optional Packages Compared
» Assembling Shared Java EE Library Files
» Assembling Optional Package Class Files Editing Manifest Attributes for Shared Java EE Libraries
» Referencing Optional Packages from a Java EE Application or Module
» Web Application Shared Java EE Library Information Using WebApp Libraries With Web Applications
» Best Practices for Using Shared Java EE Libraries
» Understanding Application Life Cycle Events
» Example of Production Deployment Sequence When Using Application Version Life Cycle Events
» Programming Context Propagation: Main Steps Programming Context Propagation in a Client
» Programming Context Propagation in an Application
» Configuring JavaMail for WebLogic Server Sending Messages with JavaMail
» Reading Messages with JavaMail
Show more