Maven: Setting maven build goals in eclipse

Issue in eclipse when executing maven build: No goals have been specified for this build. You must specify a lifecycle phase or a goal in the format ……, for details in the following picture:
这里写图片描述

You have to specify a build goal, e.g. compile or install. Check your eclipse launch configuration. For example:
这里写图片描述

Maven is a build tool, but unlike ant there is not “default” goal. So when you run

mvn

You are not supplying enough arguments, you need to run something like

mvn test

Where the second argument indicates where along the build lifecycle you wish to stop. Maven will then run every step up to the one you specified.

Some common stopping points

mvn compile (just compile)
mvn test (compile and run unit tests)

mvn package (compile, run unit tests, and build the distributable package)

mvn install (all of the above, and install distributable package into local repository. Install is very useful if you need to build other packages which depend on changes to this package)

mvn deploy (all of the above, and install package into remote (aka public) repository for sharing with other developers)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值