NetBeans Quick Tip #5 - EOL Sweeper
In the
last tip I have shown you how to extend the build process. There are many possibilities how to use ant - take a look at
the list of task categories in ant's manual.
Let's say I am working on Linux and I want my sources to always have Windows line endings. Why? So that BFU Windows users can view my source codes in Notepad :-) I can add a single line into the build script (e.g. into the post-compile target):
<target name="-post-compile">
<fixcrlf srcdir="${src.dir}" eol="crlf"/>
</target>
Whenever I build my project all line endings of my sources are fixed. Note that NetBeans preserves the line ending settings, so it's not necessary to do it everytime. If you don't want to do this during every build (when having too many classes) you can create your own target, which you will call on demand. It is automatically added into the context menu:
<target name="EOL sweeper">
<fixcrlf srcdir="src" eol="crlf"/>
</target>

EOL sweeper
Isn't ant wonderful?