This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am currently working on a project that requires me to make frequent minor changes to my war file. My war file is about 50 mb and my home internet connection is not great so it is taking 10 or 15 minutes to upload to my webapps directory to redeploy.
I am looking for a quicker way to do this. I could put all my dependency jars in my tomcat lib to make the war file smaller as these take up about 45mb of the 50 mb but for various reasons I dont want to do this.
I had thought about installing subversion and a maven repository on my server and building my war file on the server rather than my local machine but I am not sure if this is the best way to go. I have had quite a bit of experience with maven and svn/cvs but I have always built my war file locally using maven or ant in eclipse then uploaded it. If I did install them on my server would I be best building the war from the command line? I am using a linux box (ubuntu) with tomcat 7. For this project I am using maven to create my war file.
I've had the exact same problem, although with 20MB less on average. My primary datalink for years has been an IDSL line that could take up to half an hour to deploy. Finally I got enough paying customers to augment it with a 4G wireless ISP.
The one problem I ran into was that the hosting provider had gimmicked up the server I wanted to use as my build machine in a way that made Maven not run properly. I forget why, but there was something screwball about the OS setup.
Assuming you don't have that problem, however, and that the remote machine can call out to the Maven repositories to download things, there should be no issue with building deployable WARs and EARS via a remote command-line interface.
Where you put your source code repository is up to you. In my case, the slow data links were because I have hosting capabilities myself, but not the financial justification to run T1 speeds, so I can have a public SVN repository locally. You might find it better to host SVN on the remote server.
You don't actually need SVN hosting to do builds, however. Unless you want to. A local "mvn clean", then ZIP can produce a fairly small uploadable that can then be unzipped after upload to do the build.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jul 24, 2011
Thanks for your reply Tim,
I have a unmanaged vps so I should not have any problems with installing what ever I need. At the moment I have svn and maven installed locally however I am not using svn for builds, just to track changes, tags for releases etc, but I have been building from my source code in eclipse. To start with I will do as you suggested and install maven on my server, upload zip then build. Once I get that going I will see if it is worth installing svn on my server and building from there.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com