执行maven [goal]命令的含义

goal phase lifecycle这几个概念的区别我不赘述了,我前一篇博文便转载了,网上也大把大把的资料。


这篇文章说的是,例如执行 mvn archetype:generate 此类执行goal语句,冒号的两边分别代表什么含义。

它对应的含义是 mvn goal-prefix:goal

解释一下什么是goal-prefix,大家执行一下 mvn help:describe -Dplugin=archetype 相信就一目了然了

这条命令的输出:

Name: Maven Archetype Plugin
Description: Maven Archetype is a set of tools to deal with archetypes, i.e.
  an abstract representation of a kind of project that can be instantiated into
  a concrete customized Maven project. An archetype knows which files will be
  part of the instantiated project and which properties to fill to properly
  customize the project.
Group Id: org.apache.maven.plugins
Artifact Id: maven-archetype-plugin
Version: 2.1
Goal Prefix: archetype
This plugin has 8 goals:
[具体内容省略]

可以很清楚的看到,一个plugin对应了一个goal prefix,这个prefix就是上述的goal-prefix,可以看做是plugin artifectId的简称。

这条命令也会清楚的列出这个plugin所有的goal,如果需要更加详细的信息,如这个plugin中每个goal的具体用法,参数,以及绑定的phase,可以执行

mvn help:describe -Dplugin=archetype  -Ddetail

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值