News for hackers. Stuff that matters.
Re:Maven builds are an infinite cycle of despair by rictic on Friday January 01, 2010 @05:46PM (#1026384)
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."

Re:Maven builds are an infinite cycle of despair by tentonova on Friday January 01, 2010 @05:51PM (#1026396)
The 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.

Re:Maven builds are an infinite cycle of despair by rictic on Wednesday January 06, 2010 @08:04PM (#1036220)
Interesting, 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.