patrodyne / hisrc-basicjaxb

XJC plugins and tools for JAXB.
BSD 3-Clause "New" or "Revised" License
16 stars 6 forks source link

Apache Commons Logging missing #10

Closed delanym closed 9 months ago

delanym commented 1 year ago

With

        <plugin>
          <groupId>org.patrodyne.jvnet</groupId>
          <artifactId>hisrc-higherjaxb40-maven-plugin</artifactId>
          <version>2.1.1</version>
          <dependencies>
            <dependency>
              <groupId>org.patrodyne.jvnet</groupId>
              <artifactId>hisrc-basicjaxb-plugins</artifactId>
              <version>2.1.1</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>jaxb-xjc</id>
              <goals>
                <goal>generate</goal>
              </goals>
              <configuration>
                <extension>true</extension>
                <args>
                  <arg>-Xsimplify</arg>
                  <arg>-Xsetters</arg>
                  <arg>-Xsetters-mode=direct</arg>
                </args>
                <schemaDirectory>src/main/resources/xsd</schemaDirectory>
                <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
              </configuration>
            </execution>
          </executions>
        </plugin>

on Maven 3.9.4 I get Execution jaxb-xjc of goal org.patrodyne.jvnet:hisrc-higherjaxb40-maven-plugin:2.1.1:generate failed: A required class was missing while executing org.patrodyne.jvnet:hisrc-higherjaxb40-maven-plugin:2.1.1:generate: org/apache/commons/logging/LogFactory

patrodyne commented 1 year ago

Try <artifactId>hisrc-higherjaxb-maven-plugin</artifactId>, it is the current JAXB spec (which at this time is higherjaxb40) but includes the missing jcl-over-slf4j dependency.

patrodyne commented 1 year ago

I've determined that the jcl-over-slf4j dependency is missing from hisrc-higherjaxb40-maven-plugin (and higherjaxb23, higherjaxb30). The issue occurs when a parameterized option like setters-mode=direct is used. The issue is triggered by a call to org.apache.commons.beanutils.ConvertUtilsBean. I'll add the missing dependency. Until the next release, you can add the following to the higherjaxb40 plugin dependencies in your POM.

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>jcl-over-slf4j</artifactId>
    <version>2.0.7</version>
</dependency>
patrodyne commented 9 months ago

The fix for hisrc-higherjaxb40-maven-plugin (and higherjaxb23, higherjaxb30) is available in HiSrc BasicJAXB Release 2.2.0.