rus*_*tyx 17 java maven-2 maven maven-release-plugin
我的项目继承的POM包含一些指定一些额外<pluginManagement>的release插件arguments.
我的问题是:arguments在这种情况下,有没有办法从命令行覆盖参数?
父POM有这个:
<pluginManagement>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>-Prelease</arguments>
</configuration>
</plugin>
</pluginManagement>
Run Code Online (Sandbox Code Playgroud)
由于命令行参数不起作用:
mvn release:prepare -Darguments="-Pmock -Prelease"
Run Code Online (Sandbox Code Playgroud)
该-Darguments="-Pmock -Prelease"部分没有效果.什么时候arguments没有指定,它的工作原理.
我无法修改父POM或不使用它.
rus*_*tyx 12
找到了解决方案.在我的 POM中,我添加了这个,它覆盖了父 POM中的设置,并允许在命令行上指定其他参数,例如-Darguments=-Pmock
<pluginManagement>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>${arguments} -Prelease</arguments>
</configuration>
</plugin>
</pluginManagement>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10062 次 |
| 最近记录: |