jpegasus jpegasus - 1 year ago 118
Java Question

Exclude a particular schema from code generation in JOOQ

I've currently trying to generate classes based on my existing Postgres DB using JOOQ. In my JOOQ .xml config I have left out any inputSchema tags so that JOOQ generates all the schemas it finds:


However, I would like to exclude the information schema from the content that gets generated. Is there a way to do this in black list way? Or do I have to add input schemas for all the schemas except information schema?

Answer Source

You can use the <excludes> configuration as documented here:

  (?i:information_schema\..*) # I'm using (?i: ... ) for case-insensitivity here...

Both <includes> and <excludes> take Java regular expressions as arguments, which make matching unwanted schemas relatively easy.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download