ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "didge" <di...@foundrylogic.com>
Subject RE: compile only valid java files, skipping uncompilable files
Date Wed, 12 Feb 2003 18:35:11 GMT
Add to this a naming convention or packaging convention for your potentially
uncompilable files so that you can easily exclude them as a group in one of
the targets.

Another solution is to keep your uncompilable files in a source directory.
<javac> let's you specify multiple source paths and most IDE's support this
as well.

didge

> -----Original Message-----
> From: Benoit Voisin [mailto:benoit.voisin@ergoidp.dk]
> Sent: Wednesday, February 12, 2003 2:41 AM
> To: 'Ant Users List'
> Subject: RE: compile only valid java files, skipping uncompilable files
>
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


Mime
View raw message