ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdef s Zip.java
Date Thu, 21 Feb 2002 11:38:56 GMT
> However far more importantly IMHO is
> 
> o Leaving stuff in makes it harder to write build files due 
> to inconsistencies

Yup.
 
> > It strikes me that aside from the part about choosing a 
> > single preferred name, 
> 
> I think we just need someone to step up and rigourously 
> define a "standard" approach to naming attributes/elements and
> then document this stanrd. From 
> now on we could start using it. We already sort of decided on 
> destFile/srcFile etc but it is not documented etc

Sounds good to me.

> > a dedicated alias facility in taskdefs would get round a 
> lot of this.
> 
> It has been proposed before and will possibly be available 
> via a TaskInfo 
> object. To generate the TaskInfo object you could specify 
> attributes in your tasks javadocs. ie
> 
> /**
>  * @ant:alias classpath Use Classpath attribute instead
>  */
> public void setCP( ... ) { ... }

Ah, but that keeps the complexity in the code. With my suggestion, the aliases would be defined
in some XML somewhere, along with the rest of the task definition (name->class mapping
etc). The code wouldn't even know there were aliases.

Obviously my current task biases me somewhat towards solutions which end up with less code,
but I think I'd still have that as a goal in normal circumstances :)

Jon
Mime
View raw message