• 1 reply
  • Latest Post - ‏2014-02-04T02:59:21Z by jgawor
4 Posts

Pinned topic Any means to Deploy on Save

‏2014-01-30T23:34:48Z | liberty

Is there any means to auto re-deploy my war to Liberty on save?

I know about the dropins directory but I'd prefer not to have to copy my war there after each change.

Instead can Liberty use what's compiled to my Maven target directory?

  • jgawor
    9 Posts

    Re: Any means to Deploy on Save


    Are you using Liberty Maven plug-in? Or something else to deploy your application to Liberty from Maven?

    As you may know, in Liberty you can use the "application" or "webApplication" element in server.xml to deploy an application. You can use the "location" attribute to specify a file or a directory on the file system to point to your application. In your case, you could set the "location" attribute to point to the archive file (e.g. war file) under the target/ directory. Alternatively, if your Maven build creates uncompressed application directory under the target/ directory first, you could set the "location" attribute to that directory as well.

    By default Liberty is configured to monitor the deployed applications for updates. So, as soon as Maven regenerates the archive file under the target/ directory, Liberty should be able to detect the changes and redeploy the application.