public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool implements HotDeploymentTool
In the end, this task assembles the commandline parameters and runs the weblogic.deploy tool in a separate JVM.
HotDeploymentTool
,
AbstractHotDeploymentTool
,
ServerDeploy
ACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE
Constructor and Description |
---|
WebLogicHotDeploymentTool() |
Modifier and Type | Method and Description |
---|---|
protected StringBuffer |
buildArgsPrefix()
Builds the prefix arguments to pass to weblogic.deploy.
|
protected String |
buildDeployArgs()
Builds the arguments to pass to weblogic.deploy for deployment actions
("deploy" and "update").
|
protected String |
buildListArgs()
Builds the arguments to pass to weblogic.deploy for the list action
|
protected String |
buildUndeployArgs()
Builds the arguments to pass to weblogic.deploy for undeployment actions
("undeploy" and "delete").
|
void |
deploy()
Perform the actual deployment.
|
String |
getArguments()
Builds the arguments to pass to weblogic.deploy according to the
supplied action.
|
protected boolean |
isActionValid()
Determines if the action supplied is valid.
|
void |
setApplication(String application)
The name of the application being deployed; required.
|
void |
setComponent(String component)
the component string for the deployment targets; optional.
|
void |
setDebug(boolean debug)
If set to true, additional information will be
printed during the deployment process; optional.
|
void |
validateAttributes()
Validates the passed in attributes.
|
createClasspath, getClasspath, getPassword, getServer, getTask, getUserName, setClasspath, setPassword, setServer, setTask, setUserName
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setTask
protected StringBuffer buildArgsPrefix()
protected String buildDeployArgs()
protected String buildListArgs()
protected String buildUndeployArgs()
public void deploy()
deploy
in interface HotDeploymentTool
deploy
in class AbstractHotDeploymentTool
BuildException
- if the attributes are invalid or incomplete.public String getArguments() throws BuildException
BuildException
- if there is an error.protected boolean isActionValid()
Valid actions are contained in the static array VALID_ACTIONS
isActionValid
in class AbstractHotDeploymentTool
public void setApplication(String application)
application
- A String representing the application portion of the
weblogic.deploy command line.public void setComponent(String component)
<component>:<target1>,<target2>...
Where component is the archive name (minus the .jar, .ear, .war
extension). Targets are the servers where the components will be deployedcomponent
- A String representing the value of the "-component"
argument of the weblogic.deploy command line argument.public void setDebug(boolean debug)
debug
- A boolean representing weblogic.deploy "-debug" flag.public void validateAttributes() throws BuildException
The rules are:
validateAttributes
in interface HotDeploymentTool
validateAttributes
in class AbstractHotDeploymentTool
BuildException
- if the attributes are invalid or incomplete