You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by To...@hm.com on 2003/02/12 11:14:19 UTC

compile only valid java files, skipping uncompilable files

Hi,

I would like to be able to compile all java-
files in a certain directory stucture and 
have them outputted to a destination dir. 
This in itself is very staightforward as
long as _all_ java-files in the source 
directory _can_ be compiled. But when there
are any file in the source directory that 
does not compile no class files at all will 
be put in the destnation dir!

In the certain situation I am in (I have some
"junitdoclet-generated" test java-stubs that 
does not compile (and intentionally I like to 
leave it that way)) I really need to get at 
least those class-files that do compile
to apear in the dest-dir. 

How do I do this? 
Please help me out here. 

/Tobias

- - - - - - - - - - - - - - - - - - - - - - 

Addendum:
The ant task looks like this

        <!-- Compile Java TEST classes for application -->
        <javac
            srcdir="${src.test.dir}"
            destdir="${build.classes.dir}/tests"
            classpathref="app.class.path"
            debug="${build.debug}"
            failonerror="false"
            >
            <include name="**/*"/>
            <exclude name="**/ejb/**/*"/>
            <exclude name="**/web/**/*"/>
        </javac>