使用 maven,您可以轻松指定 settings.xml 位置,例如:
mvn -s custom/dir/settings.xml package
是否有类似的方法来指定自定义 security-settings.xml?
这背后的原因很简单:通过本地存储库轻松分发它。现在,安全不再是问题——一切都在 Intranet 上。
最佳答案
这被请求为 MNG-4853 .虽然没有直接实现,但建议解决方法:
I've verified that
-Dsettings.security=path/to/security-settings.xml
works
详见 the announcement blog post ,您还可以使用主密码重定位功能。写个
~/.m2/security-settings.xml
包含重定向的文件:<settingsSecurity>
<relocation>/Volumes/mySecureUsb/secret/settings-security.xml</relocation>
</settingsSecurity>
关于maven - 指定 maven security-settings.xml 文件的自定义位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23782409/