Reputation: 10335
I have task to deploy my grails application on remote office. It was far from my current location and it would be waste of time to travelling there to send update. But I got another problem, we have slow, unreliable and limited quota for internet connection (3rd world country problem). 1 war file is about 55-60 MB. I also don't want to send my code to them and let them compile and run it.
Could we use SVN/GIT just to send the update of compiled class to them ? if yes, how to do that ?
Upvotes: 0
Views: 77
Reputation: 61
If your application is having <Context reloadable="false" />
then
You can simply replace the class files(which are changed) in the location
apache-tomcat/webapps/applicationName/WEB-INF/classes
Upvotes: 1
Reputation: 1970
You could use something like rsync (or robocopy if you're on Windows) to copy to your remote office. That way, for each update, only the changed parts need to be transferred over the network and you should have less data sent. You could rsync the WAR file itself, or a directory which is the WAR file exploded (uncompressed). One might be more efficient with network traffic than the other, but you'd have to test that yourself if you wanted to go that far.
Also, don't forget that Groovy is compiled down to Java class files. So even if they don't have your source code they can decompile the class files and get source out of it (even though it won't be as pretty). This is worth remembering if you have any "secrets" (database password, etc.) in your source code.
Upvotes: 0