如何在 help:effective-pom 中指定工件? [英] How to specify an artifact in help:effective-pom?

查看:65
本文介绍了如何在 help:effective-pom 中指定工件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用mvn help:effective-pom -Dartifact=com.group:artifactname:1.0.0-SNAPSHOT 但它仍在打印当前项目的有效 pom.

I am trying to use mvn help:effective-pom -Dartifact=com.group:artifactname:1.0.0-SNAPSHOT but it is still printing out effective pom for a current project.

有什么办法可以使用吗?我正在关注 Maven help:effective-pom 文档.

Is there any way to use it? I am following Maven help:effective-pom documentation.

推荐答案

这个参数是最新的:它至少需要 maven-help-plugin3.0.0 版本>.
您的 pom.xml 很可能不会使用它.
请注意,输出中没有任何错误,因为用户属性 (-D) 可用于定义插件参数或任何自定义属性.因此,如果无法识别该插件,则不会使用它.

This parameter is recent : it requires at least the 3.0.0 version of maven-help-plugin.
Your pom.xml doesn't use it very probably.
Note that you don't have any error in the output because a user property (-D) may be used to define a plugin parameter or any custom property. So the plugin just doesn't use it if it is not recognized.

因此将您的 pom 配置为使用支持它的 maven-help-plugin 版本或最后一个:

So configure your pom to use a maven-help-plugin version that supports it or the last :

<build>
    <plugins>
      <plugin>
         <artifactId>maven-help-plugin</artifactId>
         <version>3.1.0</version>
      </plugin>
    </plugins>
<build>

或在命令行中明确指定插件的版本:

or specify explicitly the version of the plugin in the command line :

mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:effective-pom -Dartifact=com.group:artifactname:1.0.0-SNAPSHOT

这篇关于如何在 help:effective-pom 中指定工件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆