ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Jackl-Mochel" <jmoc...@foliage.com>
Subject RE: Subproject builds and a master build
Date Thu, 12 Apr 2001 13:23:47 GMT
Subproject builds and a master buildI'm working on a project that has a
large number of dependent projects. we added up defining
a top level build directory at the level above the dependent projects. all
of the dependent project's ant
Files include an entity reference to the configuration file in the top level
directory.

The directory structure looks like this:

\TopLevel\
\TopLevel\scm
\TopLevel\scm\config.ant
\TopLevel\scm\master.ant

\TopLevel\Project1
\TopLevel\Project1\build
\TopLevel\Project1\build\project.ant

\TopLevel\Project2
\TopLevel\Project2\build
\TopLevel\Project2\build\project.ant


Here is a portion of the config.ant. (The basic idea here is that this file
is the only file to directly deal with the supplied properties
that govern the locations of tools).

<!--
 Unpublished work, created 2001.
 $Author: Jmochel $
 $Date: 12.05.00 2:29p $
 $Revision: 5 $
-->
<!-- Properties coming in from the JVM -->
<!--
    We specifiy the paths to tools explicitly
-->
<property name="ProjectHome"   value="${PROJECTHOME}" />
<property name="KawaHome"    value="${KAWAHOME}" />
<property name="WebLogicHome"   value="${WEBLOGICHOME}" />
<property name="JDKHome"    value="${JDKHOME}" />
<property name="J2EEHome"    value="${J2EEHOME}" />
<property name="BuildTarget"   value="${BUILDTARGET}" />

<!-- Derived Properties  -->

<property name="EJBAssembler" value="weblogic.ejbc" />
<property name="EJBJavaCompiler" value="jikes" />

<property name="ProjectClassDir"
value="${ProjectHome}/builds/${BuildTarget}/classes" />
<property name="ProjectAssemblyDir"
value="${ProjectHome}/builds/${BuildTarget}/deployment" />
<property name="ProjectDocDir" value="${ProjectHome}/builds/javadocs" />
<property name="ProjectLogDir"
value="${ProjectHome}/builds/${BuildTarget}/logs" />
<property name="ProjectTempDir"
value="${ProjectHome}/builds/temp/${BuildTarget}" />
   The master.ant has an entity reference for the config file:

  <!-- Include the config file -->
  <!DOCTYPE project [
      <!ENTITY common SYSTEM "file:./config.ant">
      <!ENTITY PrepareTarget SYSTEM "file:./jar.prepare.target.ant">
  ]>
  <project name="Master" default="compile">
  &common;

  The project.ant also has an entity reference for the config file:

  <!DOCTYPE project [
      <!ENTITY common SYSTEM "file:../../build/config.ant">
      <!ENTITY PrepareTarget SYSTEM
"file:../../build/jar.prepare.target.ant">
  ]>
  <project name="core.app" default="compile">

  I hope this helps. and if anyone comes up with anything better, please
post it to the list.

  Jim


   -----Original Message-----
  From: Nicolas LEHUEN [mailto:nicolas.lehuen@ubicco.com]
  Sent: Wednesday, April 11, 2001 9:58 AM
  To: 'ant-user@jakarta.apache.org'
  Subject: RE: Subproject builds and a master build


  Hi,

  This looks like the same problem that I have, for which I posted a
question yesterday on the list. I am highly interested in any answer you
could get.

  For now, I just declare the compilation output directory (with .class
files) from subprojectA in the compilation classpath of subprojectB (with a
<pathelement location="${subprojectAoutputdir}"/> directive). The problem is
that each subproject must explicitely list their dependencies in their
compilation classpath...

  Regards,
  -------------------------------------
  Nicolas Lehuen
  Head of R&D - Responsable R&D
  Ubicco - http://www.ubicco.com
  A FI System Company - http://www.fisystem.com

    -----Message d'origine-----
    De : M.A.Dunphy [mailto:madunphy@bigfoot.com]
    Envoyé : mercredi 11 avril 2001 15:42
    À : Ant-User (E-mail)
    Objet : Subproject builds and a master build


    Hi all,

    I've a couple of subproject build files that work independently from
each other. To correctly build some subprojects, it requires the necessary
jars are in the classpath: Thus is subprojectB depends on subprojectA, then
running subprojectB means that you must have subprojectA.jar in the
classpath.

    Now I'm writing a master build file which builds all the others via ant
targets. Thus I'd build subprojectA, and then subprojectB. What I'd like to
know is how do I modify the classpath so that when I run subprojectB (via
the ant target) it see the recently built subprojectA.jar?

    Thanks

    Mick


    --------------InterScan_NT_MIME_Boundary--

Mime
View raw message