hi

This what I have currently done, and as I am new to Ant any help would be
appreciated.

Directory looks as follows:
***************************************************
ContentIQ
  ---> Workflow
    ---> SharedComponent
       ---> SourceCode
         ---> Project
        ---> client
                --> shared
                         --> beans
                         --> rmiClient
                --> stdeimage
                         --> images
                         --> resources
        ---> Server
                --> shared
                        --> approx. 12 sub directories

        ---> Shared
                --> beans
                --> storage
                --> interfaces

Currently this is what my build file looks like :
****************************************************************************
*****
<!-- Build file for ContentIQ-SharedComponents -->
<project name="SharedComponent" default="copy" basedir=".">
<!-- ========================================= -->
<!-- initialise the variables -->
<!-- ========================================= -->
<target name="init">
 <property name="jardir"
value="c:\ContentIQ\Workflow\SharedComponent\SourceCode\Project.jar"/>
 <property name="Src"
value="c:\ContentIQ\Workflow\SharedComponent\SourceCode\Project\"/>
 <property name="Dest"
value="c:\ContentIQ\Workflow\SharedComponent\SourceCode\Project\classes"/>
</target>
<!-- ========================================= -->
<!-- Building the files -->
<!-- ========================================= -->
<target name="build" depends="init">
 <javac srcdir="${Src}"  destdir="${Dest}" />
 </target>
 <!-- ========================================= -->
 <!-- creating the jar files -->
 <!-- ========================================= -->
 <target name="jar" depends="build">
  <jar jarfile="Workflow.jar" basedir="${Dest}"/>
  <jar jarfile="WorkflowSrc.jar" basedir="${Src}"/>
 </target>
 <!-- ======================================== -->
 <!-- Copying files to release dir -->
 <!-- ======================================== -->
 <target name="copy" depends="jar">
 <copy todir="${jardir}">
 <fileset dir="${basedir}" includes="*.jar"/>
 </copy>
 </target>
 </project>

I included the additional jar file pw.jar to my classpath in the
environment, so that it would see it
Thanks
rose
Errors all refer to classes not being able to reference certain items, but
then why does this work with Forte and not with the build file.
There are approx. 100 errors.

-----Original Message-----
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 8:54 AM
To: Ant Users List
Subject: Re: doing a build with multiple directories


--- "Rosemarie Hannan (Financial IQ)" <[EMAIL PROTECTED]> wrote:
> I am trying to do a build that will compile multilpe classes which sit
> in multple directories, jar them and then copy them to a release
> directory so that it is ready for deployment. How do I do this? - as I
> have tired listing each one of the folders separately or alternatively
> list each main folder and include the sub directories via the "includes"
> command, but I have not had much success.

Since what you are trying to do is the most basic type of process for Ant
to be used for, you'll need to include a bit more information than just
saying you've "not had much success". In what way doesn't it succeed for
you?

If you want all your subdirectories included in the compile, from a single
target within a single top-level buildfile, you shouldn't need to list any
of them, but simply point 'srcdir' to the directory where your package
hierarchy starts.

> I also need the classes in the directories to reference
> another jar file that contain api.

See the Javac task description in the manual for information on adding
classpath elements.

Diane

=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to