... I've added a feature request for this. Let's see if it's easy to write an XJC plugin: https://github.com/jOOQ/jOOQ/issues/7075
2018-01-16 18:01 GMT+01:00 Lukas Eder <[email protected]>: > ... This of course depends on the javax.xml.bind module from JDK 9 onwards > ;-) > > 2018-01-16 18:00 GMT+01:00 Lukas Eder <[email protected]>: > >> Hi Etienne, >> >> Thanks for your message. >> >> Unfortunately, I'm not aware of any XJC plugins that implement equals() >> and hashCode() correctly without any external dependencies. But you can >> easily check for equality by serialising both Configuration objects to an >> XML string using >> >> boolean equal(Configuration c1, Configuration c2) { >> try { >> StringWriter w1 = new StringWriter(); >> StringWriter w2 = new StringWriter(); >> JAXB.marshal(c1, w1); >> JAXB.marshal(c2, w2); >> return w1.toString().equals(w2.toString()); >> } >> catch (IOException ignore) {} >> return false; >> } >> >> >> I hope this helps, >> Lukas >> >> 2018-01-16 17:19 GMT+01:00 <[email protected]>: >> >>> Hi Lukas >>> >>> Would it be possible for you to generate the JAXB classes >>> (Configuration, Jdbc, Generator, etc.) with an equals and hash code >>> implementation? Not sure if the JAXB code generators provide such an >>> option. It would allow the gradle-jooq-plugin to determine if the >>> Configuration has changed between two runs. >>> >>> Etienne >>> >>> -- >>> 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.
