Subversion and Maven Tips and Tricks to save time updating

  • strict warning: Non-static method view::load() should not be called statically in /home/john567/drupalganger.com/sites/all/modules/views/views.module on line 843.
  • strict warning: Declaration of views_plugin_display::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home/john567/drupalganger.com/sites/all/modules/views/plugins/views_plugin_display.inc on line 1877.
  • strict warning: Declaration of views_plugin_display_page::options_submit() should be compatible with views_plugin_display::options_submit(&$form, &$form_state) in /home/john567/drupalganger.com/sites/all/modules/views/plugins/views_plugin_display_page.inc on line 481.
  • strict warning: Declaration of views_plugin_display_block::options_submit() should be compatible with views_plugin_display::options_submit(&$form, &$form_state) in /home/john567/drupalganger.com/sites/all/modules/views/plugins/views_plugin_display_block.inc on line 193.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /home/john567/drupalganger.com/sites/all/modules/views/handlers/views_handler_argument.inc on line 745.
  • strict warning: Declaration of views_handler_argument_broken::ui_name() should be compatible with views_handler::ui_name($short = false) in /home/john567/drupalganger.com/sites/all/modules/views/handlers/views_handler_argument.inc on line 770.
  • strict warning: Declaration of views_handler_sort_broken::ui_name() should be compatible with views_handler::ui_name($short = false) in /home/john567/drupalganger.com/sites/all/modules/views/handlers/views_handler_sort.inc on line 82.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home/john567/drupalganger.com/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home/john567/drupalganger.com/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • strict warning: Declaration of views_handler_filter_broken::ui_name() should be compatible with views_handler::ui_name($short = false) in /home/john567/drupalganger.com/sites/all/modules/views/handlers/views_handler_filter.inc on line 609.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/john567/drupalganger.com/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 128.

Lately I've been programming with a mid-sized group of developers. We are working on Windows for our development environment. Using subversion for source code control and maven for our build process. Because we have enough developers that there are code check-ins almost 24x7 it is important that other developers update their local code every day.

 

For a few days I had been manually updating the code from our repository by using TortoiseSVN and then running a command line "mvn clean install". Although this only took a few minutes to do each day I decided to write a batch file to automate this process.

What I wanted was something that would run:

 

svn update --username

mvn clean install -Dmaven.test.skip=true

 

This was simple enough to do in a single batch file. However once the process completed the cmd window would close so that I couldn't read any messages that were output. To get around this I created three batch files.  The first file that runs is named DailyUpdate.bat and includes one line:

cmd /K svnUpdate.bat

the file svnUpdate.bat has two lines

svn update --username

cmd /K mvnCleanInstall.bat

the final file mvnCleanInstall.bat has one line:

mvn clean install -Dmaven.test.skip=true

 

Now the cmd window stays open after this completes. I simplified the process for updating to the latest code and doing a local build.

Normally I have a shortcut to  DailyUpdate.bat in my windows startup directory so that it runs every time I start up my machine. There are some weeks where I don't want this running on startup, in that case I remove the shortcut.