ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Voisin <benoit.voi...@ergoidp.dk>
Subject RE: compile only valid java files, skipping uncompilable files
Date Wed, 12 Feb 2003 10:40:59 GMT
Just an idea:
If you know which file will fail, you can try excluding them (excludes
attribute of the javac task).
And eventually rerun javac without exclusion to try compiling them anyway.

Benoit

-----Original Message-----
From: Tobias.Hill@hm.com [mailto:Tobias.Hill@hm.com]
Sent: 12 February 2003 11:14
To: user@ant.apache.org
Subject: 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>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
View raw message