0

I have content in a properties file encoded in base64 (there are passwords in it that I just want to be not plain text). When I create a loadproperties task in Ant like this:

<loadproperties srcFile="mypasswords.properties" encoding="base64" />

and then try to run any target in the build.xml, I get an error like so:

/path/to/build.xml:10: Unable to load file: java.io.UnsupportedEncodingException: base64

I've looked and looked for what could be wrong. Am I using the wrong string for the encoding attribute? Am I missing a jar?

I'm on OS X 10.6.8, Eclipse Indigo, Ant 1.8.2, JRE 1.6.0_31

kingsong
  • 31
  • 4

1 Answers1

1

I suspect the encoding parameter of the loadproperties task refers the file character encoding, not encoding applied to property values.

Instead of encoding I would suggest encrypting your passwords, an example is contained in the following answer:

Where do I put my credentials when using Ivy and a private company repository?

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185