public
Description: Maven CLI Plugin
Home | Edit | New

User Guide

This document covers what goals are available and common usage examples.

Overview

The following goals are available:

  • execute – Execute specific goals or sets of goals. Can also open up a port for remote command execution via the “cli.port” system property.
  • execute-phase – Execute phases via a forked Maven lifecycle. Support the remote port, just like execute does.
  • idea – Install the IDEA plugin into either your IDEA home or personal settings directory. Requires the “idea.home” system property to be set to either one. For example, “-Didea.home=/usr/local/share/idea” will install the plugin into the idea home directory

For more information about the IDEA plugin, see the idea goal page.

Common Setup

To use this plugin, first, add “org.twdata.maven” to your plugin groups as described in the Maven docs Your “$HOME/.m2/settings.xml” file should look something like this:


<settings> <pluginGroups> <pluginGroup>org.twdata.maven</pluginGroup>


Option 1: Automatically Install Plugin

By adding the following maven repository to your settings.xml or pom.xml in addition to the pluginGroups above, you can simply attempt to execute the plugin at the command line “mvn cli:execute-phase” and it will download automatically.

Repository definition:


<pluginRepositories>
<pluginRepository>
<id>twdata-m2-repository</id>
<name>twdata.org Maven 2 Repository</name>
<url>http://twdata-m2-repository.googlecode.com/svn/</url>
</pluginRepository>
</pluginRepositories>

Option 2: Download and Manually Install Plugin

As an option, you can manually install the plugin into your local repository. You can download the plugin jar and its pom, then install both manually like this:


mvn install:install-file -Dfile=path-to-jar \
-DgroupId=org.twdata.maven \
-DartifactId=maven-cli-plugin \
-Dversion=0.5 \
-Dpackaging=jar \
-DpomFile=path-to-pom

Last edited by shaolang, Wed Jul 29 23:53:23 -0700 2009
Home | Edit | New
Versions: