简体   繁体   中英

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.

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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