Java 具有特殊特征的蚂蚁属性

Java 具有特殊特征的蚂蚁属性,java,linux,ant,build-process,Java,Linux,Ant,Build Process,我试图将密码和用户名作为参数传递给ant文件connectionTester.xml。。 我用-v和-d选项运行ant。 我所看到的房产的变化让我非常恼火,无法找到解决办法。 密码包含$character,后面跟一个构成linux命令的字符时会被替换,如下面详细的输出所示 如何处理这种情况。密码会被编译或替换为其他内容,最终生成失败 [u@VM:h W]$ /opt/app/apache-ant-1.9.2/bin/ant -file connectionTester.xml -DdeployS

我试图将密码和用户名作为参数传递给ant文件connectionTester.xml。。 我用-v和-d选项运行ant。 我所看到的房产的变化让我非常恼火,无法找到解决办法。 密码包含$character,后面跟一个构成linux命令的字符时会被替换,如下面详细的输出所示

如何处理这种情况。密码会被编译或替换为其他内容,最终生成失败

[u@VM:h W]$ /opt/app/apache-ant-1.9.2/bin/ant -file connectionTester.xml -DdeployServer_user=xxxxxxx -DdeployServer.password=apr20$1 -v -d
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Buildfile: /home/xxxxxx/connectionTester.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.7 in: /usr/java/jdk1.7.0_25/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: deployServer_user -> xx49783
Setting ro project property: deployServer.password -> apr20-file
Setting ro project property: ant.file -> /home/xx49663/connectionTester.xml
Setting ro project property: ant.file.type -> file
尽力传球

-DdeployServer.password='apr20\$1'

尝试在ant调用之前在命令行中设置密码&像在命令行中一样转义$(考虑到它在命令行中是以纯文本形式传递的)

$myPass=apr20\$1
然后是

-DdeployServer.password=$myPass

为了提问,我粘贴了ant命令。但这是从詹金斯的一个参数化作业中推导出来的。如何更改参数值以在Jenkins中添加转义序列?