public
Description: Maven CLI Plugin
Home | Edit | New

execute

With the plugin installed, you can execute the cli from the command line:

mvn cli:execute

What It Does

This goal maps your commands to a set of recognized plugin calls. Note that most Maven users typically call phases, such as “mvn package” rather than plugins directly, so the “execute-phase” goal may be what more users are looking for.

Custom Aliases

Custom command aliases can be configured by declaring the plugin in your pom.xml. This example adds a “foo” command that executes three other aliased commands:

<plugin>
    <groupId>org.twdata.maven</groupId>
    <artifactId>maven-cli-plugin</artifactId>
    <version>0.6</version>
    <configuration>
        <commands>
            <foo>clean compile jar</foo>
        </commands>
    </configuration>
</plugin>

Configuration Parameters

The “execute” goal accepts the following configuration parameters:

Name Type CLI Parameter Description
commands Map commands Command aliases

The “execute-phase” goal accepts the following configuration parameters:

Name Type CLI Parameter Description
userAliases Map userAliases User-defined aliases

Default Aliases

Alias Command
compile org.apache.maven.plugins:maven-compiler-plugin:compile
testCompile org.apache.maven.plugins:maven-compiler-plugin:testCompile
jar org.apache.maven.plugins:maven-jar-plugin:jar
war org.apache.maven.plugins:maven-war-plugin:war
resources org.apache.maven.plugins:maven-resources-plugin:resources
install org.apache.maven.plugins:maven-install-plugin:install
deploy org.apache.maven.plugins:maven-deploy-plugin:deploy
test org.apache.maven.plugins:maven-surefire-plugin:test
clean org.apache.maven.plugins:maven-clean-plugin:clean

Other Commands

Command Decription
ls/list Lists the reactor projects
exit/bye/quit Exits the command line
help/? Prints a list of all possible commands or aliases
Last edited by shaolang, Wed Jul 29 04:00:48 -0700 2009
Home | Edit | New
Versions: