The problem is that you can add a source folder in eclipse. That works fine. But as soon as you update the project from the pom.xml in eclipse, the build path entry for the source folder goes away.
Eclipse auto detects anything in generated-sources as a source folder, but only if there is any subfolder when issuing a mvn eclipse:eclipse. If you haven't done a mvn generate-sources before that there is no jooq folder (escpecially after "mvn clean") so the trouble begins. http://maven.apache.org/archives/maven-1.x/plugins/eclipse/faq.html#source-dep I guess I one declares a source folder to the pom.xml this might help with the issue. http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html 2014-09-08 12:33 GMT+02:00 Lukas Eder <[email protected]>: > Hi Patrik, > > I was actually kind of afraid that you might be using Eclipse. I've run > into similar issues in the past, but have never found any consistent ways > to reproduce what looks like an m2e bug. Could you explain what you mean by > this? > > Perhaps a small code example how to add a source folder to the pom.xml and >> the java 1.8 compatibility >> would be handy here. > > > I'll be more than happy to add a section to the manual if there is a known > issue with the Eclipse / Maven integration. Also, if the sample projects > are missing something from their pom.xml, I'll happily fix that: > https://github.com/jOOQ/jOOQ/tree/master/jOOQ-examples > > Cheers and thanks for reporting, > Lukas > > 2014-09-08 10:31 GMT+02:00 patrik knoerr <[email protected]>: > >> The code compliance is set to 1.8.. I think the problem could be some >> interaction with maven / eclipse... >> ... when it updates the project. >> >> I did not find any hints in the manual that one has to add a source >> folder to the build path to make the >> generated code available. If one does that, the build path is configured >> in eclipse. But sometimes >> eclipse has an outdated project, and it needs to update it from the pom. >> And then the build path sometimes >> gets lost, and the code compliance is set to 1.4. >> Perhaps a small code example how to add a source folder to the pom.xml >> and the java 1.8 compatibility >> would be handy here. >> >> Am Montag, 8. September 2014 08:29:57 UTC+2 schrieb Lukas Eder: >>> >>> Hello Patrik, >>> >>> jOOQ requires Java 6 to run. In Java 5, the @Override annotation could >>> only be used for actual method overriding, not implementations of interface >>> methods. That semantics was changed in Java 6. >>> >>> Even if you may be using Java 6 to compile your program, make sure that >>> you also set your Java compiler to use 1.6 source compatibility. >>> >>> Best Regards, >>> Lukas >>> >>> >>> 2014-09-07 17:05 GMT+02:00 <[email protected]>: >>> >>>> Hello, >>>> >>>> after generating some records from the schema the generated code won't >>>> compile.... >>>> >>>> ----------------- >>>> public class MachineRunsRecord >>>> extends >>>> org.jooq.impl.UpdatableRecordImpl<hello.database.tables.records. >>>> MachineRunsRecord> >>>> implements >>>> org.jooq.Record4<java.lang.Integer, java.lang.String, >>>> java.sql.Timestamp, java.sql.Timestamp> { >>>> >>>> .......... >>>> @Override >>>> public org.jooq.Field<java.lang.Integer> field1() { >>>> return hello.database.tables.MachineRuns.MACHINE_RUNS.ID; >>>> } >>>> >>>> field1 : "The method field1() of type MachineRunsRecord must override a >>>> superclass method" >>>> ----- >>>> >>>> but in >>>> >>>> ------ >>>> @Generated("This class was generated using jOOQ-tools") >>>> public interface Record4<T1, T2, T3, T4> extends Record { >>>> >>>> /** >>>> * Get the first field. >>>> */ >>>> Field<T1> field1(); >>>> -------- >>>> The field appears to be there. The Compiler complains that it can't >>>> find it, T1 is java.lang.Integer, so it should be available.... >>>> >>>> Is this a configuration problem, or how can one fix that? >>>> Best, >>>> Patrik >>>> >>>> -- >>>> 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 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/apiZ2B6chlY/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.
