= Maven Helper Script

{<img src="https://secure.travis-ci.org/kingOburgers/maven-helper-script.png" />}[http://travis-ci.org/kingOburgers/maven-helper-script]

== What is it?

A script to simplify how you execute Maven commands. For example, instead of:

    mvn clean install -pl parent && mvn clean install -pl domain

You can do something like:

    m ci p ci d

== How?

All you need is a YAML file with contents like this:

    modules:
      p: parent
      d: domain

    commands:
      - clean
      - install

    arguments:
      - -ff

Or you can supply a YAML file with your commands in a map, like this:

    modules:
      p: parent
      d: domain

    commands:
      c: clean
      i: install
      cd: clean deploy

    arguments:
      - -ff

== Additional Features

If you don't want to define a mapping for your module, you can use it's name.

    m ci parent ci d

You can also create shorthand commands for various plugin phases. For example, executing "jetty:run" on your "web" module could be:

    m jr web

if you provide a mapping file with either:

    commands:
      jr: jetty:run

or:

    commands:
      - jetty:run


All parameters passed into the helper script are applied to every execution. So you only need to flag a command like offline mode once:

    m ci web ci parent -o

Including the optional "arguments:" mapping in your m.yml file allows you to apply arguments without typing them in the command line. The example YAML files above would trigger the "-ff" arg for maven.

Commands can be executed in any directory of your project, as long as there is an "m.yml" file in your project's top-level directory.

== How do I use it?
 - Make sure you have ruby installed and on your path.
 - In a command window, type "gem install maven-helper-script".
 - Find one of your existing maven projects and put an "m.yml" file like the one above in the top-level directory.
 - In a command window, "cd" to a directory in your project.
 - Execute a command.

If you're having trouble, take a look at the wiki or sample-mvn-project located within the project.