properties file

Create a properties file for Java web app

After playing with JavaScript for a while, I got a chance to jump back to the server-side for a bit. I found myself a need to create a properties file. A look on the Internet led me to Vince’s blog. It has 90% of what I need. The missing piece was to add an ant task to copy the properties file right before building the WAR file. Here is my version of the ant task:

<target name="-pre-dist">
    <copy todir="build/web/WEB-INF/classes">
        <fileset dir="src" includes="*.properties"/>
    </copy>
</target>    

After adding the ant task, everything works beautifully! :)