Search code examples
tomcatdeploymentwargradlecargo

How to deploy to local tomcat with gradle-cargo-plugin?


I want to deploy multiple different war dependencies to a local installation of tomcat in the build directory. I found the

bmuschko:gradle-cargo-plugin:0.3

but have no idea to deploy the war file. The plugin provides the task cargoStartLocal but unfortunately the documentation (see https://github.com/bmuschko/gradle-cargo-plugin) of this plugin tells nothing about how to deploy.


Solution

  • With version 0.3 it is not possible to define an arbitrary WAR file to be deployed to a local container. It only uses the artifact of the build script that you apply the plugin to. Currently I am working on a new version of the plugin that will let you define a specific deployable (WAR or EAR file) within its configuration closure. You can expect a new version of the plugin within the next 2 weeks.

    Can you tell me a little bit more about your use case so I can potentially account for it in my plugin code? If I read this correctly you want to deploy multiple WAR files from one specific build script?

    FYI: I'd prefer feature requests and questions via a GitHub issue or email directly. I only found this question by chance. Usually you'll get a faster feedback by directly contacting the developers that wrote the code. I'd be happy to help you with setting up your project and extend my plugin for specific use cases.