ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Petterson \(KI/EAB\)" <>
Subject Advice on major build system
Date Tue, 30 Nov 2004 13:41:59 GMT

I am using ant to build our products. I am using ant 1.6.2

I have a common.xml containing the following targets:

* init
* compile
* jar 
* clean
* test:compile
* test:test

also a test-target that depends on test:setup, test:compile and test:test.

I also have  a with with common properties.

This can be used in all our products. I do the following in each specific build file:

<property file="/vobs/rbs/sw/rbssw1/boam_subsys/boam_swb/boam_bldu/ant_build/"/>

<import file="/vobs/rbs/sw/rbssw1/boam_subsys/boam_swb/boam_bldu/ant_build/common.xml"/>

Then in each specific '<product>.xml' I have two different targets:

setup and test:setup

<target name="setup">
   <echo message="using target classpath"/>
   <path id="common.classpath">
    <pathelement location="${CELLO.DIR}/${CMA.JAR}"/>
    <pathelement location="${CELLO.DIR}/${FOUNDATION.JAR}"/>
    <pathelement location="${CELLO.DIR}/${OMS.JAR}"/>
    <pathelement location="${CELLO.DIR}/${VBJORB.JAR}"/>
    <pathelement location="${CELLO.DIR}/${ASMS.JAR}"/>

  <target name="test:setup">
   <echo message="checking if boam.jar exists!"/>
    <ant antfile="/vobs/rbs/sw/rbssw1/boam_subsys/boam_swb/boam_bldu/ant_build/boam.xml"
dir="/vobs/rbs/sw/rbssw1/boam_subsys/boam_swb/boam_bldu/ant_build" target="jar"/>
   <echo message="checking if bros.jar exists!"/>
 <ant antfile="/vobs/rbs/sw/rbssw1/boam_subsys/test_boamss/brosfro_swb/brosfro_bldu/ant_build/brosfro.xml"
dir="/vobs/rbs/sw/rbssw1/boam_subsys/test_boamss/brosfro_swb/brosfro_bldu/ant_build" target="jar"/>

   <echo message="using test classpath"/>
   <path id="test.classpath">
    <pathelement location="${BDE.DIST.DIR}/${BDE.JAR}"/>
    <pathelement location="${BOAM.DIST.DIR}/${BOAM.JAR}"/>
    <pathelement location="${JUNIT.LIB.DIR}/${JUNIT.JAR}"/>
    <pathelement location="${XALAN.LIB.DIR}/${XALAN.JAR}"/>
    <pathelement path="${java.class.path}"/>

Q1: When I run boam.xml with target test ( includes test:setup) I need to check that the jars
for boam and brosfro is built and uptodate and exists.
      Is ant-task best to use. Or is there a smarter way?

Q2: When run <ant antfile="/vobs/rbs/sw/rbssw1/boam_subsys/test_boamss/brosfro_swb/brosfro_bldu/ant_build/brosfro.xml"
dir="/vobs/rbs/sw/rbssw1/boam_subsys/test_boamss/brosfro_swb/brosfro_bldu/ant_build" target="jar"/>
      I get a complaint that test:setup does not exist in brosfro.xml! Then I add an empty
test:setup-target in brosfro.xml and 
      I get no complaint. But I did call brosfro.xml with jar target. Why do I get a complaint?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message