Please alter the Castor Maven2 plugin so that it supports binding files for multple xml schemas:
Right now its possible to use the 'schemaDirectory' parameter to configure the plugin to run the SourceGenerator on all of the XSD's in a specified directory. However, when using this parameter, there is no way to specify the name of the binding files for each XSD.
In Maven 1, I was able to do this by naming the binding files after their corresponding schema according to the following rule:
If the schema was named 'foo.xsd', then its binding file would be named 'foo.xsd.binding'. I then created a maven goal such that when it would loop on the directory with the schemas, it would take the schema name and append '.binding' to specify which binding file to use.
I have included a sample Maven 1 project which has this behaviour. The maven.xml has the goal (named 'bind') and the filescanner of rellevance which build the list of schemas (and their binding files) to run the SourceGenerator on.