3

When I attempt to deploy a war usig the --force option, it works, but I get this response:

Deprecated syntax, instead use:
asadmin --passwordfile password --host localhost --user admin deploy [options] ...

When using the newer syntax, how do I still specify the --force option? Adding anything other than the .war file after "deploy" results in this message:

Command deploy only accepts one operand

Any ideas?

Wilco
  • 32,754
  • 49
  • 128
  • 160

1 Answers1

9

Quick answer: Move the --force after the "deploy" command:

asadmin --passwordfile password --host localhost --user admin deploy --force myapp.war

Here's a step-by-step explanation. First, the asadmin command line format:

asadmin [asadmin options] command [command options].

First, specify the asadmin options:

asadmin --passwordfile password --user admin --host localhost command [command options]

Next, specify the command you are interested in:

asadmin --passwordfile password --user admin --host localhost deploy [command options]

Next, specify command options.

asadmin --passwordfile password --host localhost --user admin deploy --force myapp.war

jclingan
  • 116
  • 1
  • I attempted this very structure when attempting to execute it from an ANT build script. I will try via the command line directly to ensure it wasn't an issue on the ANT side of the equation... – Wilco Dec 10 '10 at 17:34