Understood.
If the jars were copied from one location to another for use,  your projectA
could then run IF the jar file existed.
Your projectA.jar requires ProjectB.jar.

This is what I would do:
 1. Find projectB.jar from wherever, and copy to your own ${dist.dir}.
 2. If copy failed, and thus the projectB.jar is not present, then build
should fail.

I've never done if/then/else in ant  (too confusing with all the emails
thrown around).

T Master.

----- Original Message -----
From: "Herman, Dave" <[EMAIL PROTECTED]>
To: "'Ant Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 09, 2002 11:37 AM
Subject: RE: Inter-project dependencies?


> Thanks,
>
> The problem is that the projects are being developed separately, i.e.,
with
> separate directory structures and separate build scripts. There was a
> discussion last June on this mailing list about multiple build scripts,
but
> I had trouble finding solid conclusions from it.
>
> The reasons I'd like to use separate build scripts are:
>
> * different projects have different internal structure
> * different projects should be checked out of source control separately
>   to allow flexibility in what versions to use, so they need to be in
>   separate directory structures
> * it prevents one build script from getting huge and unmanageable
> * to avoid resource contention when multiple people want to make
>   changes to build scripts for different projects
>
> Of course, some of the problems with using multiple build scripts are that
> dependencies aren't as straight-forward and that the projects have to have
> some way of locating each other.
>
> (One way to avoid the whole problem is to build the projects separately
and
> just put the binary releases from one project into another, but our QA
> process requires that we deliver only sources of anything we've developed
to
> them, and they do the builds.)
>
> Thanks,
> Dave Herman
> [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: T Master [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 09, 2002 11:14 AM
> > To: Ant Users List
> > Subject: Re: Inter-project dependencies?
> >
> >
> > In my build file,
> > project A would not be built unless project B built.
> > This is handled using the depends attribute of  target.
> >
> > Forces correction of problems with the core projects.
> >
> > All jars built are put/copied into the ${dist.dir} location.
> > All jar names are given  property values e.g. ${projectA.jar.name}
> >
> > Hope that helps.
> >
> > T Master
> >
> >
> > ----- Original Message -----
> > From: "Herman, Dave" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, January 09, 2002 11:06 AM
> > Subject: Inter-project dependencies?
> >
> >
> > > Hello,
> > >
> > > How do people usually handle inter-project dependencies? We
> > have several
> > > interdependent projects, where building a release of
> > project A should
> > > include building project B and getting the latest release
> > of its jar file
> > in
> > > the distribution area for project A, such as this:
> > >
> > > A/
> > >     release/
> > >         lib/
> > >             A.jar
> > >             B.jar <-+
> > > B/                  |
> > >     release/        | (copied during A's build procedure)
> > >         lib/        |
> > >             B.jar --+
> > >
> > > Some possibilities I've thought of, but none of which seem
> > particularly
> > > lovely, would be requiring the other projects to be in a standard
> > location,
> > > passing in a -D parameter to specify the locations of other
> > projects, or
> > > keeping a text file that in source control that lists the
> > locations of the
> > > dependencies.
> > >
> > > How have others dealt with this?
> > >
> > > Thanks so much,
> > >
> > > Dave Herman
> > > [EMAIL PROTECTED]
> > >
> >
> >
> > --
> > 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]>
>


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

Reply via email to