问题描述
使用Maven,您可以轻松指定settings.xml位置,例如:
with maven you can easily specify settings.xml location, e.g:
mvn -s custom/dir/settings.xml package
是否有类似的方法来指定自定义security-settings.xml?
Is there a similiar way to specify custom security-settings.xml?
其背后的原因很简单:通过本地存储库轻松分发它.现在,安全性不再是问题-一切都在Intranet上.
The reasoning behind this is simple: to easily distribute it via a local repository. Now, security is NOT a concern - it's all on the intranet.
推荐答案
这是作为 MNG-4853 .尽管未直接实施,但建议使用解决方法:
This was requested as MNG-4853. Although not implemented directly, a workaround is suggested:
公告博客帖子,您还可以使用主密码重定位功能.编写一个带有重定向的~/.m2/security-settings.xml
文件:
As detailed in the announcement blog post, you can also use the master password relocation feature. Write an ~/.m2/security-settings.xml
file with a redirection in it:
<settingsSecurity>
<relocation>/Volumes/mySecureUsb/secret/settings-security.xml</relocation>
</settingsSecurity>
这篇关于指定Maven security-settings.xml文件的自定义位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!