5 ms·
The java build world is perverse. Maven and Ant are imperative, highly limited, domain specific languages using XML for syntax. If that doesn't set off just a
by rictic 17y ago
The java build world is perverse. Maven and Ant are imperative, highly limited, domain specific languages using XML for syntax.
If that doesn't set off just about every warning bell in your head, consider that Ant performs character set decoding and re-encoding when copying files. By default it will decode every file with your system's default character encoding and then re-encode it with the very same format. As far as I can tell all this can possibly do is introduce errors. When copying a binary file the best-case scenario is that your JVM throws a runtime error, but it's more likely that ant will silently corrupt the copy.
The Ant team's solution for this problem? You might reasonably expect that they would provide an option for binary files which does a byte by byte copy. Instead they suggest that you change an environment variable to an encoding which "does not seem to contain illegal character sequences."
- tentonova 17y agoThe java build world is perverse. Maven and Ant are imperative, highly limited, domain specific languages using XML for syntax. Maven is declarative, not imperative. Ant is broken in many respects, but your provided example is not true. Ant only attempts re-encoding of a file if you specify text filters (aka variable/string replacement). It shouldn't be a surprise to anyone that string replacement breaks on binary files.
- rictic 17y agoInteresting, thanks for setting me straight, it's good to know that the world is saner than it appeared. I recall some images being corrupted with the copy task in ant and that was the explanation that I received.