How to add -Xlint in Ant's build.xml file?

Discussion in 'Java' started by RC, Mar 19, 2007.

  1. RC

    RC Guest

    I have a very simple section of ant's build.xml file
    for javac

    <target name="compile" depends="prepare">
    <javac srcdir="${src.dir}" destdir="${build.prod.dir}">
    <classpath refid="project.classpath"/>
    </javac>
    </target>

    For Java 1.5 or above, I need to add -Xlint option for javac
    Please tell me how to do that. I am still learning build.xml
    from O'Reilly's Ant book.

    Thank Q!
     
    RC, Mar 19, 2007
    #1
    1. Advertising

  2. RC wrote:
    > I have a very simple section of ant's build.xml file
    > for javac
    >
    > <target name="compile" depends="prepare">
    > <javac srcdir="${src.dir}" destdir="${build.prod.dir}">
    > <classpath refid="project.classpath"/>
    > </javac>
    > </target>
    >
    > For Java 1.5 or above, I need to add -Xlint option for javac
    > Please tell me how to do that. I am still learning build.xml
    > from O'Reilly's Ant book.


    Try:

    http://bobcat.webappcabaret.net/javachina/faq/ant_01.htm#ant_mid_Q100

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Mar 19, 2007
    #2
    1. Advertising

  3. RC <> wrote in news:etmkrg$bkd$3
    @news.nems.noaa.gov:

    > I have a very simple section of ant's build.xml file
    > for javac
    >
    > <target name="compile" depends="prepare">
    > <javac srcdir="${src.dir}" destdir="${build.prod.dir}">
    > <classpath refid="project.classpath"/>
    > </javac>
    > </target>
    >
    > For Java 1.5 or above, I need to add -Xlint option for javac
    > Please tell me how to do that. I am still learning build.xml
    > from O'Reilly's Ant book.


    Use the compilerarg task subelement, c.f.
    <http://ant.apache.org/manual/index.html>.

    cheers

    --
    ---------------------------------------------------------------------
    Greg R. Broderick

    A. Top posters.
    Q. What is the most annoying thing on Usenet?
    ---------------------------------------------------------------------
     
    Greg R. Broderick, Mar 21, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve R. Burrus

    What is the -Xlint

    Steve R. Burrus, Mar 7, 2004, in forum: Java
    Replies:
    1
    Views:
    17,270
  2. Flex
    Replies:
    0
    Views:
    511
  3. RC
    Replies:
    2
    Views:
    1,044
    Greg R. Broderick
    Mar 21, 2007
  4. Francois Lionet

    XLint

    Francois Lionet, Apr 24, 2007, in forum: Java
    Replies:
    2
    Views:
    862
  5. cyborgali
    Replies:
    1
    Views:
    964
    cyborgali
    Aug 15, 2008
Loading...

Share This Page