title: How to fix jOOQ code generation tool error?
body: <p>I'm using Spring Boot 2.1.1 with jOOQ codegen tool 3.11.7. I have a Java class configured to slightly modify class names derived from MySQL table names in pom.xml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;generator&gt;
    &lt;target&gt;
      &lt;packageName&gt;com.example.foglight.db&lt;/packageName&gt;
      &lt;directory&gt;src/main/java&lt;/directory&gt;
    &lt;/target&gt;
    &lt;database&gt;
      &lt;excludes&gt;
        flyway_schema_history
        | information_schema.*
      &lt;/excludes&gt;
      &lt;inputSchema&gt;${dbName}&lt;/inputSchema&gt;
      &lt;outputSchemaToDefault&gt;true&lt;/outputSchemaToDefault&gt;
      &lt;forcedTypes&gt;
        &lt;forcedType&gt;
          &lt;userType&gt;java.util.UUID&lt;/userType&gt;
          &lt;binding&gt;com.example.foglight.config.db.MysqlUuidBinding&lt;/binding&gt;
          &lt;types&gt;BINARY\(16\)&lt;/types&gt;
        &lt;/forcedType&gt;
      &lt;/forcedTypes&gt;
    &lt;/database&gt;
    &lt;generate&gt;
      &lt;deprecationOnUnknownTypes&gt;false&lt;/deprecationOnUnknownTypes&gt;
      &lt;pojos&gt;true&lt;/pojos&gt;
    &lt;/generate&gt;
    &lt;!-- The default code generator. You can override this one, to generate your own code style
          Defaults to org.jooq.codegen.JavaGenerator --&gt;
    &lt;name&gt;org.jooq.codegen.JavaGenerator&lt;/name&gt;
    &lt;!-- The naming strategy used for class and field names.
          You may override this with your custom naming strategy. Some examples follow
          Defaults to org.jooq.codegen.DefaultGeneratorStrategy --&gt;
    &lt;strategy&gt;
   &lt;name&gt;com.example.foglight.config.db.DatabaseModelNamingStrategy&lt;/name&gt;
    &lt;/strategy&gt;
  &lt;/generator&gt;
  </code></pre>
  
  <p>Everything works fine when I'm building/running the app from IntelliJ, however when I run <code>mvn generate-sources</code> or <code>mvn install</code> from command line in the very same environment, I'm getting the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>[ERROR] Failed to execute goal org.jooq:jooq-codegen-maven:3.11.7:generate (default) on project foglight: Error running jOOQ code generation tool: com.example.foglight.config.db.DatabaseModelNamingStrategy -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jooq:jooq-codegen-maven:3.11.7:generate (default) on project foglight: Error running jOOQ code generation tool
  </code></pre>
  
  <p>With detailed explanation below:</p>
  
  <pre class="lang-none prettyprint-override"><code>Caused by: java.lang.ClassNotFoundException: com.example.foglight.config.db.DatabaseModelNamingStrategy
      at java.net.URLClassLoader.findClass (URLClassLoader.java:471)
      at java.lang.ClassLoader.loadClass (ClassLoader.java:588)
      at java.lang.ClassLoader.loadClass (ClassLoader.java:521)
      at org.jooq.codegen.GenerationTool.loadClass (GenerationTool.java:819)
      at org.jooq.codegen.GenerationTool.run (GenerationTool.java:352)
      at org.jooq.codegen.GenerationTool.generate (GenerationTool.java:220)
      at org.jooq.codegen.maven.Plugin.execute (Plugin.java:197)
  </code></pre>
  
  <p>The class is there (otherwise IntelliJ would be throwing the error too). Is there anything more that IDE is doing under the hood that makes it work?</p>