ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Jar file should access config file
Date Thu, 27 Mar 2003 15:47:36 GMT
<javac> usually output it's classes in the classes/ directory. Most people
also have a <copy> task that copies resources files from the source
directory into the classes/ directory. Then the jar target jars up that
classes/ directory. --DD

  <target name="compile" depends="init, -classes, -resources"
          description="Compiles the java source files" />

  <target name="-classes">
    <javac srcdir="src" source="1.4"
           destdir="build/classes"
           includeAntRuntime="false"
           deprecation="true" debug="true" verbose="false"
           fork="false">
      <classpath refid="classpath" />
    </javac>
  </target>

  <target name="-resources">
    <copy todir="build/classes">
      <fileset dir="src">
        <include name="**/*.gif" />
        <include name="**/*.properties" />
      </fileset>
    </copy>
  </target>

  <target name="jar" depends="compile, version"
          description="Creates JAR file
    <jar jarfile="build/acme.jar"
         basedir="build/classes">
      <manifest>
        ...
      </manifest>
    </jar>
  </target>

-----Original Message-----
From: Vladimirka Pereula [mailto:vpereula@shaw.ca] 
Sent: Wednesday, March 26, 2003 5:23 PM
Cc: user@ant.apache.org
Subject: Jar file should access config file

I am new in using ant and application which I should use ant for has
properies file which is in config folder. How can I make jar fle which must
access  config files needed.
Thanks.
val.

Mime
View raw message