ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McTavish <dmctav...@sandvine.com>
Subject RE: Using Ant with a Modular System Design
Date Thu, 28 Aug 2003 14:36:36 GMT
Another thing that I've done in my builds is I've made all build scripts
implement two build targets: build, and build.interface. The build.interface
works a little faster by compiling and archiving only the source files that
are necessary for sharing throughout other peer apps. Makes it easier when
you have to import dependencies from projects that pre-compiling jsp's, or
.ears that aren't necessary.

d.


-----Original Message-----
From: David McTavish [mailto:dmctavish@sandvine.com]
Sent: Thursday, August 28, 2003 10:31 AM
To: 'Ant Users List'
Subject: RE: Using Ant with a Modular System Design


unfortunately, no. I would add a target that imports the dependency in the
original build.xml to do so, and use antcalls to import the library. (This
might be possible in ant v1.6, but we're staying at 1.5 for at least another
6 months until the next release of our project completes).

ie:

    <target name="compile" depends="global.init,depend">
        <antcall target="compile.init"/>
        <antcall target="compile.impl"/>
        <antcall target="compile.cleanup"/>
    </target>

    <target name="depend">
        <antcall target="depend.impl"/>
    </target>

    <target name="depend.impl">
        <ant dir="${depend.lib}" target="build.interface"
inheritall="false">
            <property name="target.dir" value="${target.dir}"/>
            <property name="compile.verbose" value="${compile.verbose}"/>
            <property name="compile.optimize" value="${compile.optimize}"/>
            <property name="compile.debug" value="${compile.debug}"/>
            <property name="verbose" value="false"/>
        </ant>
    </target>


I've got some additional targets on top of this that verify if the dependent
.jar archive has already been imported to prevent multiple imports, etc.

d.


-----Original Message-----
From: Kevin G. Crocker [mailto:KGC@rsssolutions.com]
Sent: Thursday, August 28, 2003 10:20 AM
To: Ant Users List
Subject: RE: Using Ant with a Modular System Design


Many other modules use the database therefore it is left in a common
module which, of course, gets built first when called from higher
levels.

Just a fleeting thought.  Can the depends= reference a target in another
build file.


-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
Sent: Thursday, August 28, 2003 10:13 AM
To: Ant Users List
Subject: Re: Using Ant with a Modular System Design


What else is that database used for?  Maybe the
database should be a sub-module of the module to be
tested?

-Matt

--- "Kevin G. Crocker" <KGC@rsssolutions.com> wrote:
> Having developed a modular structure I have placed a
> build file in each
> module.  The system as a build file structure that
> if called from the
> highest level then all prereq builds are completed.
>  
> For example, one module will create a database in a
> known state.
> Another module uses this database for unit testing.
>  
> When run from the upper most build file everything
> is fine but I would
> like a way to run a lower level build file (calling
> the unit test)
> without having to remember to run a upper level
> build file to create the
> database.
>  
> I know about using  the depends attribute but isn't
> this only within the
> build file not across build files.
>  
> Any advice would be welcome.
>  
>  
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message