2 Replies Latest reply on Dec 8, 2014 7:39 AM by Alexandros Trifyllis

    Deploy to remote Wildfly using jboss-cli non-interactive script

    Alexandros Trifyllis Newbie

      I am trying to deploy a war using jboss-cli.bat (Windows machine).


      When I run the commands separetly it works:


      > jboss-cli.bat --connect --controller=ip:port --user=admin --password=***

      [standalone@ /] deploy test.war


      Then my application is deployed


      But what I need is to run this non-interactively so it can be run from a build server for example:


      >jboss-cli.bat --commands="connect --controller=ip:port --user=admin --password=***, deploy test.war"


      First if I run this command I get the error:


      'test.war' already exists in the deployment repository (use --force

      to replace the existing content in the repository).


      then I run again the command:


      >jboss-cli.bat --commands="connect --controller=ip:port --user=admin --password=***, deploy test.war --force"

      This time I get no error but the war is not deployed. I can check this by undeploying the war manually and running the command again.


      Any ideas?