capistrano-maven
a capistrano recipe to deploy Apache Maven based projects.
Installation
Add this line to your application's Gemfile:
gem 'capistrano-maven'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-maven
Usage
This recipes will try to do following things during Capistrano deploy:setup and deploy tasks.
- Download and install Maven for current project
- Prepare Maven's settings.xml for current project (optional)
- Build Maven project remotely (default) or locally
To build you Maven projects during Capistrano deploy tasks, add following in you config/deploy.rb. By default, Maven build will run after the Capistrano's deploy:finalize_update.
# config/deploy.rb
require "capistrano-maven"
set(:mvn_version, "3.0.5") # Maven version to build project
Following options are available to manage your Maven build.
-
:mvn_version- The project Maven version. -
:mvn_archive_url- The download URL for specified Maven version. -
:mvn_setup_remotely- Setupmvnon remote servers. As same value as:mvn_update_remotelyby default. -
:mvn_setup_locally- Setupmvnon local server. Asa same value as:mvn_update_locallyby default. -
:mvn_update_remotely- Runmvnon remote servers.trueby default. -
:mvn_update_locally- Runmvnon local server.falseby default. -
:mvn_goals- Maven goals to execute. Runclean packageby default. -
:mvn_settings- List of your optional setting files for Maven. -
:mvn_settings_local- List of your optional setting files for Maven. -
:mvn_template_path- The local path where the templates of setting files are in. By default, searches fromconfig/templates. -
:mvn_java_home- OptionalJAVA_HOMEsettings for Maven commands. -
:mvn_java_home_local- OptionalJAVA_HOMEsettings for Maven commands in localhost. -
:mvn_profiles- Maven profiles to use. -
:mvn_skip_tests- Add-Dmaven.test.skip=truein Maven commands.falseby default. -
:mvn_update_snapshots- Add-Uif Maven commands.falseby default. -
:mvn_release_build- Skip building on SNAPSHOT version.falseby default.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Author
- YAMASHITA Yuu (https://github.com/yyuu)
- Geisha Tokyo Entertainment Inc. (http://www.geishatokyo.com/)
License
MIT