ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour Al Akeel <mansour.alak...@gmail.com>
Subject Re: Create custom datatype programmatically
Date Sun, 05 Feb 2012 08:18:03 GMT
I use the name space "current" as in the example I read. However adding the
namespace to the argument of createDataType, worked as
expected.

Thank you Stefan.


On Sun, Feb 5, 2012 at 12:17 AM, Stefan Bodewig <bodewig@apache.org> wrote:

> On 2012-02-04, Mansour Al Akeel wrote:
>
> > In the class org.apache.tools.ant.Project, theres a method called
> > createDataType(String str).
> > The string argument, is the name of the type to be created.
>
> More specifically, if the type lives in a Namespace it has to be
> "namespace-URI:type-name".
>
> > 1- This can not be used if the new type is defined in a custom
> antlib.xml,
> > because it is not recognized.
>
> Do you use a custom namespace (likely when using an Antlib).
>
> > for example getProject.createDataType("jar") would create an instance of
> > the Jar Task.
>
> Probably you need something like
> getProject.createDataType("antlib:org.example.antlib:jar")
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message