Why I hate XML, and Ant's use of it in particular

I was googling around for examples of how to sign a JAR file in Ant using the signjar task and came across this monstrosity - 217 lines of turgid XML. How anyone can say Ant is an improvement over make is a mystery to me, and how anyone could ever think that XML is fit for consumption by humans is an even bigger mystery. XML is food for machines, not people. I sincerely hope that the current fad for doing everything in XML (and we have some examples close to home) is going to an early grave.

What I'm actually trying to do is to deploy an application via WebStart from within NetBeans - I've loaded up the NetBeans WebStart module but it really doesn't cut the mustard yet, it doesn't support JAR signing, it hard-codes the name of the JNLP file and it assumes you want a WAR file building. Here's hoping they make the necessary improvements in short order.

Categories : Java, Tech


Re: Why I hate XML, and Ant's use of it in particular

well, the ant file you pointed does crap load of things apart from signing. signing part is this: <signjar jar="${jar.file}" alias="mindprodcert2005dsa" storepass="${env.jarsignerpassword}"/> </target> jar creation and signing is a simple operation in ant. ant was not meant to be a scripting language but by time it had such capabilities. actually it is not bad, comparing to make it is much better IMHO. especially for basic operations. if you want to sign a jar, you need to write the basic compilation and jar targets, thats it. it takes 5 times less that the one you have. in our project we have something similar, it signs all the jars in a directory. <target name="sign-jars"> <signjar keystore="keystore.ks" alias="codesign" storepass="password"> <fileset dir="${dist.lib}"> </fileset> </signjar> </target>