Mojo's Castor Maven Plugin
  1. Mojo's Castor Maven Plugin
  2. MCASTOR-11

Add support to Castor Maven2 Plugin so that it works with binding files for multiple xml schemas.

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.6
    • Component/s: Core MOJOs
    • Labels:
      None
    • Number of attachments :
      1

      Description

      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.

        Activity

        Hide
        Matt Brozowski added a comment -

        I do plan on working on this but I will be out of town and away from the keyboard until the first week or so in march. I won't be about to start these improvements any sooner than then.

        Just wanted to keep you up to date.

        Show
        Matt Brozowski added a comment - I do plan on working on this but I will be out of town and away from the keyboard until the first week or so in march. I won't be about to start these improvements any sooner than then. Just wanted to keep you up to date.
        Hide
        Werner Guttmann added a comment -

        I (a Castor committer) think that it doe snot make sense to implement above scheme. If a user wanted to be able to specify binding files for individual XML Schema instances, I think this information should be specified at the goal level explicitely. Why not allow for multiple <configuration> elements within the <execution> element ? This way one could really fine-tune the output of Castor's sourec generator, incl. definitions of the package names, warnings, etc.

        Show
        Werner Guttmann added a comment - I (a Castor committer) think that it doe snot make sense to implement above scheme. If a user wanted to be able to specify binding files for individual XML Schema instances, I think this information should be specified at the goal level explicitely. Why not allow for multiple <configuration> elements within the <execution> element ? This way one could really fine-tune the output of Castor's sourec generator, incl. definitions of the package names, warnings, etc.

          People

          • Assignee:
            Unassigned
            Reporter:
            Brett Ramdeen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: