[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Conditional disabling of unused Ant targets

On Sun, Sep 03, 2006 at 02:51:26PM +0200, Marcus Better wrote:
> Hello,
> I'm working on a few packages related to JBoss. One problem is that the
> build files often contain targets and taskdefs which depend on lots of
> external JAR files, but which are really not needed to build the package.
> The problem is that Ant tries to load those external classes on each run,
> even if they are not needed for the target I want to call (such
> as "clean").
> Is there a way to conditionally disable this class loading (by testing on
> some property value, for example), without cutting them out of the build
> file entirely?
Unless the targets of the project allow you to exclude the ones with the
dependencies that you have deemed as unnecessary, then you may be
relegated to patching the build file, which is what we have had to do
oftentimes in the past.

I hope the parts being patched out do not include any test suites that
ensure that the library or app still behaves as expected. 8^)

Barry Hawkins
All Things Computed
site: http://www.alltc.com
weblog: http://www.yepthatsme.com

Registered Linux User #368650

Attachment: signature.asc
Description: Digital signature

Reply to: