I have a shell script that does most of this stuff. Here's my steps: 1 - mvn clean package 2 - scp package to server(s) 3 - on server, run deploy script 3a - script makes temp working directory 3b - script copies web.xml, application.properties, etc from prod into temp dir 3c - script unzips war into proper location 3d - script copies the production web.xml, etc, back into place 3e - script restarts tomcat / apache (not necessary depending on your config, it's just how I like to do it)
Most of the applications that I currently maintain can be deployed to production within about five minutes, including build, upload time, etc. (of course the automated tests take longer on some applications - this is excluding test time) -- Jeremy Thomerson http://www.wickettraining.com On Sat, Aug 15, 2009 at 10:33 PM, Tauren Mills<[email protected]> wrote: > I currently don't have an automated deployment process in place for a > wicket/spring/hibernate/maven project and am looking for suggestions > on how to best implement one. I'm open to any suggestions as well as > references to helpful URLs and other resources. > > When it is time to deploy my project, I manually go through the following > steps: > > 1. Edit application.properties and comment out my local development > database configuration and uncomment the production database > configuration. The settings in this file (jdbc.driver, jdbc.url, > jdbc.username, jdbc.password, hibernate.dialect, > hibernate.hbm2ddl.auto) are used in my spring configuration files to > create a datasource and sessionfactory. > > 2. Edit web.xml and change the configuration context-param from > development to deployment. > > 3. Run mvn install > > 4. scp the newly built war file from my local maven repo to the > jetty/webapps folder on my deployment server. > > 5. Remove the existing ROOT.war file from the deployment server. > > 6. Rename the new war file to ROOT.war > > 7. Restart the deployment jetty server > > Of course, this assumes there are no complex database changes required > by the new version that can't be handled by hbm2ddl.auto=update. If > there are, then I also need to apply an sql update script to the > database. > > I'm sure that this process can be streamlined. I plan to look into > mvn deploy and see what I can accomplish. I believe there are also > ways to use maven to have development and deployment versions of > different files such as application.properties. > > If you have already solved these types of problems, I'd love to hear > how you did it. > > Thanks! > Tauren > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
