zoukankan      html  css  js  c++  java
  • execute phase · mrdon/mavencliplugin Wiki

    execute phase · mrdon/maven-cli-plugin Wiki

    The “execute-phase” goal is basically the same as the execute goal, except it accepts maven lifecycle phases instead of plugin goals. See the execute goal docs for more information.

    What It Does

    This goal maps your commands to the full set of recognized maven lifecycle phases. This goal will allow you to type “mvn package” and all the typical lifecycle events will be run up and through package. Contrastingly, the “execute” goal of this plugin will not allow you to run “package” because package is not a plugin, but rather a lifecycle goal.

    Command Line Syntax

    The command line syntax is very similar to the way arguments passed to the mvn command are interpreted, with one exception, you can specify modules. So, specifying:

    maven2> clean install -Dmaven.test.skip=true -o

    is equivalent to running:

    $ mvn clean install -Dmaven.test.skip=true -o

    Similarly, goals can be executed:

    maven2> dependency:tree

    is equivalent to running:

    $ mvn dependency:tree

    When modules are specified, this is equivalent to changing into the module first. So running:

    maven2> mymodule/mysubmodule clean install

    is equivalent to running:

    $ cd mymodule/mysubmodule
    $ mvn clean install

    Multiple modules can be specified, this is equivalent to running each command on each module:

    maven2> mymodule/mysubmodule1 mymodule2 clean install

    is equivalent to running:

    $ cd mymodule/mysubmodule1
    $ mvn clean install
    $ cd ../..
    $ cd mymodule2
    $ mvn clean install

    Finally, different goals can be executed on different modules in the one command:

    maven2> mymodule1 clean install -Dmaven.test.skip=true mymodule2 package

    is equivalent to running:

    $ cd mymodule1
    $ mvn clean install -Dmaven.test.skip=true
    $ cd ..
    $ cd mymodule2
    $ mvn package

    Of course, aliases still work as for the execute goal.

    Supported Options

    Option Description
    -oOffline mode
    -NDo not recursively execute lifecycle phases
    -SShorthand for -Dmaven.test.skip=true
    -Dkey=valueSpecifies a property
    (you can specify a value with whitespace by quoting it: -Dkey="value1 value2"
    -PprofileSpecifies a profile to use
  • 相关阅读:
    20150805-20150807 tradeDate-----python
    nutz_web应用中主页跳转到登录页面的方式
    nutz中实现登录验证
    C#之继承
    C#中Page执行顺序:OnPreInit()、OnInit()……
    利用堆栈实现走迷宫算法
    对数组结构体按照K值翻转
    实现多项式的加法和乘法运算
    两个有序链表的合并
    队列的比较和存储方式
  • 原文地址:https://www.cnblogs.com/lexus/p/2422409.html
Copyright © 2011-2022 走看看