You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Antoine Levy-Lambert <le...@tiscali-dsl.de> on 2003/05/14 09:50:53 UTC
antlib / proposal of Peter Reilly
I am having a look at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19897
This proposal seems to address most of the points discussed in this mailing list concerning the antlib thread of discussion.
I was thinking maybe we do not need to look further and we could commit this contribution ?
I would be glad to hear your comments concerning :
1) the functionality provided by the contribution
2) the implementation
I am quoting Peter Reilly here :
This patch adds 4 new features (the code is interrelated,
but may be split).
* adapter attribute added to typedef
* add(Type) method added to introspection rules
* typedef can read an xml defintion file
* namespace support for xml defintions (antlib:)
So one can do
<project xmlns:acme="org.acme.anttasks">
<acme:hello>
<path path="build.xml"/>
</acme:hello>
</project>
where the class path contains the org/acme/anttasks/antlib.xml
and the antlib.xml file contains:
<antlib>
<typedef name="hello" classname="org.acme.anttasks.Hello"/>
</antlib>
ToDo: add in support for ant-type polymorphism and addConfigured(Type).
also more error checking and unit tests.
Antoine
Re: antlib / proposal of Peter Reilly
Posted by peter reilly <pe...@corvil.com>.
On Wednesday 14 May 2003 08:50, Antoine Levy-Lambert wrote:
> I am having a look at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19897
>
> This proposal seems to address most of the points discussed in this mailing
> list concerning the antlib thread of discussion.
>
> I was thinking maybe we do not need to look further and we could commit
> this contribution ?
I think it should be looked at before committing ;-)...
I unified the type and task hashmaps in componentHelper to support the adapter
idea for typedef. This may have consequences for current external third party
ant tasks.
>
> I would be glad to hear your comments concerning :
> 1) the functionality provided by the contribution
> 2) the implementation
> I am quoting Peter Reilly here :
>
> This patch adds 4 new features (the code is interrelated,
> but may be split).
> * adapter attribute added to typedef
> * add(Type) method added to introspection rules
> * typedef can read an xml defintion file
> * namespace support for xml defintions (antlib:)
> So one can do
> <project xmlns:acme="org.acme.anttasks">
^^^ opps - that should be <project xmlns:acme="antlib:org.acme.anttasks">
> <acme:hello>
> <path path="build.xml"/>
> </acme:hello>
> </project>
> where the class path contains the org/acme/anttasks/antlib.xml
> and the antlib.xml file contains:
> <antlib>
> <typedef name="hello" classname="org.acme.anttasks.Hello"/>
> </antlib>
>
>
> ToDo: add in support for ant-type polymorphism and addConfigured(Type).
> also more error checking and unit tests.
>
Peter
Re: antlib / proposal of Peter Reilly
Posted by peter reilly <pe...@corvil.com>.
On Saturday 17 May 2003 20:16, Costin Manolache wrote:
> Antoine Levy-Lambert wrote:
> > I am having a look at
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19897
> >
> > This proposal seems to address most of the points discussed in this
> > mailing list concerning the antlib thread of discussion.
> >
> > I was thinking maybe we do not need to look further and we could commit
> > this contribution ?
> >
> > I would be glad to hear your comments concerning :
> > 1) the functionality provided by the contribution
> > 2) the implementation
> > I am quoting Peter Reilly here :
> >
> > This patch adds 4 new features (the code is interrelated,
> > but may be split).
> > * adapter attribute added to typedef
>
> +1
>
> > * add(Type) method added to introspection rules
>
> +1
>
> > * typedef can read an xml defintion file
>
> +1 - but I need further review of the XML DTD ( and maybe some changes )
>
> > * namespace support for xml defintions (antlib:)
> > So one can do
> > <project xmlns:acme="org.acme.anttasks">
> > <acme:hello>
> > <path path="build.xml"/>
> > </acme:hello>
> > </project>
>
> +1
>
> We should also support the
> <antlib classpath="cp" resource="..." uri="NSURI>
The above should be <typedef classpath="cp" resource=".." uri="NSURI"/>.
The "antlib" task in my proposal is not meant to be used in a build script.
> <acme:hellp xmlns:acme="NSURI" >
>
> This would allow arbitrary NSURIs ( for people who like meaning-free URIs)
> and allow the classpath association.
I do not want meaning-free URIs.
I want ant to ignore URIs that it does not understand.
At the time of processing the typedef's uri, the parsing has been complete, so
my rule is that uri's used in <typedef/> have to start with "antlib:".
<typedef classpath="cp" resource=".." uri="antlib:arbitarystring"/>
where "arbiratystring" is an arbitary string, but the package from is
treated specially with first encountered.
An example of using other URIs is
http://www.w3.org/TR/2003/WD-xhtml2-20030506/xhtml20_relax.html#a_xhtml20_relaxng
I include an example in friday's patch:
src/etc/testcases/xmlns.xml which is a build file and a html page.
Peter
Re: antlib / proposal of Peter Reilly
Posted by Costin Manolache <cm...@yahoo.com>.
Antoine Levy-Lambert wrote:
> I am having a look at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19897
>
> This proposal seems to address most of the points discussed in this
> mailing list concerning the antlib thread of discussion.
>
> I was thinking maybe we do not need to look further and we could commit
> this contribution ?
>
> I would be glad to hear your comments concerning :
> 1) the functionality provided by the contribution
> 2) the implementation
> I am quoting Peter Reilly here :
>
> This patch adds 4 new features (the code is interrelated,
> but may be split).
> * adapter attribute added to typedef
+1
> * add(Type) method added to introspection rules
+1
> * typedef can read an xml defintion file
+1 - but I need further review of the XML DTD ( and maybe some changes )
> * namespace support for xml defintions (antlib:)
> So one can do
> <project xmlns:acme="org.acme.anttasks">
> <acme:hello>
> <path path="build.xml"/>
> </acme:hello>
> </project>
+1
We should also support the
<antlib classpath="cp" resource="..." uri="NSURI>
<acme:hellp xmlns:acme="NSURI" >
This would allow arbitrary NSURIs ( for people who like meaning-free URIs)
and allow the classpath association.
Costin