phasebash/jsdoc3-maven-plugin — pull request #17 by dhurrell (2013-08-05 19:33:54+00:00)
Title: Support older Maven versions - use File[] arrays for parameters

I'm using Maven 2.2.1 in my CI environment. Using this plugin without modification gives me the following error:

```
java.lang.ClassCastException: java.lang.String cannot be cast to java.io.File
at com.github.phasebash.jsdoc3.maven.tasks.JsDocArgumentBuilder.build(JsDocArgumentBuilder.java:65)
at com.github.phasebash.jsdoc3.maven.tasks.JsDocTask.execute(JsDocTask.java:27)
at com.github.phasebash.jsdoc3.maven.tasks.JsDocTasks.run(JsDocTasks.java:36)
at com.github.phasebash.jsdoc3.maven.JsDocMojo.execute(JsDocMojo.java:95)
...
```

I don't understand Maven plugins enough to have any great insight into the problem, but based on a similar issue it appears that old versions of Maven don't reflect on generic collections in plugins correctly:
https://code.google.com/p/jslint4java/issues/detail?id=64
https://code.google.com/p/jslint4java/source/detail?r=0de26f13ae7fc232c886565ddb8fe909a02725e0

Based on the fix above, mine uses a File[] array instead. I've tested the attached fix and it allows the plugin to run successfully on Maven 2.2.1 (as well as Maven 3.0.3, where it always worked first time).

Incidentally, I tried converting the arrays back to a generic collection inside the TaskContext.Builder(), but this lead to a MethodNotFoundException in JsDocArgumentBuilder.java:65 instead - presumably type related. I don't know enough to guess the cause of this either.

Comments welcome!