Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3045

cxf-codgen-plugin does hot support XMLBeans generated classes/sources properly

    XMLWordPrintableJSON

Details

    Description

      When XMLBeans runs it not only generates sources but also classes. While the plugin has a classesDirectory property it does not use it at all.

      A default configuration can still produce the expected result. Here it is

                  <plugin>
                      <groupId>org.apache.cxf</groupId>
                      <artifactId>cxf-codegen-plugin</artifactId>
                      <executions>
                          <execution>
                              <id>generate-sources</id>
                              <phase>generate-sources</phase>
                              <configuration>
                                  <defaultOptions>
                                      <extraargs>
                                          <extraarg>-classdir</extraarg>
                                          <extraarg>${project.build.outputDirectory}</extraarg>
                                          <extraarg>-db</extraarg>
                                          <extraarg>xmlbeans</extraarg>
                                      </extraargs>
                                  </defaultOptions>
                                  <wsdlRoot>${basedir}/src/main/wsdl</wsdlRoot>
                                  <includes>
                                      <include>*.wsdl</include>
                                  </includes>
                              </configuration>
                              <goals>
                                  <goal>wsdl2java</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
      

      The problem now. If you do not specify this extra classDir parameter yourself, the plugin will generate the sources and the classes in the same directory. In practice all the generated classes at this point will NOT be included in the jar produced by Maven.

      Maybe having specific configuration option for the bindings would help here.

      Attachments

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              snicoll Stephane Nicoll
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: