ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Classpath not present problem
Date Fri, 11 May 2001 07:55:33 GMT
Adam Flegman <adam.flegman@astracon.com.au> wrote:

> I think the line of code failing is the <fileset dir="...."
> command. The directory it is referring to isnt actually in existence
> at the begining of the whole process, but rather it gets created as
> a result of a cvs checkout.

This has been fixed to a certain extend in Ant 1.4alpha, as fileset
will not try to assert the directory's presence before it actually
gets used for the first time.  Unfortunately, this is not going to
help in your case, as the path construct is going to expand the
fileset immediately.

A workaround would be to not declare the path at the project level,
but spell it out at the point where you use it for the first time, so
instead of

<path id="orbix.classpath">
  <fileset dir="${output.vc.lib.dir}">
    <patternset refid="orbix.files"/>
  </fileset>
</path>

<target ...>
  <javac ...>
    <classpath refid="orbix.classpath" />
  </javac>
  <rmic ...>
    <classpath refid="orbix.classpath" />
  </rmic>
</target>

do something like

<target ...>
  <javac ...>
    <classpath id="orbix.classpath">
      <fileset dir="${output.vc.lib.dir}">
        <patternset refid="orbix.files"/>
      </fileset>
    </classpath>
  </javac>
  <rmic ...>
    <classpath refid="orbix.classpath" />
  </rmic>
</target>

Stefan

Mime
View raw message