加密 Ant 构建文件 [英] Encrypt Ant build file

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

问题描述

我们需要让一些合作伙伴与我们合作开发一些java项目,我们需要向他们提供ant构建脚本.

We need to enable some partners to work with us on some java projects, and we need to provide them with the ant build scripts.

但是,如果可能,我们希望对 ant 构建文件(build.xml 等)进行加密,以便合作伙伴可以进行构建,但他们看不到实际的 ant 文件内容(我知道这很奇怪).

However, if possible, we want to encrypt the ant build files (build.xml etc.) so that partners can do the build, but they cannot see the actual ant file content (I know it's weird).

任何好的建议表示赞赏.(我们在 Windows 盒子上)

Any good suggestions are appreciated. (we are on the Windows box)

推荐答案

Ant 本身不允许您加密构建脚本(任何其他构建系统 AFAIK 也不允许).您可以做的是围绕 Ant 创建一个自定义包装器,它将以加密形式存储构建脚本,在执行期间对其进行解密,并将解密后的脚本传递给 Ant API.然后,您可以将该包装纸交付给您的合作伙伴.

Ant itself does not allow you to encrypt the build scripts (nor does any other build system AFAIK). What you can do is create a custom wrapper around Ant that will store the build script in an encrypted form, decrypt it during execution and pass the decrypted script to the Ant API. Then you can deliver that wrapper to your partners.

(向某人提供您系统的源代码,但加密构建脚本似乎是一件非常奇怪的事情.如果构建脚本中只有某些特定数据是敏感的,您可能只想专注于保护这些数据,使用其他方法.)

(Giving someone the source code to your system but encrypting the build script seems to be an extremely weird thing to do. If only some specific data in the build script is sensitive, you may want to focus on protecting only this data, using some other approach.)

这篇关于加密 Ant 构建文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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