Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4547

Maven2 axis2-wsdl2code-maven-plugin Does Not Bundle generated-sources Resource Files Created By XMLBeans

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.4.1
    • None
    • databinding, Tools
    • Windows XP SP3
      Apache Maven: 2.2.0
      Java Version: 1.6.0_10
      Axis WSDL2Code Plugin Version: 1.4.1
      XMLBeans Version: 2.4.0
      Axis Library Versions: 1.5.1

    Description

      Currently, the Maven2 plugin "axis2-wsdl2code-maven-plugin", which generates Java source code from a WSDL file, adds the source files (in directory "/target/generated-sources/axis2/wsdl2code/src") created during the "generate-sources" lifecycle phase as a source root in the Maven2 project allowing them to be compiled and included in the project's "/target/classes" directory for bundling and/or running.

      I'm guessing that step happens in the "WSDL2CodeMojo" class here?

          private void fixCompileSourceRoots() {
              File srcDir = new File(outputDirectory, "src");
      	    project.addCompileSourceRoot();
              project.addCompileSourceRoot(srcDir.getPath());
      	}
      

      However, it appears makes no comment on the equally needed "resources" directory that is generated by XMLBeans and found at "/target/generated-sources/axis2/wsdl2code/resources". This directory contains the class "TypeSystemHolder" and all of the *.xsb files that will be needed to actually run any program that uses XMLBeans for data binding.

      Right now I've found a work around by defining that path as a resource in the pom.xml file as shown below:

          <resources>
            <resource>
              <directory>${project.build.directory}/generated-sources/axis2/wsdl2code/resources</directory>
              <includes>
                <include>**/**</include>
              </includes>
            </resource>
          </resources>
      

      Maybe this is the correct way to handle this situation, but it would be nice if the Maven2 plugin would do this intuitively when it detects the XMLBeans data binding engine since it seems to ALWAYS be needed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sdct989 Aaron U'Ren
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: