« červen 2005 »
PoÚtStČtSoNe
  
   
       
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 261

Contacts

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Bill Vass
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
« Previous day (May 31, 2005) | Main | Next day (Jun 1, 2005) »
20050601 Středa červen 01, 2005
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?


    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.