ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Charters <mchar...@umich.edu>
Subject classpath
Date Wed, 24 Jul 2002 00:00:48 GMT
hi,

i would like to define some kind of datatype with a list of all the
library jarfiles that my project includes.

i would like to be able to reference this same datatype a few times in
my build file ... for the classpath of a javac task, for the classpath
of a java task, and for the source files of a copy task.

because the copy task only takes filesets, filtersets, and mappersets i
decided a fileset would probably be the best bet.

this is how i defined my fileset at the beginning of the build.xml file:

  <property name="classDir" value="classes"/>
  <property name="repastDir" value="/appl/repast/repast1.4.1"/>
  <property name="cscslibDir" value="/appl/java/CSCS"/> 
  <property name="visadDir" value="/appl/java/visad2.0"/>

  <fileset id="classpath.fileset" dir="/">
    <include name="${repastDir}/lib/repast.jar"/>
    <include name="${repastDir}/lib/colt.jar"/>   
    <include name="${repastDir}/lib/jgl3.1.0.jar"/>
    <include name="${cscslibDir}/graph3d.jar"/>
    <include name="${cscslibDir}/ioutils.jar"/>
    <include name="${cscslibDir}/hbbeta2-printf.jar"/>
    <include name="${cscslibDir}/Test/modelparameters.jar"/>
    <include name="${visadDir}/visad.jar"/>
    <include name="${classDir}"/>
  </fileset>

i have the dir as "/" because the files are all over the system ... so i
need to reference them with respect to the root dir (this is for the
development version only, the dist versions will come with all these
libs in a built-in lib dir so that the program is "flexible" with
respect to being able to copy it to other machines easily)

my javac task looks like this:

    <javac destdir="${classDir}">
      <src path="${srcDir}"/>
      <include name="${currentLS}/*.java"/>
      <classpath>
        <fileset refid="classpath.fileset"/>
      </classpath>
    </javac>

when i call the target that calls this javac task ant prints out all the
error messages from javac ... and for some reason it just looks like
javac cannot find any of the libraries ... (it just says package XXX
does not exist 100 times")

does anyone know what i am doing wrong ... or have another suggestion of
a better datatype for storing the classpath so it is flexible...

what do people normally store the classpath in?

thanks a lot,

-Mike


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


Mime
View raw message