JiBX
  1. JiBX
  2. JIBX-399

Apache Maven goal schema-codegen does not pass customizations to CodeGen correctly

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: JiBX 1.2.2
    • Fix Version/s: JiBX 1.2.3
    • Component/s: maven plugin
    • Labels:
      None
    • Environment:
      Windows XP; java version "1.6.0_13"
    • Number of attachments :
      1

      Description

      When configuring the Apache Maven goal schema-codegen with

      <customizations>
      <!---->
      <customization>jibxCustomization_*.xml</customization>
      <!---->
      </customizations>

      the command line tool mvn aborts with

      [INFO] Generating Java sources in target/generated-sources from schemas available in src/main/resources/META-INF/xmlSchemas...
      Command line options must precede all other arguments: error on '-c'

      Usage: java org.jibx.schema.codegen.CodeGen [options] schema1 schema2 ...
      where options are:
      -b name generated root binding name
      -c path input customizations file
      -d file for dumping the generated class structure
      -i path,... include existing bindings (one or more), and use for matching
      schema global definitions
      -n pack default package for no-namespace schema definitions
      -p pack default package for all schema definitions
      -s schema root directory path
      -t path target directory for generated output (default is current directory)
      -u uri namespace applied for code generation when no-namespaced schemas
      are found
      -v verbose output flag
      -w wipe all existing files from generation directory (ignored if current
      directory)
      The schema# files are different schemas to be included in the generation
      (references from these schemas will also be included).

      Terminating due to command line or customization errors

        Issue Links

          Activity

          Hide
          Tim Friske added a comment -

          When commenting the above configuration and specifying the customization file insteads with

          <option>
          <!---->
          <c>jibxCustomization_*.xml</c>
          <!---->
          </option>

          the command line tool mvn aborts with

          [INFO] Generating Java sources in target/generated-sources from schemas available in src/main/resources/META-INF/xmlSche
          mas...
          Output to directory target\generated-sources
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD ERROR
          [INFO] ------------------------------------------------------------------------
          [INFO] Parameter c not found

          [INFO] ------------------------------------------------------------------------
          [INFO] For more information, run Maven with the -e switch
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 1 second
          [INFO] Finished at: Mon Sep 27 23:24:07 CEST 2010
          [INFO] Final Memory: 6M/13M
          [INFO] ------------------------------------------------------------------------

          Show
          Tim Friske added a comment - When commenting the above configuration and specifying the customization file insteads with <option> <!----> <c>jibxCustomization_*.xml</c> <!----> </option> the command line tool mvn aborts with [INFO] Generating Java sources in target/generated-sources from schemas available in src/main/resources/META-INF/xmlSche mas... Output to directory target\generated-sources [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Parameter c not found [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Mon Sep 27 23:24:07 CEST 2010 [INFO] Final Memory: 6M/13M [INFO] ------------------------------------------------------------------------
          Hide
          Don Corley added a comment -

          Tim,
          The maven-jibx-plugin has been re-written for version 1.2.3 (which should be out within the next few weeks).
          This release will fix your problem.
          To use the new code, please check it out of the cvs dev repository and build it. ie., type:

          cvs -z3 -d:pserver:anonymous@jibx.cvs.sourceforge.net:/cvsroot/jibx co -P maven-jibx-plugin
          cd maven-jibx-plugin (or dir maven-jibx-plugin if you are using windows)
          mvn install
          mvn site (this will install the new documentation on your hard disk at target/site
          (ignore any warnings)

          This will overwrite your maven-jibx-plugin version 1.2.2 with the new code.
          Now try to build your maven project. It should work as expected.
          Thanks,
          Don

          Show
          Don Corley added a comment - Tim, The maven-jibx-plugin has been re-written for version 1.2.3 (which should be out within the next few weeks). This release will fix your problem. To use the new code, please check it out of the cvs dev repository and build it. ie., type: cvs -z3 -d:pserver:anonymous@jibx.cvs.sourceforge.net:/cvsroot/jibx co -P maven-jibx-plugin cd maven-jibx-plugin (or dir maven-jibx-plugin if you are using windows) mvn install mvn site (this will install the new documentation on your hard disk at target/site (ignore any warnings) This will overwrite your maven-jibx-plugin version 1.2.2 with the new code. Now try to build your maven project. It should work as expected. Thanks, Don
          Hide
          Don Corley added a comment -

          This issue has been reported and fixed in the next version.

          Show
          Don Corley added a comment - This issue has been reported and fixed in the next version.

            People

            • Assignee:
              Don Corley
              Reporter:
              Tim Friske
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: