<p>Every time I create a new project I copy the last project's ant file to the new one and make the appropriate changes (trying at the same time to make it more flexible for the next project). But since I didn't really thought about it at the beginning, the file started to look really ugly.</p>

<p>Do you have an Ant template that can be easily ported in a new project? Any tips/sites for making one?</p>

<p>Thank you.</p>

I used to do exactly the same thing.... then I switched to
maven
.  Maven relies on a simple xml file to configure your build and a simple repository to manage your build's dependencies (rather than checking these dependencies into your source control system with your code).
One feature I really like is how easy it is to version your jars - easily keeping previous versions available for legacy users of your library.  This also works to your benefit when you want to upgrade a library you use - like junit.  These dependencies are stored as separate files (with their version info) in your maven repository so old versions of your code always have their specific dependencies available.
It's a better Ant.