Wilco
Wilco

Reputation: 33364

GlassFish: Deploy w/ --force

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?

Upvotes: 3

Views: 6515

Answers (1)

jclingan
jclingan

Reputation: 116

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

Upvotes: 9

Related Questions