Patternsets to the rescue!

<patternset id="src">
    <include ${pattern1}.java/>
</patternset>

<javac
    sourcepath="">
    <patterset refid="src"/>
</javac>

Your different tasks can define different patternsets for source files.

On Thu, Aug 20, 2009 at 10:08 AM, Stefan Walter <[email protected]>wrote:

> Hi,
>
> is there a good/elegant recipe for selecting those source files that javac
> chose to compile?
>
> I have a single source directory containing the project's classes and
> multiple targets compiling subsets of these classes into distinct
> destination directories. For at least one of these subsets, I would like
> to also copy the source files over to the destination directory to include
> it in the distribution.
>
> At the moment, I could imagine two ways:
>
> - Using the output of the 'listfiles' parameter of the javac task in some
>  way.
> - Taking the names of the class files in the destination directory,
>  replacing '.class' with '.java' and filtering out inner classes.
>
> Does anyone know a better/more elegant approach?
>
> Stefan
> --
> No reading beyond this point
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
David Weintraub
[email protected]

Reply via email to