其他属性的Maven密码加密 [英] Maven Password Encryption for Other Properties

查看:153
本文介绍了其他属性的Maven密码加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Maven的密码加密,例如它用于Mojo属性的节点。我尝试将加密的密码粘贴到mojo的正确属性中,但将其视为纯文本。我希望可以在Mojo属性的注释上设置一个可以解释为可以加密的属性,如果是这样,使用系统主密码进行解密,但是我不会有没有人可以看到文档中的任何内容。

I would like to use Maven's password encryption such as it uses for nodes for properties of a Mojo. I tried just pasting an encrypted password into the correct property for the mojo, but it treated it as plain text. I was hoping there was an attribute I could set on the annotation for the Mojo property that would explain that it could be encrypted, and if so, to use the system master password to decrypt, but I don't see anything in the documentation for that.

有没有人设法使用Maven的密码加密,除了服务器密码节点之外的任何东西?愿意为我的Mojo做这个工作。

Has anybody managed to use Maven's password encryption for anything other than server password nodes? Would love to make this work for my Mojo.

推荐答案

不完整的答案,但希望有一个指针正确的方向.. 。

Not a complete answer, but hopefully a pointer in the right direction...

maven-scm-plugin maven-release-plugin tomcat6-maven-plugin 全部允许从 $ $ < servers> 部分读取密码{user.home} /。m2 / settings.xml 文件。

The maven-scm-plugin, maven-release-plugin, and tomcat6-maven-plugin all allow for reading passwords from the <servers> section of the ${user.home}/.m2/settings.xml file.

也许如果你看这些插件/目标的源代码,你会发现一个Maven核心或共享组件,让你做你想要的,你可以适应您的需要。

Perhaps if you look at the source code for those plugins/goals, you will find a Maven core or shared component that allows you to do what you want, and you may adapt it for your needs.

这篇关于其他属性的Maven密码加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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