ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vojta Filip <vo...@idoox.com>
Subject Re: Fileset of src files
Date Tue, 14 Aug 2001 08:15:19 GMT
On 13 Aug 2001, Stefan Bodewig wrote:

> On Mon, 13 Aug 2001, Vojta Filip <vojta@idoox.com> wrote:
>
> > I want prepare source files:
> >
> >   <path id="src.files" path="${src.dir}">
> >     <fileset dir="${src.dir}"
> >              includes="demos/**/My*.java"
> >              excludes="demos/**/*Impl.java">
> >     </fileset>
> >   </path>
>
> This defines a PATH consisting out of .java files - I know no
> application that deals with something like this.
>
> > and use it in javac:
>
> try
>
>   <javac destdir="${dest.dir}" debug="${debug}" srcdir="${src.dir}">
>     <include name="demos/**/My*.java" />
>     <exclude name="demos/**/*Impl.java" />
>   </javac>
>
> and if you are looking for something more reusable, you want to define
> a <patternset>, not a <path>.
>
> Stefan
>

I need to construct set of files to compile, use it in javac ant print it
in echo. PatternSet is good for javac but not for echo. I must create a
PatternSet:

<patterneset id="a">
  ....
</pat...>

then a fileset:

  <fileset id="b" dir="mydir">
    <patternset refid="a">
    </patternset>
  </fileset>

and path:

  <path id="c">
    <fileset refid="b">
    </fileset>
  </path>

and now I can print it and use in javac:

    <property name="d" refid="c"/>
    <echo>java ${d}</echo>
...
    <javac srcdir="mydir">
      <patternset refid="a">
      </patternset>
    </javac>

Is here any simplier way to do this?

 Vojta



Mime
View raw message