execute phase · mrdon/maven-cli-plugin 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

OptionDescription
-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
posted on 2012-03-28 22:27  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/03/28/2422409.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
D:\springboot\hspedu_springboot_vue>mvn org.springframework.boot:spring-boot-maven-plugin:run [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/maven-metadata.xml Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/maven-metadata.xml (7.2 kB at 2.6 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/3.1.0/spring-boot-maven-plugin-3.1.0.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/3.1.0/spring-boot-maven-plugin-3.1.0.pom (3.2 kB at 4.1 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/3.1.0/spring-boot-maven-plugin-3.1.0.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/3.1.0/spring-boot-maven-plugin-3.1.0.jar (130 kB at 108 kB/s) [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.851 s [INFO] Finished at: 2023-05-31T00:33:26+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.1.0:run (default-cli): Goal requires a project to execute but there is no POM in this directory (D:\springboot\hspedu_springboot_vue). Please verify you invoked Maven from the correct directory. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException怎么解决
05-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值