I have a use case where I'd like to use 90% of the same configuration to generate two different libraries.
So, I'm using maven to build our library and I have one large xml files that defines all the settings.
ie.
<configurationFile>../jooq_config.xml</configurationFile>
</configuration>
Now, what i'm running into is that most of that file is all good, but I'd like to create a new library that we can migrate to, that uses a new package name and different settings and uses Java8 Time Objects and so on.
For example:
<javaTimeTypes>false</javaTimeTypes> should be flipped in the new library.
Forced type like these need to be omitted
<forcedType>
<name>TIMESTAMP</name>
<types>(?i:timestamp\ with\ time\ zone)</types>
</forcedType>
but this:
<forcedType>
<userType>com.fasterxml.jackson.databind.JsonNode</userType>
<binding>biz.foobar.mip.PostgresJsonbBinding</binding>
<expression>
integration\.service_process\.result
</expression>
<types>jsonb</types>
</forcedType>
is needed.
I was wondering if there was a way of include snippets of XML? I don't mind maintaining two xml files but there is a lot of common code where we white list database tables in the <includes/> tag
and <schemata/> that I really want to avoid maintaining two mirror version of each one.
Is there a recommended pattern to use that allows me to do this without having to duplicate data?
--