Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 427
Wilco Avatar asked Jun 25 '26 19:06

Wilco


1 Answers

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

like image 112
jclingan Avatar answered Jun 27 '26 09:06

jclingan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!