>     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.

Reply via email to