Hey Lukas,

I will go with multi-module project I guess then, thanks for all of the
help!

Best,

Branko.

On Mon, Dec 19, 2016 at 5:48 PM, Lukas Eder <[email protected]> wrote:

> Hi Branko,
>
> Indeed, jOOQ (well, in fact jOOQ delegates to Spring and Hibernate here)
> requires the .class JPA files to be on the class path of the jOOQ code
> generator. Usually, those entities are in a separate Maven module that was
> compiled before. That's probably the easiest way forward, here.
>
> Hope this helps,
> Lukas
>
> 2016-12-19 17:07 GMT+01:00 Branko Gvoka <[email protected]>:
>
>> Hey, thanks on quick response! Great about the possibility to add it into
>> any phase, however I have a small problem of running the code generator
>> plugin, maybe you could point me out to the solution.
>>
>> After I mvn clean and run maven install, JOOQ runs successfully but it
>> doesnt create any tables, just Default.java and Public.java catalog and
>> schema, no tables from JPAs. After it, If I run the same command once again
>> (mvn install) it then creates other tables and finishes successfully. I
>> realized that it has something with the plugin using .class JPA files that
>> are created with first run inside targe/classes My plugin def is:
>>
>> <plugin>
>>     <groupId>org.jooq</groupId>
>>     <artifactId>jooq-codegen-maven</artifactId>
>>     <version>3.8.6</version>
>>     <executions>
>>         <execution>
>>             <goals>
>>                 <goal>generate</goal>
>>             </goals>
>>         </execution>
>>     </executions>
>>     <configuration>
>>         <generator>
>>             <name>org.jooq.util.JavaGenerator</name>
>>             <strategy>
>>                 <name>org.jooq.util.DefaultGeneratorStrategy</name>
>>             </strategy>
>>             <database>
>>                 <name>org.jooq.util.jpa.JPADatabase</name>
>>                 <properties>
>>                     <property>
>>                         <key>packages</key>
>>                         <value>com.demo.backend.model</value>
>>                     </property>
>>                 </properties>
>>             </database>
>>             <target>
>>                 <packageName>jooq</packageName>
>>                 
>> <directory>${project.build.directory}/generated-sources</directory>
>>             </target>
>>         </generator>
>>     </configuration>
>>
>> </plugin>
>>
>> First round of mvn install
>>
>>
>> <https://lh3.googleusercontent.com/-3EfM6MNWv5A/WFf8CO_FVFI/AAAAAAAAAY8/TS0OlNcffRASbEkXcdWUpSTZSQN0PPojwCLcB/s1600/Screen%2BShot%2B2016-12-19%2Bat%2B4.24.48%2BPM.png>
>>
>>
>> <https://lh3.googleusercontent.com/-Xv2ogoUnmBE/WFf8GX_aPlI/AAAAAAAAAZA/4S4Hp-a-a0oTCkMXIclxn-LAtSmA04DagCLcB/s1600/Screen%2BShot%2B2016-12-19%2Bat%2B4.25.18%2BPM.png>
>>
>> Second round, with tables
>>
>>
>> Maybe I should add some other settings as well?
>>
>>
>> Thanks!
>>
>>
>> On Sunday, December 18, 2016 at 5:20:44 PM UTC+1, Branko Gvoka wrote:
>>>
>>> Hi there,
>>>
>>> I started with JOOQ 2-3 days ago, by first watching a video from GeeCON
>>> '14 by Lukas, where at the end he explained that JOOQ is meant for systems
>>> that are schema first where model is already defined. I totally liked the
>>> possibility that JOOQ gives you when it comes to querying your data.
>>>
>>> I soon realized that there is some work related to generating the stubs
>>> from annotated classes, tho it is meant to be done only once when
>>> application should start to use JOOQ. I didn't find a way of regenerating
>>> the classes again later when the model has changed, since the generate goes
>>> after the compilation phase and maven couldn't let me regenerate everything
>>> before I cleanup "missing" stubs. In QueryDSL, they embedded the generating
>>> in process phase I believe and they way of doing the generation is probably
>>> overcoming this problem because of that, since it is a part of process
>>> phase, where you dont have problem of running the compilation phase without
>>> these stubs.
>>>
>>> My questions would be, is there a support like this already created? Did
>>> the approach change after '14?
>>>
>>> I am asking this since I would like to embed JOOQ in a code generator
>>> that I am developing with my friends, which gives you opportunity to
>>> generate code out of specification you create (similar tool to JHipster).
>>> Since the tool that we are building gives you opportunity to change the
>>> model all the time, if there isnt any support, I would generate stubs with
>>> tool, that would follow the model as well.
>>>
>>> Thanks,
>>>
>>> Branko.
>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "jOOQ User Group" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jooq-user/gYVkAjtCElU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to