ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: [PATCH] XCatalog - Fixed bugs in XCatalog.java
Date Tue, 05 Mar 2002 03:15:50 GMT
> From: dIon Gillard [mailto:dion@multitask.com.au]
>
> Speaking of which, there's no checkstyle target in ant's build file. How
> do you guys feel about one being added in? Personally at least knowing
> that there are 1000s of variations from the coding standard gives some
> doc-aholic a chance to contribute :)

There were over 11000 "issues" highlighted by checkstyle last time I ran it
on Ant. I tend to use a little more focus to keep it workable. Slowly but
surely. I have added a project descriptor for checkstyle to Gump so it would
be possible to do a checkstyle run over Ant on a nightly basis. Let's see
how it goes with mutant's build in tonight's gump run.

I have a simple check.xml for running checkstyle on Ant if you are
interested.

>
> > I have changed the createXCatalog method to addXCatalog - should not
> > affect things and may support polyrolism more easily.
>
> Is there any info on the difference between the two? I used
> createXCatalog because theoretically there should only be one catalog
> for the task. I haven't (yet) made that an exception in the code, but
> that was the intention.

You can have that exception with both. createXXX does not stop the provision
of multiple catalogs. In fact when using references it may be good to have
multiple catalogs, e.g. if you were including the catalog definitions for
different sources.

The main difference between addXXX and createXXX is that the for the addXXX
method, Ant is responsible for object creation. In some later version of
Ant, the user may be able to supply a subclass rather than the straight
class in your code. With createXXX the task is responsible for creation and
no subclasses are possible. In general and where possible, addXXX methods
are probably preferred due to this extensibility.

>
> Also, in the joys of writing these, one of the things I thought about
> was adding a target or two to the build file:
>     - gen-task (Generates skeleton code for a task, including test build
> file, source code and testcase)
>     - gen-type (Similar but for data types)
>

Not sure how useful these are as Ant tasks as you don't want to generally
run these as part of a build. Perhaps separate standalone utilities with Ant
would be better.

Conor


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message