Skip to content
Advertisement

Using classes from /target

I am using JOOQ. JOOQ generates meta classes, using with database requests. It’s recommended to generate classes into /target/generated-sources/jooq. But when I try to call these meta classes in code, they are not accessible.

Please, tell me what to do.

Advertisement

Answer

This is the default output location because the assumption is that most people are using Maven, and Maven will automatically include that path.

You can generate your classes anywhere you want including your own src directory, or whatever your IDE is defaulting to. For that, use the target configuration. Example from the manual:

<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.14.0.xsd">
  <generator>
    <target>
      <packageName>org.jooq.your.packagename</packageName>
      <directory>/path/to/your/dir</directory>
    </target>
  </generator>
</configuration>
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement