How to over-write the property in Ant?

ant-contrib’s Variable task can do this: <property name=”x” value=”6″/> <echo>${x}</echo> <!– will print 6 –> <var name=”x” unset=”true”/> <property name=”x” value=”12″/> <echo>${x}</echo> <!– will print 12 –> Not recommended, though, it can lead to weird side-effects if parts of your Ant scripts assume immutable property values, and other parts break this assumption.

Custom JUnit Report?

The junitreport task uses XSLT to produce the report from the XML files generated by the junittask. You can customize the output by specifying your own XSLT using the styledir attribute of the nested report element: <!– use reportstyle/junit-frames.xsl to produce the report –> <report styledir=”reportstyle” format=”frames” todir=”testreport”/> For customizing the the output, one option … Read more

JAVA_HOME does not point to the JDK

Make JAVA_HOME variable point to a jdk installation, not jre. You are referencing the runtime environment, not the development kit – it can’t find the compiler because its not there. From the line you posted, which states you have open-jdk you can just remove the jre at end: export JAVA_HOME=’/usr/lib/jvm/java-6-openjdk/’

ant filtering – fail if property not set

If you are looking for a specific property, you can just use the fail task with the unless attribute, e.g.: <fail unless=”my.property”>Computer says no. You forgot to set ‘my.property’!</fail> Refer to the documentation for Ant’s fail task for more detail.

Why does Zipping the same content twice gives two files with different SHA1?

According to Wikipedia http://en.wikipedia.org/wiki/Zip_(file_format) seems that zip files have headers for File last modification time and File last modification date so any zip file checked into git will appear to git to have changed if the zip is rebuilt from the same content since. And it seems that there is no flag to tell it … Read more

Ant, Tomcat Build Error: java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/B2CConverter

I got this working by changing the classpath to <path id=”https://stackoverflow.com/questions/7251098/catalina-ant-classpath”> <!– We need the Catalina jars for Tomcat –> <!– * for other app servers – check the docs –> <fileset dir=”${appserver.lib}”> <include name=”catalina-ant.jar”/> <include name=”tomcat-coyote.jar”/> <include name=”tomcat-util.jar”/> </fileset> <fileset dir=”${appserver.home}/bin”> <include name=”tomcat-juli.jar”/> </fileset> </path>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)