ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lokesh Jayaraman" <>
Subject Regarding compile only valid java files, skipping uncompilable files
Date Mon, 26 Feb 2007 05:08:55 GMT
Hi EveryBody,
I used  ANT script to compile only valid java files and also skip
umcompilable files using following script.

<project name="javac-test" default="compile">

    <taskdef resource="net/sf/antcontrib/"/>

    <property name="src.dir" value="." />
    <property name="classes.dir" value="." />

    <target name="compile">
        <foreach target="javac" param="file">
                <fileset dir="${src.dir}" includes="**/*.java" />

    <target name="javac">
        <basename property="" file="${file}"/>


But in that i faced the  problem to compile all java files.

*Problem :*
if java source direcotry is "Src".
the above script is good to compile all java files in "Src" directory. but
in that "Src" directory consists any subdirectory which has java files means
,but  it wont compile  . My requirement : i need to compile all files
including sub directory also.

Kindly help me to solve problem

Expecting your favouable reply regarding My Problem


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message