Targeting War Inside Ear With Weblogic.Deployer is not working
Last updated on JANUARY 11, 2018
Applies to:Oracle Weblogic Server - Version 10.3.3 to 10.3.6
Information in this document applies to any platform.
When deploying and targeting a web application to a virtual host, the module-targeting syntax is inconsistent between deploying to context root and uri. In Deploying Applications and Modules with weblogic.Deployer, "Using Module-Level Targeting for Deploying an Enterprise Application," the following is stated:
You can also use module-level targeting to deploy only a subset of the modules available in an EAR. This can simplify packaging and distribution of applications by packaging multiple modules in a single, distributable EAR, but targeting only the modules you need to each domain.
To target individual modules in an Enterprise application, use the module_name@target_name syntax. For example ...
To deploy to a single WebLogic Server target, list the configured target name after the -targets option to weblogic.Deployer. For example, to deploy a Web application to a configured virtual host named companyHost, use the command:
java weblogic.Deployer -adminurl http://localhost:7001 -username weblogic -password weblogic -deploy -targets companyHost c:\localfiles\myWebApp.ear
This example does not adhere to the module_name@target_name syntax and does not produce the desired targeting. Using -targets myWebApp@companyHost results in the web application appearing not to be targeted when seen in the WebLogic Server Administration Console. In contrast, the module_name@target_name syntax works when deploying to context-root. For example:
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms