4
votes

I would like to:
1. stop tomcat server on remote machine (Windows Server 2012)
2. delete/clean war on the server (from webapps tomcat folder)
3. deploy war file on Tomcat (copy it in webapps tomcat folder)
4. copy client jar file and jnlp file into webapps tomcat folder
5. start Tomcat

My idea is to use ftp for copying files (I have enabled this on Windows Server 2012). But I don't know how to do this using gradle? And it leaves unknown to me how to stop/start Tomcat server?

What is recommanded way to do this with gradle?

Thnaks in advance.
Best regards,
mismas

1
Is that plugin helpful: github.com/bmuschko/gradle-tomcat-plugin ?Opal
It says "This plugin also can't deploy a WAR file to a remote container" and to use Cargo plugin instead. But I don't understand how based on the given examples ... Could you please direct me a litlle bit. Thanks!mismas
It seems that the configuration should be passed via cargo extension.Opal
I don't understand how. Can you clarify it? Thanks :)mismas
Take a look at the documentation for the cargo plugin. github.com/bmuschko/gradle-cargo-pluginMark Vieira

1 Answers

1
votes

Solution was to log in with username: tomcat, password: tomcat (not the credentials used when connecting through remote desktop - mstsc). Plus I had to add manager-script role to tomcat user in tomcat-users.xml file, in order to resolve exception "The username you provided is not allowed to use the text-based Tomcat Manager (error 403)".