Defozo
Defozo

Reputation: 3092

jOOQ, Java - how to import generated java files?

I'm in the 4th step of this tutorial: http://www.jooq.org/doc/3.3/manual/getting-started/tutorials/jooq-in-7-steps/jooq-in-7-steps-step4/

I generated files from step 3 and put them in src directory in my Java project but it seems that IDE can't find it:

enter image description here

enter image description here

Upvotes: 4

Views: 2657

Answers (2)

Defozo
Defozo

Reputation: 3092

  1. Move database directory to src/main/java.
  2. Make sure that the package name in moved files is correct.
  3. Reload project

Upvotes: 0

Lukas Eder
Lukas Eder

Reputation: 220877

If you don't want to repeat the steps mentioned in your workaround every time, you should probably change your jOOQ code generation configuration to generate classes in your desired location:

<configuration>
  ...
  <generator>
    ...
    <target>
      <!-- use the appropriate location here -->
      <directory>src/main/java</directory>
      ...
    </target>
  </generator>
</configuration>

Upvotes: 2

Related Questions