简体   繁体   English

如何在help中指定工件:effective-pom?

[英]How to specify an artifact in help:effective-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. 我正在尝试使用mvn help:effective-pom -Dartifact=com.group:artifactname:1.0.0-SNAPSHOT但它仍然打印出当前项目的有效pom。

Is there any way to use it? 有没有办法使用它? I am following Maven help:effective-pom documentation . 我正在关注Maven的帮助:有效的pom文档

This parameter is recent : it requires at least the 3.0.0 version of maven-help-plugin . 此参数是最新的:它至少需要3.0.0版本的maven-help-plugin
Your pom.xml doesn't use it very probably. 您的pom.xml很可能不会使用它。
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. 请注意,输出中没有任何错误,因为用户属性( -D )可用于定义插件参数或任何自定义属性。 So the plugin just doesn't use it if it is not recognized. 因此,如果无法识别,插件就不会使用它。

So configure your pom to use a maven-help-plugin version that supports it or the last : 因此,配置您的pom以使用支持它或后者的maven-help-plugin版本:

<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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM