如何显示Maven插件目标和参数

了解Maven插件的可用目标是通过查阅插件文档或使用maven-help插件。可以搜索插件文档,如maven-eclipse插件的官方文档,或者使用maven-help插件来列出目标和参数,例如查看maven-eclipse插件的'eclipse'目标详细信息。
摘要由CSDN通过智能技术生成

您如何知道Maven插件的可用目标是什么,例如maven-eclipse插件– mvn eclipse:goals? 。 在本文中,我们将向您展示如何显示Maven插件的全部目标。

插件文档
最好的解决方案是Googling,并访问插件文档,对于maven-eclipse,请访问此maven-eclipse插件文档页面。

1.帮助:描述

或者,您可以使用此maven-help插件显示插件的可用目标和参数的列表。 例如,

1.1。 列出maven-eclipse插件的所有可用目标。

$ mvn help:describe -Dplugin=eclipse

输出量

$ mvn help:describe -Dplugin=eclipse

Name: Maven Eclipse Plugin
Description: The Eclipse Plugin is used to generate Eclipse IDE files
  (.project, .classpath and the .settings folder) from a POM.
Group Id: org.apache.maven.plugins
Artifact Id: maven-eclipse-plugin
Version: 2.9
Goal Prefix: eclipse

This plugin has 13 goals:

//...
eclipse:myeclipse
  Description: Generates MyEclipse configuration files

eclipse:myeclipse-clean
  Description: Deletes configuration files used by MyEclipse

eclipse:rad
  Description: Generates the rad-6 configuration files.

eclipse:rad-clean
  Description: Deletes the config files used by Rad-6. the files .j2ee and
    the file .websettings

eclipse:remove-cache
  Description: Removes the not-available marker files from the repository.

//...

1.2显示maven-eclipse ,“ eclipse”目标及其所有参数的详细信息。

$ mvn help:describe -Dplugin=eclipse -Dmojo=eclipse -Dfull=true

输出量

$ mvn help:describe -Dplugin=eclipse -Dmojo=eclipse -Dfull=true

//...
eclipse:eclipse
  Description: Generates the following eclipse configuration files:
    - .project and .classpath files
    - .setting/org.eclipse.jdt.core.prefs with project specific compiler
//...

  Available parameters:

    addGroupIdToProjectName (Default: false)
      Expression: ${eclipse.addGroupIdToProjectName}
      If set to true, the groupId of the artifact is appended to the name of
      the generated Eclipse project. See projectNameTemplate for other options.

    additionalBuildcommands
      List of eclipse build commands to be added to the default ones. Old
      style:
     

    //...

1.3。 很少help:describe描述maven-archetype插件的示例:

$ mvn help:describe -Dplugin=archetype

$ mvn help:describe -Dplugin=archetype -Dmojo=generate -Ddetail

参考文献

  1. Maven Eclipse插件
  2. 配置描述目标

翻译自: https://mkyong.com/maven/how-to-display-maven-plugin-goals-and-parameters/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值