如何“放入" pom.xml中的Maven命令行? [英] How to "put" maven command line in pom.xml?

查看:295
本文介绍了如何“放入" pom.xml中的Maven命令行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何放置"要从pom.xml执行的命令行参数. 例如,我有:

How can I "put" a command line parameter to be executed from pom.xml. For example I have:

mvn clean install -Dmyparameter

我希望它可以从pom.xml而不是从命令行执行.

And I wish It to be executed from pom.xml instead from command line.

推荐答案

这取决于您需要使用args的哪个阶段.可以通过更改配置参数在插件上完成.

It depends on which phase you need to use the args. It can be done on plugins by changing the configuration parameter.

<pluginManagement>
    <plugin>
        ......
        ......
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
            <arguments>-Dmaven.test.skip=true -D[other arguments that u need to include]</arguments>
        </configuration>
        ......
        ......
</plugin> </pluginManagement>

可以肯定的火插件中的相同方法,您可以跳过测试等等!

Same way in the sure fire plugin u can skip test and so on!!

这篇关于如何“放入" pom.xml中的Maven命令行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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