--
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 jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
task generate << { def writer = new StringWriter() def xml = new groovy.xml.MarkupBuilder(writer) jdbc() { driver('com.mysql.jdbc.Driver') url('jdbc:mysql://localhost:3306') user('******') password('******') schema('betstation') } generator() { database() { inputSchema('betstation') } generate() { pojos(true) } target() { packageName('betstation.db.autoGenerated') directory('C:\\Users\\marko\\test\\workspace\\BetStationPrototype\\src\\main\\java') } } }
System.out.println(writer.toString())
org.jooq.util.GenerationTool.generate( javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), org.jooq.util.jaxb.Configuration.class) )}
<configuration xmlns='http://www.jooq.org/xsd/jooq-codegen-3.8.0.xsd'> <jdbc> <driver>com.mysql.jdbc.Driver</driver> <url>jdbc:mysql://localhost:3306</url> <user>marko</user> <password>kuske1</password> <schema>betstation</schema> </jdbc> <generator> <database> <inputSchema>betstation</inputSchema> </database> <pojos>true</pojos> <target> <packageName>betstation.db.autoGenerated</packageName> <directory>C:\Users\marko\test\workspace\BetStationPrototype\src\main\java</directory> </target> </generator></configuration>
<pojos>true</pojos>
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
generator() { database() { inputSchema('betstation') } generate() { }
fakeGenerate() { pojos(true) }
}
String result = writer.toString().replaceAll('fakeGenerate', 'generate') org.jooq.util.GenerationTool.generate( javax.xml.bind.JAXB.unmarshal(new StringReader(result), org.jooq.util.jaxb.Configuration.class)
)
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
Thanks for the reply Lukas.
I'll try suggested solution as it's nicer.
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/CdzTFyWdY3M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+unsubscribe@googlegroups.com.
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/CdzTFyWdY3M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.