在maven命令行中为插件指定参数

1. 找开插件源码,找到参数的expression. 例如:

引用

    /**

     * User properties file.

     *

     * @parameter expression="
${autoconfig.userProperties}"

     */

    private File userProperties;

2. 执行时把这个expression作为system property加上去。

引用

mvn install
-Dautoconfig.userProperties=/home/kent/myproject/antx.properties

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.