Search code examples
maven-plugintomcat7production-environmentmaven-cargo

Java | Maven - Plugins | Is it suggested to use cargo maven plugin in production environment ?


Currently we have a script that does maven build + tomcat deploy.

Deploying to tomcat involves stopping the server (force stop by setting CATALINA_PID), deleting war file and exploded folder from its webapps directory, copying new war file to webapps/ , deleting tomcat work directory and finally starting the server.

Can we achieve all/most of these using cargo-maven2 plugin (cleaning work/webapps ??) [ I have a basic config that can be used to just stop,deploy and start ]

And is it good to use the plugin in production environment as well ? The documentation mentions that its useful for integration tests.

Can you guys share your thoughts on this?

Thanks,
Gayathri


Solution

  • As you already mentioned from the docs Cargo is for functional testing. For production you should use other things like puppet or chef. Furthermore Maven is not a deployment tool it's a build tool. From a technical point of view it's of course possible to use it in production but it's not intended.