ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com.au>
Subject RE: [PATCH] comma separated PVCS projects
Date Fri, 20 Apr 2001 02:06:26 GMT
>     public void addPvcsproject(String prj) {
>         pvcsProjects.addElement(prj);
>     }
> 
> However, when I do this and add a <pvcsproject> subelement to 
> <pvcs> I get:
> 
> d:\build.xml:105: Class 
> org.apache.tools.ant.taskdefs.optional.Pvcs doesn't
> support the nested "pvcsproject" element

Your "add" method cannot take a string argument.
I'm not sure why that is, but the IntrospectionHelper has this code:

if (name.startsWith("add")
     && java.lang.Void.TYPE.equals(returnType)
     && args.length == 1
     && !java.lang.String.class.equals(args[0])
     && !args[0].isArray()
     && !args[0].isPrimitive())

Your first arg cannot be an array, string, or primitive.

You have two options
  1) Using a "create" method might work. (?)
  2) Create a class "PvcsProject" that has a string contructor.

Mime
View raw message