Integrating Shared Java EE Libraries with the Split Development Directory Environment Deploying Shared Java EE Libraries and Dependent Applications

9-14 Developing Applications for Oracle WebLogic Server java weblogic.appmerge -output CompleteSportsApp.ear -library Weather.war,Calendar.ear SportsApp.ear

9.5.2 Using weblogic.appmerge as an Ant Task

The ant task provides similar functionality as the command line utility. It supports source, output, libraryDir, plan and verbose attributes as well as multiple library sub-elements. Here is an example: taskdef name=appmerge classname=weblogic.ant.taskdefs.j2ee.AppMergeTask appmerge source=SportsApp.ear output=CompleteSportsApp.ear library file=Weather.war library file=Calendar.ear appmerge

9.6 Integrating Shared Java EE Libraries with the Split Development Directory Environment

The BuildXMLGen includes a -librarydir option to generate build targets that include one or more shared Java EE library directories. See Section 3.5, Generating a Basic build.xml File Using weblogic.BuildXMLGen . The wlcompile and wlappc Ant tasks include a librarydir attribute and library element to specify one or more shared Java EE library directories to include in the classpath for application builds. See Section 4, Building Applications in a Split Development Directory .

9.7 Deploying Shared Java EE Libraries and Dependent Applications

Shared Java EE libraries are registered with one or more WebLogic Server instances by deploying them to the target servers and indicating that the deployments are to be shared. Shared Java EE libraries must be targeted to the same WebLogic Server instances you want to deploy applications that reference the libraries. If you try to deploy a referencing application to a server instance that has not registered a required library, deployment of the referencing application fails. See Registering Libraries with WebLogic Server in Deploying Applications to Oracle WebLogic Server for more information. See Install a Java EE Library for detailed instructions on installing deploying a shared Java EE library using the Administration Console. See Target a Shared Java EE Library to a Server or Cluster for instructions on using the Administration Console to target the library to the server or cluster to which the application that is referencing the library is also targeted. If you use the wldeploy Ant task as part of your iterative development process, use the library, libImplVer, and libSpecVer attributes to deploy a shared Java EE library. See Appendix B, wldeploy Ant Task Reference, for details and examples. After registering a shared Java EE library, you can deploy applications and archives that depend on the library. Dependent applications can be deployed only if the target servers have registered all required libraries, and the registered deployments meet the version requirements of the application or archive. See Deploying Applications that Reference Libraries in Deploying Applications to Oracle WebLogic Server for more information. Creating Shared Java EE Libraries and Optional Packages 9-15

9.8 Web Application Shared Java EE Library Information